Error with command iotop on CentOS
Clash Royale CLAN TAG#URR8PPP
up vote
12
down vote
favorite
When using sudo iotop
(latest version 0.6-2.el7
) in a terminal in my newly installed CentOS 7.5, I get the following error message:
Traceback (most recent call last):
File "/sbin/iotop", line 17, in <module>
main()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 620, in main
main_loop()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 610, in <lambda>
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 508, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 501, in run_iotop_window
ui.run()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 155, in run
self.process_list.duration)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 434, in refresh_display
lines = self.get_data()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 415, in get_data
return list(map(format, processes))
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 388, in format
cmdline = p.get_cmdline()
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 292, in get_cmdline
proc_status = parse_proc_pid_status(self.pid)
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 196, in parse_proc_pid_status
key, value = line.split(':t', 1)
ValueError: need more than 1 value to unpack
Any idea how to fix this problem?
centos python iotop
add a comment |Â
up vote
12
down vote
favorite
When using sudo iotop
(latest version 0.6-2.el7
) in a terminal in my newly installed CentOS 7.5, I get the following error message:
Traceback (most recent call last):
File "/sbin/iotop", line 17, in <module>
main()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 620, in main
main_loop()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 610, in <lambda>
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 508, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 501, in run_iotop_window
ui.run()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 155, in run
self.process_list.duration)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 434, in refresh_display
lines = self.get_data()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 415, in get_data
return list(map(format, processes))
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 388, in format
cmdline = p.get_cmdline()
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 292, in get_cmdline
proc_status = parse_proc_pid_status(self.pid)
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 196, in parse_proc_pid_status
key, value = line.split(':t', 1)
ValueError: need more than 1 value to unpack
Any idea how to fix this problem?
centos python iotop
add a comment |Â
up vote
12
down vote
favorite
up vote
12
down vote
favorite
When using sudo iotop
(latest version 0.6-2.el7
) in a terminal in my newly installed CentOS 7.5, I get the following error message:
Traceback (most recent call last):
File "/sbin/iotop", line 17, in <module>
main()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 620, in main
main_loop()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 610, in <lambda>
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 508, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 501, in run_iotop_window
ui.run()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 155, in run
self.process_list.duration)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 434, in refresh_display
lines = self.get_data()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 415, in get_data
return list(map(format, processes))
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 388, in format
cmdline = p.get_cmdline()
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 292, in get_cmdline
proc_status = parse_proc_pid_status(self.pid)
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 196, in parse_proc_pid_status
key, value = line.split(':t', 1)
ValueError: need more than 1 value to unpack
Any idea how to fix this problem?
centos python iotop
When using sudo iotop
(latest version 0.6-2.el7
) in a terminal in my newly installed CentOS 7.5, I get the following error message:
Traceback (most recent call last):
File "/sbin/iotop", line 17, in <module>
main()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 620, in main
main_loop()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 610, in <lambda>
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 508, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 501, in run_iotop_window
ui.run()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 155, in run
self.process_list.duration)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 434, in refresh_display
lines = self.get_data()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 415, in get_data
return list(map(format, processes))
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 388, in format
cmdline = p.get_cmdline()
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 292, in get_cmdline
proc_status = parse_proc_pid_status(self.pid)
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 196, in parse_proc_pid_status
key, value = line.split(':t', 1)
ValueError: need more than 1 value to unpack
Any idea how to fix this problem?
centos python iotop
edited Jun 29 at 9:49
asked May 29 at 7:24
F. Privé
16316
16316
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
25
down vote
accepted
Apparently, recent kernel versions introduced a blank line in /proc/(pid)/status
that iotop does not expect:
CapBnd: 0000001fffffffff
CapAmb: 0000000000000000
Seccomp: 0
SpeculationStoreBypass: vulnerable
As a zeroth approximation of a fix, edit (as root) /usr/lib/python2.7/site-packages/iotop/data.py
ca l.195:
def parse_proc_pid_status(pid):
result_dict =
try:
for line in open('/proc/%d/status' % pid):
if not line.strip(): continue
key, value = line.split(':t', 1)
result_dict[key] = value.strip()
except IOError:
pass # No such process
return result_dict
where the if not line.strip(): continue
is new. Beware that python does not have explicit braces, so the indentation of this line should match that of the line below it.
(Also see https://bugs.launchpad.net/pkg-website/+bug/1773383 for other fixes for this bug.)
1
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Same for "Pympler" Python package. Line 147. Addif not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pympler
â Eduardo Lucio
Jun 12 at 18:02
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
25
down vote
accepted
Apparently, recent kernel versions introduced a blank line in /proc/(pid)/status
that iotop does not expect:
CapBnd: 0000001fffffffff
CapAmb: 0000000000000000
Seccomp: 0
SpeculationStoreBypass: vulnerable
As a zeroth approximation of a fix, edit (as root) /usr/lib/python2.7/site-packages/iotop/data.py
ca l.195:
def parse_proc_pid_status(pid):
result_dict =
try:
for line in open('/proc/%d/status' % pid):
if not line.strip(): continue
key, value = line.split(':t', 1)
result_dict[key] = value.strip()
except IOError:
pass # No such process
return result_dict
where the if not line.strip(): continue
is new. Beware that python does not have explicit braces, so the indentation of this line should match that of the line below it.
(Also see https://bugs.launchpad.net/pkg-website/+bug/1773383 for other fixes for this bug.)
1
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Same for "Pympler" Python package. Line 147. Addif not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pympler
â Eduardo Lucio
Jun 12 at 18:02
add a comment |Â
up vote
25
down vote
accepted
Apparently, recent kernel versions introduced a blank line in /proc/(pid)/status
that iotop does not expect:
CapBnd: 0000001fffffffff
CapAmb: 0000000000000000
Seccomp: 0
SpeculationStoreBypass: vulnerable
As a zeroth approximation of a fix, edit (as root) /usr/lib/python2.7/site-packages/iotop/data.py
ca l.195:
def parse_proc_pid_status(pid):
result_dict =
try:
for line in open('/proc/%d/status' % pid):
if not line.strip(): continue
key, value = line.split(':t', 1)
result_dict[key] = value.strip()
except IOError:
pass # No such process
return result_dict
where the if not line.strip(): continue
is new. Beware that python does not have explicit braces, so the indentation of this line should match that of the line below it.
(Also see https://bugs.launchpad.net/pkg-website/+bug/1773383 for other fixes for this bug.)
1
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Same for "Pympler" Python package. Line 147. Addif not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pympler
â Eduardo Lucio
Jun 12 at 18:02
add a comment |Â
up vote
25
down vote
accepted
up vote
25
down vote
accepted
Apparently, recent kernel versions introduced a blank line in /proc/(pid)/status
that iotop does not expect:
CapBnd: 0000001fffffffff
CapAmb: 0000000000000000
Seccomp: 0
SpeculationStoreBypass: vulnerable
As a zeroth approximation of a fix, edit (as root) /usr/lib/python2.7/site-packages/iotop/data.py
ca l.195:
def parse_proc_pid_status(pid):
result_dict =
try:
for line in open('/proc/%d/status' % pid):
if not line.strip(): continue
key, value = line.split(':t', 1)
result_dict[key] = value.strip()
except IOError:
pass # No such process
return result_dict
where the if not line.strip(): continue
is new. Beware that python does not have explicit braces, so the indentation of this line should match that of the line below it.
(Also see https://bugs.launchpad.net/pkg-website/+bug/1773383 for other fixes for this bug.)
Apparently, recent kernel versions introduced a blank line in /proc/(pid)/status
that iotop does not expect:
CapBnd: 0000001fffffffff
CapAmb: 0000000000000000
Seccomp: 0
SpeculationStoreBypass: vulnerable
As a zeroth approximation of a fix, edit (as root) /usr/lib/python2.7/site-packages/iotop/data.py
ca l.195:
def parse_proc_pid_status(pid):
result_dict =
try:
for line in open('/proc/%d/status' % pid):
if not line.strip(): continue
key, value = line.split(':t', 1)
result_dict[key] = value.strip()
except IOError:
pass # No such process
return result_dict
where the if not line.strip(): continue
is new. Beware that python does not have explicit braces, so the indentation of this line should match that of the line below it.
(Also see https://bugs.launchpad.net/pkg-website/+bug/1773383 for other fixes for this bug.)
edited May 29 at 8:54
answered May 29 at 8:40
Ulrich Schwarz
8,82512643
8,82512643
1
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Same for "Pympler" Python package. Line 147. Addif not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pympler
â Eduardo Lucio
Jun 12 at 18:02
add a comment |Â
1
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Same for "Pympler" Python package. Line 147. Addif not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pympler
â Eduardo Lucio
Jun 12 at 18:02
1
1
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Here is a link to the CentOS bug covering this issue: bugs.centos.org/view.php?id=14864
â doshea
Jun 2 at 6:06
Same for "Pympler" Python package. Line 147. Add
if not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pymplerâ Eduardo Lucio
Jun 12 at 18:02
Same for "Pympler" Python package. Line 147. Add
if not entry.strip(): continue
before to solve that problem. pythonhosted.org/Pymplerâ Eduardo Lucio
Jun 12 at 18:02
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446624%2ferror-with-command-iotop-on-centos%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password