linuxidc@linuxidc:~/www.linuxidc.com/Linux公社$ sudo ioping /dev/sda1
[sudo] linuxidc 的密码:
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=1 time=937.0 us (warmup)
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=2 time=5.90 ms
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=3 time=3.94 ms
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=4 time=3.88 ms
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=5 time=6.37 ms
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=6 time=5.72 ms
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=7 time=958.4 us (fast)
4 KiB <<< /dev/sda1 (block device 30.0 GiB): request=8 time=93.3 us (fast)
atop命令和top一样,提供了很多关于系统性能的信息,包括一些关于磁盘活动的统计信息。
linuxidc@linuxidc:~/www.linuxidc.com/Linux公社$ atop
ATOP - linuxidc 2018/12/29 13:57:54 -------------- 10s elapsed
PRC | sys 2.05s | user 1.93s | #proc 337 | #zombie 1 | #exit 12 |
CPU | sys 9% | user 22% | irq 0% | idle 68% | wait 0% |
CPL | avg1 0.55 | avg5 0.24 | avg15 0.13 | csw 25241 | intr 4509 |
MEM | tot 2.8G | free 128.9M | cache 840.2M | buff 123.1M | slab 191.8M |
SWP | tot 1.4G | free 1.0G | | vmcom 5.2G | vmlim 2.8G |
PAG | scan 6661 | steal 5565 | stall 0 | swin 6 | swout 123 |
DSK | sda | busy 112% | read 71 | write 134 | avio 46.2 ms |
NET | transport | tcpi 390 | tcpo 370 | udpi 104 | udpo 104 |
NET | network | ipi 494 | ipo 474 | ipfrw 0 | deliv 494 |
NET | ens33 0% | pcki 753 | pcko 402 | si 614 Kbps | so 43 Kbps |
NET | lo ---- | pcki 72 | pcko 72 | si 4 Kbps | so 4 Kbps |
如果您只想查看磁盘统计信息,可以使用以下命令轻松管理:
linuxidc@linuxidc:~/www.linuxidc.com/Linux公社$ atop | grep DSK
DSK | sda | busy 100% | read 163221 | write 43826 | avio 63.9 ms |
DSK | sda | busy 86% | read 12 | write 77 | avio 93.7 ms |
DSK | sda | busy 104% | read 3 | write 40 | avio 231 ms |
DSK | sda | busy 108% | read 110 | write 306 | avio 21.7 ms |
Linux提供了足够的命令,可以让您深入了解磁盘运行的难度,并帮助您专注于潜在的问题或减速。 希望其中一个命令可以告诉您在询问磁盘性能时需要知道的内容。 偶尔使用这些命令有助于确保在需要检查时特别忙或慢的磁盘是显而易见的。