目录
-
6.1. input/output statistics
-
-
6.1.1. 5 秒监控一次
6.2. iotop - simple top-like I/O monitor
6.3. ionice - set or get process I/O scheduling class and priority
6.4. smartd - SMART Disk Monitoring Daemon
6.1. input/output statistics
$ sudo apt-get install sysstat
iostat
$ iostat Linux 2.6.24-21-generic (netkiller) Thursday, December 04, 2008 avg-cpu: %user %nice %system %iowait %steal %idle 0.57 0.03 0.14 0.41 0.00 98.85 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 6.45 132.69 68.33 595116 306456 sda1 0.00 0.00 0.00 1606 58 sda2 0.00 0.00 0.00 820 0 sda3 2.20 1.16 17.27 1502618 22448752
sudo iostat -x 2
# iostat -x 1 avg-cpu: %user %nice %sys %idle 2.04 0.00 97.96 0.00 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util /dev/sda 0.00 633.67 3.06 102.31 24.49 5281.63 12.24 2640.82 288.89 73.67 113.89 27.22 50.00 从输出我们看到w/s=102,wKB/s=2640.所以2640/102=23KB per I/O. 因此对于连续I/O系统来说我们要关注系统读取大量数据的能力即KB per request.对于随机I/O系统我们注重IOPS值.
6.1.1. 5 秒监控一次
iostat -d 5
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。