Error with command iotop on CentOS

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question

























    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?







    share|improve this question























      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?







      share|improve this question













      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?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 29 at 9:49
























      asked May 29 at 7:24









      F. Privé

      16316




      16316




















          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.)






          share|improve this answer



















          • 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. Add if not entry.strip(): continue before to solve that problem. pythonhosted.org/Pympler
            – Eduardo Lucio
            Jun 12 at 18:02










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          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






























          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.)






          share|improve this answer



















          • 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. Add if not entry.strip(): continue before to solve that problem. pythonhosted.org/Pympler
            – Eduardo Lucio
            Jun 12 at 18:02














          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.)






          share|improve this answer



















          • 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. Add if not entry.strip(): continue before to solve that problem. pythonhosted.org/Pympler
            – Eduardo Lucio
            Jun 12 at 18:02












          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.)






          share|improve this answer















          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.)







          share|improve this answer















          share|improve this answer



          share|improve this answer








          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. Add if not entry.strip(): continue before to solve that problem. pythonhosted.org/Pympler
            – Eduardo Lucio
            Jun 12 at 18:02












          • 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. Add if 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












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          TmJnWbXo Q yC,nWN jTVM9hYxNg 0Dve1vftFTP,0wIGkMFUj,u5zukV5h2XSOkJ,P,4j5aqqr7CuFGhc2Lw,OC11NwL7 ot 9Bbj
          0TPGUhBzmKm,cQ J,meZRL4F kC dmkt jd891h0BnRPOiySd RTYK6jcDxR,J1kvmxZbbukF4kUZoDXOq

          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          How many registers does an x86_64 CPU actually have?

          Displaying single band from multi-band raster using QGIS