用 iotop 查看每个进程的磁盘读写
实时找出是哪个进程在大量读写硬盘,定位系统变慢的原因。
运行 sudo iotop -o -a,只显示当前正在读写磁盘的进程,并显示累计读写量。
01命令
命令
$ sudo iotop -o -a02作用说明
iotop 相当于磁盘版的 top,它利用内核的 taskstats 接口按读写速率排列进程。-o 参数会隐藏空闲进程,只列出真正在读写磁盘的;-a 则显示自启动以来的累计读写量而不是瞬时速率。用它很容易发现是备份任务、文件索引还是某个失控的进程在拖慢系统。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- iotop(8) — Debian manpage依据: Debian manpage for iotop documents -o (only show processes actually doing I/O) and -a (accumulated I/O) options
- iotop(8) — Arch Linux manual依据: Arch manual describes iotop's --only (-o) option to show only processes or threads actually doing I/O
最后验证: 2026-09-19 · 分类: 系统与设置