歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

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:開機到現在總共寫入的文件單位。

Copyright © Linux教程網 All Rights Reserved