码迷,mamicode.com
首页 > 系统相关 > 详细

linux工具类之系统性能监测

时间:2014-10-09 19:24:17      阅读:250      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   ar   strong   sp   div   2014   

内存监测每2s以M,K,B为单位分别显示
[root@221-comecs mnt]# free -s2 -m total used free shared buffers cached Mem: 995 562 433 0 95 337 -/+ buffers/cache: 129 866 Swap: 1635 0 1635 total used free shared buffers cached Mem: 995 562 433 0 95 337 -/+ buffers/cache: 129 866 Swap: 1635 0 1635 [root@221-comecs mnt]# free -s2 total used free shared buffers cached Mem: 1019820 575496 444324 0 97448 345320 -/+ buffers/cache: 132728 887092 Swap: 1675256 0 1675256 total used free shared buffers cached Mem: 1019820 575504 444316 0 97448 345320 -/+ buffers/cache: 132736 887084 Swap: 1675256 0 1675256 [root@221-comecs mnt]# free -s2 -b total used free shared buffers cached Mem: 1044295680 589180928 455114752 0 99786752 353607680 -/+ buffers/cache: 135786496 908509184 Swap: 1715462144 0 1715462144 total used free shared buffers cached Mem: 1044295680 589189120 455106560 0 99786752 353607680 -/+ buffers/cache: 135794688 908500992 Swap: 1715462144 0 1715462144

[root@109-com1 asterisk]# watch -n1 -d free
Every 1.0s: free                                                                                                                     Thu Oct  9 14:53:01 2014

             total       used       free     shared    buffers     cached
Mem:       1019820     933400      86420          0     112452     515660
-/+ buffers/cache:     305288     714532
Swap:      1675256        456    1674800
[root@109-com1 asterisk]# watch -d vmstat
Every 2.0s: vmstat                                                                                                                   Thu Oct  9 14:58:28 2014

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    456  74072 112636 527608    0    0     0    17   21   40  0  0 99  0  0

[root@250-shiyan bin]# ps aux|head -1;ps aux|sort -rnk6|head  以RSS即第六列为准由大到小排序

 

linux工具类之系统性能监测

标签:style   blog   color   io   ar   strong   sp   div   2014   

原文地址:http://www.cnblogs.com/createyuan/p/4013694.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!