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

来源:互联网 发布:淘宝网址转换微信 编辑:程序博客网 时间:2024/04/28 10:33
iostat:可以实时列出整个CPU与存储设备的I/O状态。
-c 仅显示CPU的状态。
-d 仅显示存储设备的状态,不可以与-c一起用。
-k 默认显示的是block,这里可以改成KB的大小来显示。
-m 与-k类似,只是以MB的单位来显示结果。

-t 显示日期出来。


[root@linux oracle]# iostat -cLinux 2.6.18-164.el5 (linux)    2011年11月23日avg-cpu:  %user   %nice %system %iowait  %steal   %idle           0.10    0.01    0.91    0.85    0.00   98.12[root@linux oracle]# iostat -dLinux 2.6.18-164.el5 (linux)    2011年11月23日Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtnsda               3.26        59.01        44.69     811111     614260sda1              0.01         0.13         0.00       1846          4sda2              0.01         0.11         0.00       1471          0sda3              3.24        58.74        44.69     807370     614256[root@linux oracle]# iostatLinux 2.6.18-164.el5 (linux)    2011年11月23日avg-cpu:  %user   %nice %system %iowait  %steal   %idle           0.10    0.01    0.91    0.85    0.00   98.12Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtnsda               3.26        59.00        44.69     811111     614348sda1              0.01         0.13         0.00       1846          4sda2              0.01         0.11         0.00       1471          0sda3              3.24        58.73        44.69     807370     614344[root@linux oracle]# iostat -kLinux 2.6.18-164.el5 (linux)    2011年11月23日avg-cpu:  %user   %nice %system %iowait  %steal   %idle           0.10    0.01    0.91    0.85    0.00   98.12Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda               3.26        29.50        22.35     405555     307222sda1              0.01         0.07         0.00        923          2sda2              0.01         0.05         0.00        735          0sda3              3.24        29.36        22.35     403685     307220[root@linux oracle]# iostat -mtLinux 2.6.18-164.el5 (linux)    2011年11月23日Time: 12时11分46秒avg-cpu:  %user   %nice %system %iowait  %steal   %idle           0.10    0.01    0.91    0.85    0.00   98.12Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtnsda               3.26         0.03         0.02        396        300sda1              0.01         0.00         0.00          0          0sda2              0.01         0.00         0.00          0          0sda3              3.24         0.03         0.02        394        300

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


原创粉丝点击