2.3 实例3:显示指定磁盘信息
命令:iostat -d sda1
输出:
[root@CT1186 ~]# iostat-d sda1
Linux 2.6.18-128.el5(CT1186) 2013年08月23日
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda1 0.00 0.00 0.00 2658 536
说明:
2.4 实例4:显示tty和Cpu信息
命令:iostat -t
输出:
[root@CT1186 ~]# iostat-t
Linux 2.6.18-128.el5(CT1186) 2013年08月23日
Time: 14时58分35秒
avg-cpu: %user %nice %system %iowait %steal %idle
8.30 0.02 5.07 0.17 0.00 86.44
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
Sda 22.73 43.70 487.41 674035705 7517957864
sda1 0.00 0.00 0.00 2658 536
sda2 0.11 3.74 3.51 57721595 54202216
sda3 0.98 0.61 17.51 9454172 270024344
sda4 0.00 0.00 0.00 6 0
sda5 6.95 0.12 108.73 1924834 1677128808
sda6 2.20 0.18 31.22 2837260 481488712
sda7 12.48 39.04 326.44 602094508 5035113248
说明:
2.5 实例5:以M为单位显示所有信息
命令:iostat -m
输出:
[root@CT1186 ~]# iostat-m
Linux 2.6.18-128.el5(CT1186) 2013年08月23日
avg-cpu: %user %nice %system %iowait %steal %idle
8.30 0.02 5.07 0.17 0.00 86.44
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
Sda 22.72 0.02 0.24 329119 3670881
sda1 0.00 0.00 0.00 1 0
sda2 0.11 0.00 0.00 28184 26465
sda3 0.98 0.00 0.01 4616 131848
sda4 0.00 0.00 0.00 0 0
sda5 6.95 0.00 0.05 939 818911
sda6 2.20 0.00 0.02 1385 235102
sda7 12.48 0.02 0.16 293991 2458553
说明:
2.6 实例6:查看TPS和吞吐量信息
命令:iostat -d -k 1 1
输出:
[root@CT1186 ~]# iostat-d -k 1 1
Linux 2.6.18-128.el5(CT1186) 2013年08月23日
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
Sda 22.72 21.85 243.71 337017916 3758984340
sda1 0.00 0.00 0.00 1329 268
sda2 0.11 1.87 1.76 28860797 27101108
sda3 0.98 0.31 8.75 4727086 135012508
sda4 0.00 0.00 0.00 3 0
sda5 6.95 0.06 54.37 962481 838566148
sda6 2.20 0.09 15.61 1418630 240744712
sda7 12.48 19.52 163.22 301047254 2517559596
说明:
tps: 该设备每秒的传输次数(Indicatethe number of transfers per second that were issued to the device.)。“一次传输”意思是“一次I/O请求”。多个逻辑请求可能会被合并为“一次I/O请求”。“一次传输”请求的大小是未知的。
kB_read/s: 每秒从设备(drive expressed)读取的数据量;
kB_wrtn/s: 每秒向设备(driveexpressed)写入的数据量;
kB_read: 读取的总数据量;kB_wrtn:写入的总数量数据量;
这些单位都为Kilobytes。
上面的例子中,我们可以看到磁盘sda以及它的各个分区的统计数据,当时统计的磁盘总TPS是22.73,下面是各个分区的TPS。(因为是瞬间值,所以总TPS并不严格等于各个分区TPS的总和)
2.7 实例7:查看cpu状态
命令:iostat -c 1 3
输出:
[root@CT1186 ~]# iostat -c 1 3
Linux 2.6.18-128.el5(CT1186) 2013年08月23日
avg-cpu: %user %nice %system %iowait %steal %idle
8.30 0.02 5.07 0.17 0.00 86.44
avg-cpu: %user %nice %system %iowait %steal %idle
8.64 0.00 5.38 0.00 0.00 85.98
avg-cpu: %user %nice %system %iowait %steal %idle
7.62 0.00 5.12 0.50 0.00 86.75