[RHEL5] iotop command is not working
Environment
- Red Hat Enterprise Linux 5.5 and earlier
Issue
- Executing the iotop command gives below python traceback.
[root@server log]# iotop
Traceback (most recent call last):
File "/usr/bin/iotop", line 16, in ?
main()
File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 567, in main
main_loop()
File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 557, in <lambda>
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 465, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib64/python2.4/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 457, in run_iotop_window
process_list = ProcessList(taskstats_connection, options)
File "/usr/lib/python2.4/site-packages/iotop/data.py", line 375, in __init__
self.update_process_counts()
File "/usr/lib/python2.4/site-packages/iotop/data.py", line 431, in update_process_counts
stats = self.taskstats_connection.get_single_task_stats(thread)
File "/usr/lib/python2.4/site-packages/iotop/data.py", line 158, in get_single_task_stats
reply = self.connection.recv()
File "/usr/lib/python2.4/site-packages/iotop/netlink.py", line 229, in recv
raise err
OSError: Netlink error: Invalid argument (22)
Resolution
- Upgrade the kernel at least to the version 2.6.18-238 (Red Hat Enterprise Linux 5.6)
Root Cause
- While the iotop package is available to install, your current kernel does not have the support for the iotop functionality.
Diagnostic Steps
- Run
uname -r
and check if the kernel version is lower than 2.6.18-238
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments