CPU,Memory,I/O and NetFlowの表示



  
  
  
  
  1. iostat   I/O  
  2.  
  3. [root@localhost ~]# iostat -d -x 2  
  4.                              extended device statistics 
  5. device mgr/s mgw/s    r/s    w/s    kr/s    kw/s   size queue   wait svc_t  %b  
  6. hda        0     0    0.0    0.9     0.1     5.4    6.3   0.0    4.7   0.9   0  
  7.                              extended device statistics 
  8. device mgr/s mgw/s    r/s    w/s    kr/s    kw/s   size queue   wait svc_t  %b  
  9. hda        0     3    0.0    2.0     0.0    20.0   10.0   0.0    0.8   0.5   0  
  10.  ......  
  11.  
  12. :   I/0  ,  
  13.  
  14. [root@localhost ~]# vmstat 5  
  15. procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------  
  16.  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st  
  17.  0  0    284  68700 165876 416748    0    0     0     5    1    1  0  0 100  0  0  
  18.  ......  
  19.  
  20. :  CPU ,   5  ,  CPU   
  21. top   
  22.  
  23. [root@localhost ~]# top 
  24.  
  25.  top  shift+p or P  
  26.  
  27. top - 13:38:52 up 102 days,  4:17,  1 user,  load average: 0.00, 0.00, 0.00  
  28. Tasks:  81 total,   2 running,  79 sleeping,   0 stopped,   0 zombie  
  29. Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st  
  30. Mem:   1035292k total,   966592k used,    68700k free,   165876k buffers  
  31. Swap:  2096472k total,      284k used,  2096188k free,   416760k cached  
  32.  
  33.   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  
  34.  4875 root      15   0  2192 1000  800 R  0.3  0.1   0:00.15 top 
  35.     1 root      15   0  2060  620  532 S  0.0  0.1   0:01.65 init  
  36.     2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0  
  37. .......  
  38.  
  39. :  ,  
  40. free   
  41.  
  42. [root@localhost ~]# free 
  43.              total       used       free     shared    buffers     cached  
  44. Mem:       1035292     966592      68700          0     165876     416768  
  45. -/+ buffers/cache:     383948     651344  
  46. Swap:      2096472        284    2096188  
  47.  
  48. :   
  49. top   
  50.  
  51. [root@localhost ~]# top 
  52.  
  53.  top  shift+m or M  
  54.  
  55. top - 13:48:52 up 102 days,  4:27,  1 user,  load average: 0.00, 0.01, 0.00  
  56. Tasks:  81 total,   2 running,  79 sleeping,   0 stopped,   0 zombie  
  57. Cpu(s):  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st  
  58. Mem:   1035292k total,   966592k used,    68700k free,   165876k buffers  
  59. Swap:  2096472k total,      284k used,  2096188k free,   416784k cached  
  60.  
  61.   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  
  62.  4128 root      34  19  280m 266m 2112 S  0.0 26.4   1:48.40 yum-updatesd  
  63.  8314 www       18   0  171m  34m  34m S  0.0  3.4   0:06.03 memcacheq  
  64.  8280 www       15   0 88084  34m  588 S  0.0  3.4   0:01.23 memcached  
  65. 10907 mysql     15   0  122m  16m 3892 S  0.0  1.7   0:25.29 mysqld  
  66. ......  
  67.  
  68. :  ,  
  69.  Interface   
  70.  
  71. [root@localhost ~]# date;ifconfig eth0  
  72. Sun Mar 13 13:51:29 CST 2011  
  73. eth0      Link encap:Ethernet  HWaddr 00:50:56:A4:0D:89  
  74.           inet addr:172.10.7.215  Bcast:172.10.7.255  Mask:255.255.248.0  
  75.           inet6 addr: fe80::250:56ff:fea4:d89/64 Scope:Link  
  76.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
  77.           RX packets:72113071 errors:12213 dropped:30790 overruns:0 frame:0  
  78.           TX packets:1062902 errors:0 dropped:0 overruns:0 carrier:0  
  79.           collisions:0 txqueuelen:1000  
  80.           RX bytes:3311165612 (3.0 GiB)  TX bytes:101244262 (96.5 MiB)  
  81.           Interrupt:59 Base address:0x2000  
  82.  
  83. [root@localhost ~]# date;ifconfig eth0  
  84. Sun Mar 13 13:53:13 CST 2011  
  85. eth0      Link encap:Ethernet  HWaddr 00:50:56:A4:0D:89  
  86.           inet addr:172.10.7.215  Bcast:172.10.7.255  Mask:255.255.248.0  
  87.           inet6 addr: fe80::250:56ff:fea4:d89/64 Scope:Link  
  88.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
  89.           RX packets:72113528 errors:12213 dropped:30790 overruns:0 frame:0  
  90.           TX packets:1062968 errors:0 dropped:0 overruns:0 carrier:0  
  91.           collisions:0 txqueuelen:1000  
  92.           RX bytes:3311204659 (3.0 GiB)  TX bytes:101285190 (96.5 MiB)  
  93.           Interrupt:59 Base address:0x2000  
  94.  
  95. :   RX   TX   Interface