Skip to content

Disk check fails in kernel 5.5+ #6240

Description

@SerialVelocity

I think this will be fixed by upgrading psutil to 5.7.0 (the release notes state that kernel 5.5 added two more fields which broke disk_io_counters)

Describe what happened:
Disk check not working in kernel 5.5+

2020-04-02 15:22:46 UTC | CORE | ERROR | (pkg/collector/runner/runner.go:292 in work) | Error running check disk: [{"message": "not sure how to interpret line '   8       0 sda 3243674 885162 2087107447 37513715 10525918 1142798 251099536 95120395 0 11322428 126936986 0 0 0 0 4462277 56879516\\n'", "traceback": "Traceback (most recent call last):\n  File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\", line 713, in run\n    self.check(instance)\n  File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/disk/disk.py\", line 121, in check\n    self.collect_latency_metrics()\n  File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/disk/disk.py\", line 244, in collect_latency_metrics\n    for disk_name, disk in iteritems(psutil.disk_io_counters(True)):\n  File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/psutil/__init__.py\", line 2168, in disk_io_counters\n    rawdict = _psplatform.disk_io_counters(**kwargs)\n  File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/psutil/_pslinux.py\", line 1125, in disk_io_counters\n    for entry in gen:\n  File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/psutil/_pslinux.py\", line 1098, in read_procfs\n    raise ValueError(\"not sure how to interpret line %r\" % line)\nValueError: not sure how to interpret line '   8       0 sda 3243674 885162 2087107447 37513715 10525918 1142798 251099536 95120395 0 11322428 126936986 0 0 0 0 4462277 56879516\\n'\n"}]

Describe what you expected:
Disk check to work

Steps to reproduce the issue:
Try to run the check on kernel 5.5+

Additional environment details (Operating System, Cloud provider, etc):
Using Fedora CoreOS 31.20200223.3.0 with kernel 5.5.5-200.fc31.x86_64
Bare Metal host
Using datadog-agent 7 in kubernetes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions