暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Linux vmstat new options-vmstat的新选项

原创 eygle 2005-09-20
578
看到Kamus写的Red Hat Magazine, Issue #11 发布,从其中的一篇文章:Performance tuning tools: ps, top, sar, iostat, and vmstat发现Redhat中,vmstat增加了几个选项。



1.vmstat -d选项

此选项的注释是:需要2.5.70及以上内核

The -d reports disk statistics (2.5.70 or above required)

我们看下该命令输出:


[root@danaly ~]# vmstat -d 2|grep -v ram
disk- ------------reads------------ ------------writes----------- -----IO------
total merged sectors ms total merged sectors ms cur sec
hda 0 0 0 0 0 0 0 0 0 0
cciss/c0d0 28568 86702 1207480 454583 292728 652992 7565732 6802794 0 2038
cciss/c0d1 120535 10905 3990350 127147 492529 57565 20825715 8258249 0 5151
fd0 0 0 0 0 0 0 0 0 0 0
md0 0 0 0 0 0 0 0 0 0 0
disk- ------------reads------------ ------------writes----------- -----IO------
total merged sectors ms total merged sectors ms cur sec
hda 0 0 0 0 0 0 0 0 0 0
cciss/c0d0 28568 86702 1207480 454583 292753 653042 7566332 6803437 0 2038
cciss/c0d1 120535 10905 3990350 127147 492532 57565 20825727 8258300 0 5152
fd0 0 0 0 0 0 0 0 0 0 0
md0 0 0 0 0 0 0 0 0 0 0
disk- ------------reads------------ ------------writes----------- -----IO------
total merged sectors ms total merged sectors ms cur sec
hda 0 0 0 0 0 0 0 0 0 0
cciss/c0d0 28568 86702 1207480 454583 292753 653042 7566332 6803437 0 2038
cciss/c0d1 120535 10905 3990350 127147 492535 57565 20825799 8258333 0 5152
fd0 0 0 0 0 0 0 0 0 0 0
md0 0 0 0 0 0 0 0 0 0 0


通过此命令可以查看磁盘的统计数据。



2.vmstat -s选项

此选项一次性显示内存使用的状态信息:

The -s switch displays a table of various event counters and memory statistics. This display does not repeat.




[root@danaly ~]# vmstat -s
2075016 total memory
1817776 used memory
1270452 active memory
469040 inactive memory
257240 free memory
140640 buffer memory
1290140 swap cache
4192956 total swap
0 used swap
4192956 free swap
108739 non-nice user cpu ticks
10913 nice user cpu ticks
40472 system cpu ticks
155852897 idle cpu ticks
658151 IO-wait cpu ticks
5063 IRQ cpu ticks
4948 softirq cpu ticks
2601019 pages paged in
14215470 pages paged out
0 pages swapped in
0 pages swapped out
407171759 interrupts
34676601 CPU context switches
1126835178 boot time
162802 forks




3.vmstat -D选项

一次性显示磁盘统计数据.


[root@danaly ~]# vmstat -D
21 disks
15 partitions
149249 total reads
97607 merged reads
5202390 read sectors
581748 milli reading
787084 writes
713833 merged writes
28436523 written sectors
15105557 milli writing
0 inprogress IO
7204 milli spent IO

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论