by Himanshu Arora on January 26, 2012
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.
(more…)
by Lakshmanan Ganapathy on January 25, 2012
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:
- Logging on the same server: Messages get written into the local hard drive/local database
- 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.
- 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’.
(more…)
by Himanshu Arora on January 20, 2012
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:
- TCP sequence prediction attack
- TCP reset attacks
(more…)
by Ramesh Natarajan on January 18, 2012
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.
(more…)
by Himanshu Arora on January 16, 2012
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.
(more…)
by Himanshu Arora on January 13, 2012
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.
(more…)
by Himanshu Arora on January 9, 2012
UNIX has been regarded as the mother of most of the operating systems. Some of the popular members of this family Include :
- System V Release 4(SVR4) developed by AT&T.
- 4.4 BSD From university of California
- AIX from IBM.
- HP-UX from Hewlett-Packard.
- Solaris from Sun Microsystems.
(more…)
by Himanshu Arora on January 6, 2012
If you are interested in writing Linux system programming, you should learn all the basic library/system calls. This article has an example C program that covers a set of system calls that will help you understand the usage of these basic library calls.
(more…)