ioping 命令是一种完全不同的工具,但是它可以报告磁盘延迟——也就是磁盘响应请求需要多长时间,而这有助于诊断磁盘问题。
$ sudo ioping /dev/sda1 4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=1 time=960.2 us (warmup) 4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=2 time=841.5 us 4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=3 time=831.0 us 4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=4 time=1.17 ms ^C --- /dev/sda1 (block device 111.8 GiB) ioping statistics --- 3 requests completed in 2.84 ms, 12 KiB read, 1.05 k iops, 4.12 MiB/s generated 4 requests in 3.37 s, 16 KiB, 1 iops, 4.75 KiB/s min/avg/max/mdev = 831.0 us / 947.9 us / 1.17 ms / 158.0 us
atop
atop 命令,像 top 一样提供了大量有关系统性能的信息,包括有关磁盘活动的一些统计信息。
ATOP - butterfly 2018/12/26 17:24:19 37d3h13m------ 10ed PRC | sys 0.03s | user 0.01s | #proc 179 | #zombie 0 | #exit 6 | CPU | sys 1% | user 0% | irq 0% | idle 199% | wait 0% | cpu | sys 1% | user 0% | irq 0% | idle 99% | cpu000 w 0% | CPL | avg1 0.00 | avg5 0.00 | avg15 0.00 | csw 677 | intr 470 | MEM | tot 5.8G | free 223.4M | cache 4.6G | buff 253.2M | slab 394.4M | SWP | tot 2.0G | free 2.0G | | vmcom 1.9G | vmlim 4.9G | DSK | sda | busy 0% | read 0 | write 7 | avio 1.14 ms | NET | transport | tcpi 4 | tcpo stall 8 | udpi 1 | udpo 0swout 2255 | NET | network | ipi 10 | ipo 7 | ipfrw 0 | deliv 60.67 ms | NET | enp0s25 0% | pcki 10 | pcko 8 | si 1 Kbps | so 3 Kbp0.73 ms | -
PID SYSCPU USRCPU VGROW RGROW ST EXC THR S CPUNR CPU CMD 1/1673e4 | 3357 0.01s 0.00s 672K 824K -- - 1 R 0 0% atop 3359 0.01s 0.00s 0K 0K NE 0 0 E - 0% <ps> 3361 0.00s 0.01s 0K 0K NE 0 0 E - 0% <ps> 3363 0.01s 0.00s 0K 0K NE 0 0 E - 0% <ps> 31357 0.00s 0.00s 0K 0K -- - 1 S 1 0% bash 3364 0.00s 0.00s 8032K 756K N- - 1 S 1 0% sleep 2931 0.00s 0.00s 0K 0K -- - 1 I 1 0% kworker/u8:2-e 3356 0.00s 0.00s 0K 0K -E 0 0 E - 0% <sleep> 3360 0.00s 0.00s 0K 0K NE 0 0 E - 0% <sleep> 3362 0.00s 0.00s 0K 0K NE 0 0 E - 0% <sleep>
如果你只想查看磁盘统计信息,则可以使用以下命令轻松进行管理:
$ atop | grep DSK DSK | sda | busy 0% | read 122901 | write 3318e3 | avio 0.67 ms | DSK | sdb | busy 0% | read 1168 | write 103 | avio 0.73 ms | DSK | sda | busy 2% | read 0 | write 92 | avio 2.39 ms | DSK | sda | busy 2% | read 0 | write 94 | avio 2.47 ms | DSK | sda | busy 2% | read 0 | write 99 | avio 2.26 ms | DSK | sda | busy 2% | read 0 | write 94 | avio 2.43 ms | DSK | sda | busy 2% | read 0 | write 94 | avio 2.43 ms | DSK | sda | busy 2% | read 0 | write 92 | avio 2.43 ms | ^C
了解磁盘 I/O (编辑:宜春站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|