我想找到系统中IOPS最高的进程。我应该怎么办 ?
答案1
要找到每秒输入/输出操作数 (IOPS) 最高的进程,您可以使用多种 CLI 工具(sar
我想到了),但我喜欢奥托普最好的。它具有类似顶部的文本模式 UI,显示当前和总 IOPS 以及每个进程每秒读/写字节数和 IO 使用百分比。
iotop
存在于大多数软件包存储库中。
TUI 模式下的控件非常简单:
Left and right arrows to change the sorting column, r to invert the
sorting order, o to toggle the --only option, p to toggle the --processes
option, a to toggle the --accumulated option, i to change I/O priority, q to
quit, any other key to force a refresh.
您还可以iotop
使用命令行选项作为 CLI 工具调用:
-o, --only only show processes or threads actually doing I/O
-b, --batch non-interactive mode
-n NUM, --iter=NUM number of iterations before ending [infinite]
-d SEC, --delay=SEC delay between iterations [1 second]
-p PID, --pid=PID processes/threads to monitor [all]
-u USER, --user=USER users to monitor [all]
-P, --processes only show processes, not all threads
-a, --accumulated show accumulated I/O instead of bandwidth
-k, --kilobytes use kilobytes instead of a human friendly unit
-t, --time add a timestamp on each line (implies --batch)
-q, --quiet suppress some lines of header (implies --batch)