Clasificados Online Top 10 Linux System Monitoring Tools Every Linux Geek Should Know
Automatically Post To Facebook From Linux Command Line
 
 
Analyze Disk Usage With NCurses Disk Usage NCDU
 
 
Top 10 Linux System Monitoring Tools Every Linux Geek Should Know
 
 

Top 10 Linux System Monitoring Tools Every Linux Geek Should Know

Are you in need of monitoring a Linux server for performance? These built-in command and add-on tools provide techniques which can be used to get useful information about a system’s activities. These tools will help find the possible causes of a performance problem. The commands I talk about below are some of the most basic commands when it comes to system analysis and debugging server issues.

top

Process Activity Command
The top program provides a awesome real-time view of your system for example actual process activity. Out the box, it displays the most CPU-intensive processes running on the Linux Machine and updates the list every five seconds.

top

vmstat

System Activity, Hardware and System Information

procs ———–memory———- —swap– —–io—- –system– —–cpu——
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 2540988 522188 5130400 0 0 2 32 4 2 4 1 96 0 0
1 0 0 2540988 522188 5130400 0 0 0 720 1199 665 1 0 99 0 0
0 0 0 2540956 522188 5130400 0 0 0 0 1151 1569 4 1 95 0 0
0 0 0 2540956 522188 5130500 0 0 0 6 1117 439 1 0 99 0 0
0 0 0 2540940 522188 5130512 0 0 0 536 1189 932 1 0 98 0 0
0 0 0 2538444 522188 5130588 0 0 0 0 1187 1417 4 1 96 0 0
0 0 0 2490060 522188 5130640 0 0 0 18 1253 1123 5 1 94 0 0

w

Find Out Who Is Logged on And What They Are Doing

# w username
# w username

Sample output

17:58:47 up 5 days, 20:28, 2 users, load average: 0.36, 0.26, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 10.1.3.145 14:55 5.00s 0.04s 0.02s vim /etc/resolv.conf
root pts/1 10.1.3.145 17:43 0.00s 0.03s 0.00s w

uptime

How Long The System Has Been Up

# uptime

output:

14:28:17 up 2 days, 3:53, 1 user, load average: 0.90, 0.46, 0.37

ps

Displays The Processes

# ps -A

Output:

PID TTY TIME CMD
1 ? 00:00:02 init
2 ? 00:00:02 migration/0
3 ? 00:00:01 ksoftirqd/0
4 ? 00:00:00 watchdog/0
5 ? 00:00:00 migration/1
6 ? 00:00:15 ksoftirqd/1
….
…..
4881 ? 00:53:28 java
4885 tty1 00:00:00 mingetty
4886 tty2 00:00:00 mingetty
4887 tty3 00:00:00 mingetty
4888 tty4 00:00:00 mingetty
4891 tty5 00:00:00 mingetty
4892 tty6 00:00:00 mingetty
4893 ttyS1 00:00:00 agetty
12853 ? 00:00:00 cifsoplockd
12854 ? 00:00:00 cifsdnotifyd
14231 ? 00:10:34 lighttpd
14232 ? 00:00:00 php-cgi
54981 pts/0 00:00:00 vim
55465 ? 00:00:00 php-cgi
55546 ? 00:00:00 bind9-snmp-stat
55704 pts/1 00:00:00 ps

free

Memory Usage

# free

Output:

total used free shared buffers cached
Mem: 1024768 316332 708436 0 34536 123616
-/+ buffers/cache: 158180 866588
Swap: 463868 176 463692

iostat

Average CPU Load, Disk Activity
The command iostat report Central Processing Unit (CPU) statistics and input/output statistics for devices, partitions and network filesystems (NFS).

The command iostat report Central Processing Unit (CPU) statistics and input/output statistics for devices, partitions and network filesystems (NFS).

output:

Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in) 06/26/2009
avg-cpu: %user %nice %system %iowait %steal %idle
3.50 0.09 0.51 0.03 0.00 95.86
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 22.04 31.88 512.03 16193351 260102868
sda1 0.00 0.00 0.00 2166 180
sda2 22.04 31.87 512.03 16189010 260102688
sda3 0.00 0.00 0.00 1615 0

ss

Network Statistics
ss command is used to dump socket statistics.

FIN-WAIT-2 0 0 10.1.10.72:www 131.142.24.171:51858
ESTAB 0 0 10.1.10.72:ssh 10.1.10.157:35827
ESTAB 0 0 10.1.10.72:ssh 10.1.10.157:59810
ESTAB 0 0 10.1.10.72:www 131.142.24.171:51857
ESTAB 0 0 10.1.10.72:www 8.22.204.204:2336
FIN-WAIT-2 0 0 10.1.10.72:www 131.142.24.171:51860

iptraf

Real-time Network Statistics
iptraf
iptraf

tcpdump

Detailed Network Traffic Analysis
tcpdump is a simple command that dumps traffic on a network. You might need good understanding of TCP/IP protocol to use this tool. For example to display traffic info about DNS, enter:

# tcpdump -i eth1 ‘udp port 53′

To display all HTTP session to 10.1.10.12:

# tcpdump -ni eth0 ‘dst 10.1.10.12 and tcp and port http’

Post to Twitter Post to Bebo Post to Yahoo Buzz Post to Delicious Post to Digg Post to Reddit Post to StumbleUpon

Share

Leave a Comment

can you find the submit button?

 
Clasificados Online Real Time Web Analytics