question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

disk_io_counters() fails on Linux kernel 4.19

See original GitHub issue

When running on 4.19.0-1.el7.elrepo.x86_6, calling disk_io_counters() raises ValueError:

(psutil_venv) -bash-4.2$ python
Python 3.6.2 (default, Apr 24 2018, 04:27:15) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.__version__
'5.4.7'
>>> psutil.disk_io_counters()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/9ld/psutil_venv/lib/python3.6/site-packages/psutil/__init__.py", line 2017, in disk_io_counters
    rawdict = _psplatform.disk_io_counters(**kwargs)
  File "/home/9ld/psutil_venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1117, in disk_io_counters
    for entry in gen:
  File "/home/9ld/psutil_venv/lib/python3.6/site-packages/psutil/_pslinux.py", line 1090, in read_procfs
    raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line '   8      16 sdb 147 0 9545 368 3 0 4096 17 0 352 385 0 0 0 0\n'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
qxocommented, Jan 6, 2019

temporary fix for python 2.7:

sed -i  's#flen == 14:#flen == 14 or flen == 18:#g'  /usr/local/lib/python2.7/dist-packages/psutil/_pslinux.py
2reactions
gozdalcommented, Dec 17, 2018

@giampaolo yes, latest git version works. Do you have any plans on releasing a new version to PyPI?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux 4.19.232 - LWN.net
I'm announcing the release of the 4.19.232 kernel. All users of the 4.19 kernel series must upgrade. The updated 4.19.y git tree can...
Read more >
AM3354: Error compiling SGX module with kernel 4.19.y
Part Number: AM3354 Hi, I'm starting a new project and I've upgraded my kernel from 4.19.79 to 4.19.227 cloing the TI git repository ......
Read more >
Linux 4.19-rc4 released, an apology, and a maintainership note
From: Linus Torvalds <torvalds@linux-foundation.org> To: Linux Kernel ... fix amdgpu_mn_unlock() in the CS error path drm/amdgpu: fix error handling in ...
Read more >
CVEs in Stream 4.19 - Linux Kernel CVEs
Security Tracker for the Linux Kernel. Provides details, fixed versions, and CVSS scores for CVEs affecting the Linux Kernel.
Read more >
Backport from Kernel Version 4.19 to 4.14 fails
0 exactly. wo@xyz:~/Documents/backports$ ./gentree.py --integrate --clean --verbose --gitdebug ~/Documents/linux/ ~/Documents ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found