Top Menu

Saturday, September 1, 2012

15 useful commands for Linux/Unix System Monitoring

In this article I am demonstrating the list of those commands which is frequently useful to every Linux/Unix System Administrator. Especially these commands are very useful to monitor almost any flavor of Linux server.
1. top: Display real time CPU processes. It provides an ongoing real look at processor activities in real time. This command also displays the listing of most intensive tasks on the system, and provides an interactive interface for monitoring/manipulating processes.
2. vmstat: It is a very popular tool to analyze Linux/Unix Server performance. This command gives the full information about processes, memory, paging, block I/O, trap and CPU activities.
3. ps: It is used to display current running process on Linux/Unix system. This is just similar to the “Task Manager” on Windows system. You can manage any process in Linux/Unix system with the help of ps command.
4. iptraf: It is an curses-based LAN monitoring command that generates various network statistics including TCP info, UDP counts, ICMP and OSPF(Open Shortest Path First ) information, Ethernet load info, node stats, IP checksum errors, and others.
5. tcpdump : This command is highly useful in troubleshooting and monitoring network activity. It prints out the headers of packets on a network interface that match the Boolean expression.
6. w : The Linux w command prints who is logged on in Linux/Unix system and what they are doing. Its function is identical to the “who” command but the w command provides more detail than who command.
7. sar : Using sar command you can monitor performance of various Linux resources like CPU, Memory, I/O in real time. This command is identical to the top command but its more interactive and customizable than top.
8. iostat : This is a command line I/O performance monitoring utility. It makes different from other Linux utilities, which mostly show only I/O transfer rates, but iostat command show you finally important information about disk utilization, number of requests, average queue size and disk & queue wait times.
9. uptime: This command tell how long the system has been running. It shows a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the last 1, 5 and 15 minutes. This is the same information contained in the header line of w command’s display.
10. free : This command will show you the information about free and used memory on the system. It will also displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache consumed by the kernel.
11. mpstat : it shows processors related statistics. The mpstat command writes to standard output activities for each available processor.
12. pmap(process mapping ) : it is used to see all the memory used by a process.
13. pgrep(process grep): This command is used to see all the process run by a particular application.
14. netstat : This command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc.,
15. ss : It display Network and Socket Information. The ss command is used to dump socket statistics. It is similar to netstat command but It can display more TCP and state information than other tools.
There are some more commands for monitoring the Linux/Unix system but here I have demonstrated only top fifteen commands which I use almost daily.

No comments:

Post a Comment