歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux命令:實時列出整個CPU與存儲設備的I/O狀態(iostat)

Linux命令:實時列出整個CPU與存儲設備的I/O狀態(iostat)

日期:2017/2/28 16:02:29   编辑:Linux教程
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. avg-cpu: %user %nice %system %iowait %steal %idle
  4. 0.10 0.01 0.91 0.85 0.00 98.12
  5. [root@linux oracle]# iostat -d
  6. Linux 2.6.18-164.el5 (linux) 20111123
  7. Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
  8. sda 3.26 59.01 44.69 811111 614260
  9. sda1 0.01 0.13 0.00 1846 4
  10. sda2 0.01 0.11 0.00 1471 0
  11. sda3 3.24 58.74 44.69 807370 614256
  12. [root@linux oracle]# iostat
  13. Linux 2.6.18-164.el5 (linux) 20111123
  14. avg-cpu: %user %nice %system %iowait %steal %idle
  15. 0.10 0.01 0.91 0.85 0.00 98.12
  16. Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
  17. sda 3.26 59.00 44.69 811111 614348
  18. sda1 0.01 0.13 0.00 1846 4
  19. sda2 0.01 0.11 0.00 1471 0
  20. sda3 3.24 58.73 44.69 807370 614344
  21. [root@linux oracle]# iostat -k
  22. Linux 2.6.18-164.el5 (linux) 20111123
  23. avg-cpu: %user %nice %system %iowait %steal %idle
  24. 0.10 0.01 0.91 0.85 0.00 98.12
  25. Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
  26. sda 3.26 29.50 22.35 405555 307222
  27. sda1 0.01 0.07 0.00 923 2
  28. sda2 0.01 0.05 0.00 735 0
  29. sda3 3.24 29.36 22.35 403685 307220
  30. [root@linux oracle]# iostat -mt
  31. Linux 2.6.18-164.el5 (linux) 20111123
  32. Time: 121146
  33. avg-cpu: %user %nice %system %iowait %steal %idle
  34. 0.10 0.01 0.91 0.85 0.00 98.12
  35. Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
  36. sda 3.26 0.03 0.02 396 300
  37. sda1 0.01 0.00 0.00 0 0
  38. sda2 0.01 0.00 0.00 0 0
  39. 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