Page 1 of 1

Kernel 5.5 breaks python psutil 5.6.7

PostPosted: Feb 23rd, '20, 01:03
by tettertot
After upgrading to kernel 5.5.4, Glances no longer shows disk i/o. This is a result of kernel 5.5 adding 2 additional columns to /proc/diskstats. The python module psutil 5.6.7 raises on error when trying to read these values:

Code: Select all
Python 3.7.6 (default, Jan 21 2020, 20:43:18)
[GCC 8.3.1 20190524] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.disk_io_counters(perdisk=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.7/site-packages/psutil/__init__.py", line 2168, in disk_io_counters
    rawdict = _psplatform.disk_io_counters(**kwargs)
  File "/usr/lib64/python3.7/site-packages/psutil/_pslinux.py", line 1125, in disk_io_counters
    for entry in gen:
  File "/usr/lib64/python3.7/site-packages/psutil/_pslinux.py", line 1098, in read_procfs
    raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line '   1       0 ram0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n'
>>> psutil.__version__
'5.6.7'


Python psutil 5.7 fixes this:
https://github.com/giampaolo/psutil/issues/1687

Re: Kernel 5.5 breaks python psutil 5.6.7

PostPosted: Feb 23rd, '20, 02:03
by doktor5000
Thanks for sharing that information, you should probably report a bug for that: https://wiki.mageia.org/en/How_to_report_a_bug_properly

Re: Kernel 5.5 breaks python psutil 5.6.7

PostPosted: Feb 23rd, '20, 23:12
by tettertot
Done! Not sure why that wasn't my first idea before posting here...

Re: Kernel 5.5 breaks python psutil 5.6.7

PostPosted: Feb 23rd, '20, 23:37
by doktor5000
Please also post a linkback to reported bugs in the forum thread, if others are looking for the same issue so that they can follow up on the progress for potential update candidates.
I guess this is your report? https://bugs.mageia.org/show_bug.cgi?id=26249