磁盘使用情况是否有“top”

磁盘使用情况是否有“top”

如何top在 shell 中以唯一正确的系统方式实时跟踪磁盘使用情况(写入/读取和其他有趣的东西)?

如果它可以监视特定目录那就太酷了。

答案1

有一个工具(top类似)可以跟踪 I/O:

iotop -oPa

在此处输入图片描述

$ apt-cache show iotop
(...)
Description-en: simple top-like I/O monitor
 iotop does for I/O usage what top(1) does for CPU usage. It watches I/O
 usage information output by the Linux kernel and displays a table of
 current I/O usage by processes on the system. It is handy for answering
 the question "Why is the disk churning so much?".
 .
 iotop can only run under a Linux 2.6.20 or later kernel built with the
 CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING and
 CONFIG_VM_EVENT_COUNTERS build config options on.
Homepage: http://guichaz.free.fr/iotop/

相关内容