![AlmaLinux 8 上缺少 SWAPIN 和 IO 列的 iotop 字段](https://linux22.com/image/217543/AlmaLinux%208%20%E4%B8%8A%E7%BC%BA%E5%B0%91%20SWAPIN%20%E5%92%8C%20IO%20%E5%88%97%E7%9A%84%20iotop%20%E5%AD%97%E6%AE%B5.png)
我用来iotop
监控磁盘活动,在 AlmaLinux 8 系统上,iotop
没有所有字段。
以下是有关 AlmaLinux 8 的专栏
PID PRIO USER DISK READ DISK WRITE> COMMAND
以下是有关 CentOS 6/7 的专栏
PID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
如何让iotop
默认显示SWAPIN和IO>。
当我运行以下命令时,它也显示不可用:
[root@alma8-dev test]# iotop -botqk
18:22:09 Total DISK READ : 0.00 K/s | Total DISK WRITE : 0.00 K/s
18:22:09 Actual DISK READ: 0.00 K/s | Actual DISK WRITE: 0.00 K/s
TIME TID PRIO USER DISK READ DISK WRITE SWAPIN IO COMMAND
18:22:11 Total DISK READ : 0.00 K/s | Total DISK WRITE : 0.00 K/s
18:22:11 Actual DISK READ: 0.00 K/s | Actual DISK WRITE: 0.00 K/s
18:22:12 Total DISK READ : 0.00 K/s | Total DISK WRITE : 64.94 K/s
18:22:12 Actual DISK READ: 0.00 K/s | Actual DISK WRITE: 64.94 K/s
b'18:22:12 2294 be/3 root 0.00 K/s 64.94 K/s ?unavailable? d3 flusher-0 pick0 LINUX'
b'18:22:12 849204 be/4 root 0.00 K/s 0.00 K/s ?unavailable? [kworker/1:3-events]'
这是内核配置:
[root@alma8-dev test]# egrep 'CONFIG_TASK_DELAY_ACCT|CONFIG_TASK_IO_ACCOUNTING|CONFIG_TASKSTATS|CONFIG_VM_EVENT_COUNTERS' /boot/config-4.18.0-425.10.1.e_7.x86_64 CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_IO_ACCOUNTING=y CONFIG_VM_EVENT_COUNTERS=y
答案1
安装iotop-c
而不是iotop
dnf install iotop-c
运行iotop-c
,输出如下
Total DISK READ: 0.00 B/s ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ | Total DISK WRITE: 588.24 M/s ⣶⣶⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
Current DISK READ: 0.00 B/s ⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ | Current DISK WRITE: 585.24 M/s ⣿⣿⣷⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
TID PRIO USER DISK READ DISK WRITE SWAPIN IOGRAPH[IO]▽COMMAND
465 be/4 root 0.00 B/s 0.00 B/s 0.00 % 53.42 % ⣶⣤⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ kworker/u2:3+flush-253:0 ▲
6332 be/4 slee 0.00 B/s 588.24 M/s 0.00 % 21.82 % ⣀⣠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ dd █
6246 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % ⠀⠀⢀⢀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ kworker/0:1-ata_sff █
5792 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % ⢀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ kworker/0:2-events ▃
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ systemd
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ kthreadd
3 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ rcu_gp