≡ Menu

Linux Time Command Examples

There are times when you might want to profile your program on parameters like:

  • Time taken by program in user mode
  • Time taken by program in kernel mode
  • Average memory usage by the program
  • etc

On Linux we have a utility ‘time’ that is designed specifically for this purpose. The utility ‘time’ takes a program name as an input and displays information about the resources used by the program. Also, if the command exists with non-zero status, this utility displays a warning message and exit status.
[continue reading…]

How to Setup Rsyslog Remote Logging on Linux (Central Log Server)

Every Linux distribution have some kind of logging mechanism that records all the system activities. A while back we provided a list of 20 log files that are stored under /var/log that you might be helpful during troubleshooting. These logs are very critical for sysadmin for troubleshooting purpose.

The following are the three common methods to log a message:

  1. Logging on the same server: Messages get written into the local hard drive/local database
  2. Logging on a remote server: Many systems forward their logs over the network to a central log server. On the central log server, the messages from various systems are written to the local hard drive/database.
  3. Relay logging: Branch ‘A’ and Branch ‘B’ logs the messages on 2 different servers. These server in-turn logs the message to the ‘Head Office’.

[continue reading…]

6 Nagios Command Line Options Explained with Examples

This article explains various command line options that are available for the nagios command.

1. Start Nagios Daemon Using nagios -d

Typically you would execute “service nagios start” to start the Nagios daemon, which really calls the /etc/rc.d/init.d/nagios script.

You’ll see the following line inside the /etc/rc.d/init.d/nagios script for the Nagios startup:
[continue reading…]

Though TCP protocol is a connection oriented and reliable protocol but still there a various loopholes that can be exploited. These loop holes are mostly explained in terms of attacks.

In the previous article on the TCP/IP Attacks series, we explained about ARP Cache Poisoning.

This article explains the following two attacks:

  1.  TCP sequence prediction attack
  2.  TCP reset attacks

[continue reading…]

What is an IP Address? IPv4 and IPv6 Address Examples

Question: I’ve been playing around with Linux desktop distro for a while. But, I’m very new to networking. Can you explain me in simple terms about what is an ip address and give me an example?

Answer: When someone mails you a postal letter, you get it. How? Because it has an address that uniquely identifies your home. Pretty basic. Right? Just like your home, every system in the Internet need to have an unique address for someone to find it. That is called an ip address.
[continue reading…]

Understand UNIX / Linux Inodes Basics with Examples

Several countries provides a unique identification number (for example, social security number in the USA) to the people who live in that country. This makes it easier to identify an individual uniquely. This makes it easier to handle all the paper work necessary for an individual by various government agencies and financial institutions.

Similar to the social security number, there is a concept of Inode numbers which uniquely exist for all the files on Linux or *nix systems.
[continue reading…]

Suppose ‘A’ and ‘B’ are very good friends and ‘A’ shares all his secrets with ‘B’.

Now if a guy ‘C’ comes in and fakes as if he is ‘B’. Can you imagine what could happen? Yes, ‘A’ could tell all his secrets to ‘C’ and ‘C’ could misuse it.

In a layman’s language, this is what we mean by ARP cache poisoning.

ARP poisoning may cause many serious networking problems and network administrators should know how this attack works.
[continue reading…]

3 Work-Life Balance Models

You should balance your work (career, professional goals, etc.) and life (family, health, self-improvement, etc.).

In order to lead a happy, successful, and meaningful life, there should be a balance between “work” and “life”.

But, the real question is, are you balancing it in the right way?

When geeks hear the term “Work-Life Balance”, they try to run away as fast as they can.
[continue reading…]