Linux命令:实时列出整个CPU与存储设备的I/O状态(iostat)


iostat:可以实时列出整个CPU与存储设备的I/O状态。
-c 仅显示CPU的状态。
-d 仅显示存储设备的状态,不可以与-c一起用。
-k 默认显示的是block,这里可以改成KB的大小来显示。
-m 与-k类似,只是以MB的单位来显示结果。

-t 显示日期出来。

  1. [root@linux Oracle]# iostat -c  
  2. Linux 2.6.18-164.el5 (linux)    20111123日  
  3.   
  4. avg-cpu:  %user   %nice %system %iowait  %steal   %idle  
  5.            0.10    0.01    0.91    0.85    0.00   98.12  
  6.   
  7. [root@linux oracle]# iostat -d  
  8. Linux 2.6.18-164.el5 (linux)    20111123日  
  9.   
  10. Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn  
  11. sda               3.26        59.01        44.69     811111     614260  
  12. sda1              0.01         0.13         0.00       1846          4  
  13. sda2              0.01         0.11         0.00       1471          0  
  14. sda3              3.24        58.74        44.69     807370     614256  
  15.   
  16. [root@linux oracle]# iostat  
  17. Linux 2.6.18-164.el5 (linux)    20111123日  
  18.   
  19. avg-cpu:  %user   %nice %system %iowait  %steal   %idle  
  20.            0.10    0.01    0.91    0.85    0.00   98.12  
  21.   
  22. Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn  
  23. sda               3.26        59.00        44.69     811111     614348  
  24. sda1              0.01         0.13         0.00       1846          4  
  25. sda2              0.01         0.11         0.00       1471          0  
  26. sda3              3.24        58.73        44.69     807370     614344  
  27.   
  28. [root@linux oracle]# iostat -k  
  29. Linux 2.6.18-164.el5 (linux)    20111123日  
  30.   
  31. avg-cpu:  %user   %nice %system %iowait  %steal   %idle  
  32.            0.10    0.01    0.91    0.85    0.00   98.12  
  33.   
  34. Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn  
  35. sda               3.26        29.50        22.35     405555     307222  
  36. sda1              0.01         0.07         0.00        923          2  
  37. sda2              0.01         0.05         0.00        735          0  
  38. sda3              3.24        29.36        22.35     403685     307220  
  39.   
  40. [root@linux oracle]# iostat -mt  
  41. Linux 2.6.18-164.el5 (linux)    20111123日  
  42.   
  43. Time: 121146秒  
  44. avg-cpu:  %user   %nice %system %iowait  %steal   %idle  
  45.            0.10    0.01    0.91    0.85    0.00   98.12  
  46.   
  47. Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn  
  48. sda               3.26         0.03         0.02        396        300  
  49. sda1              0.01         0.00         0.00          0          0  
  50. sda2              0.01         0.00         0.00          0          0  
  51. sda3              3.24         0.03         0.02        394        300  

说明:显示目前整个系统CPU和存储设备的状态。
tps:平均每秒钟的传送次数。
Blk_read/s:开机到现在平均的读取单位。
Blk_wrtn/s:开机到现在平均的写入单位。
Blk_read:开机到现在总共读出来的文件单位。
Blk_wrtn:开机到现在总共写入的文件单位。

相关内容