Kernel 5.5 breaks python psutil 5.6.7

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Kernel 5.5 breaks python psutil 5.6.7

Postby tettertot » Feb 23rd, '20, 01:03

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
tettertot
 
Posts: 2
Joined: May 17th, '18, 06:21

Re: Kernel 5.5 breaks python psutil 5.6.7

Postby doktor5000 » Feb 23rd, '20, 02:03

Thanks for sharing that information, you should probably report a bug for that: https://wiki.mageia.org/en/How_to_report_a_bug_properly
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Kernel 5.5 breaks python psutil 5.6.7

Postby tettertot » Feb 23rd, '20, 23:12

Done! Not sure why that wasn't my first idea before posting here...
tettertot
 
Posts: 2
Joined: May 17th, '18, 06:21

Re: Kernel 5.5 breaks python psutil 5.6.7

Postby doktor5000 » Feb 23rd, '20, 23:37

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron