dstat 是一个用来替换 vmstat, iostat, netstat, nfsstat 和 ifstat 这些命令的工具,是一个全能系统信息统计工具。

  1. 安装:
yum install http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
yum install dstat
  1. 使用:
[root@ha1 logs]# dstat
You did not select any stats, using -cdngy by default.
—-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
1   2  95   0   0   1|  26k   84k|   0     0 |   0     3B|9686  8092
0  13  87   0   0   0|   0  1728k| 409k 2798k|   0     0 |3870  1152
0  13  87   0   0   0|   0     0 | 473k 3198k|   0     0 |4225  1181
0  13  87   0   0   0|   0     0 | 454k 3507k|   0     0 |4244  1403
0  13  87   0   0   0|   0     0 | 440k 3055k|   0     0 |4071  1203
0  13  87   0   0   0|   0     0 | 580k 2986k|   0     0 |3600  1154
0  13  86   1   0   0|   0   200k| 430k 2388k|   0     0 |3727  1220
0  13  87   0   0   0|   0     0 | 421k 2184k|   0     0 |3662  1305
0  13  87   0   0   0|   0     0 | 643k 2216k|   0     0 |3536  1180
0  13  87   0   0   0|   0     0 | 414k 2233k|   0     0 |3414  1129
0  13  87   0   0   0|   0     0 | 547k 1978k|   0     0 |3802  1326
0  13  86   1   0   0|   0   372k| 455k 2679k|   0     0 |3971  1351
0  13  87   0   0   0|   0     0 | 397k 1918k|   0     0 |3763  1348

[root@ha1 logs]# dstat -c –top-cpu -d –top-bio –top-latency
—-total-cpu-usage—- -most-expensive- -dsk/total- —-most-expensive—- –highest-total–
usr sys idl wai hiq siq|  cpu process   | read  writ|  block i/o process   | latency process
1   2  95   0   0   1|kipmi0       1.4|  26k   84k|init [3]     11k   38k|pdflush       227
0  13  86   0   0   0|kipmi0        13|   0   328k|kjournald     0   152k|nginx: worker   1
0  13  87   0   0   0|kipmi0        13|   0     0 |nagios        0    20k|                
0  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0  8192B|ksoftirqd/6     3
1  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0    16k|ksoftirqd/3     4
1  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0    12k|ksoftirqd/0     3
1  13  86   1   0   0|kipmi0        13|   0   204k|nginx: work   0  8192B|ksoftirqd/7     5
1  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0    12k|ksoftirqd/2     3
1  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0    16k|ksoftirqd/5     3
0  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0    12k|ksoftirqd/1     4
1  13  87   0   0   0|kipmi0        13|   0     0 |nginx: work   0    12k|ksoftirqd/4     5

dstat可以在linux下比较清析的显示CPU,内存,网络,磁盘等的统计信息。非常好用。

  1. 更多信息

http://dag.wieers.com/home-made/dstat/