环境:
- 系统: Ubuntu 20.04 x64
- 内核: 5.15.0
- 软件: python版iotop
iotop
描述:
升级最新内核(更新软件包)后, 监控系统IO负载出了问题, (异常信息)描述如下
CONFIG_TASK_DELAY_ACCT not enabled in kernel, cannot determine SWAPIN and IO %
分析:
Starting with Linux kernel 5.14.x task_delayacct is configurable at
runtime and set to off by default. This setting can be changed in
interactive mode by the Ctrl-T shortcut. In batch mode a warning is
printed when the setting is OFF. From the command line this can be
enabled or disabled.
从 Linux 内核 5.14.x 开始,task_delayacct 可在运行时配置并默认设置为关闭。可以通过 Ctrl-T
快捷键在交互模式下更改此设置(指的是iotop-c中, 而不是python版的iotop)。在批处理模式下,当设置为 OFF
时会打印警告。通过命令行方式可以开启或者关闭相关选项。
It is advisable to keep this option off when not using this or another
monitoring program because when enabled it has some effect on system
performance. 建议在不使用此或其他监视程序时关闭此选项,因为启用时 它对系统性能有一些影响。
解决方法:
方法1. 命令行开启对应内核选项设置
➜ ~ sudo sysctl kernel.task_delayacct=1
➜ ~ iotop --version
iotop 0.6
➜ ~ sudo iotop -o -P -a
sudo sysctl kernel.task_delayacct=0
方法2. iotop-c 交互窗口修改[未测试]
在iotop-c(C语言实现的版本)对应的交互窗口中, Ctrl+T
切换配置开关
参考:
- https://www.mankier.com/8/iotop-c
- https://github.com/NixOS/nixpkgs/issues/160361
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)