Skip to content

sysfs: skip thermal for ENODATA#300

Merged
pgier merged 1 commit intoprometheus:masterfrom
pgier:handle-thermal-zones-enodata
May 27, 2020
Merged

sysfs: skip thermal for ENODATA#300
pgier merged 1 commit intoprometheus:masterfrom
pgier:handle-thermal-zones-enodata

Conversation

@pgier
Copy link
Collaborator

@pgier pgier commented May 22, 2020

In some cases the value of <thermal_zoneX>/temp will return
ENODATA. If this is the case, we should just skip this zone
and continue reading the rest of the zones.

Fixes #293

Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Not sure why codespell complains but seems unrelated:

./fixtures.ttar:2003: hda ==> had
./cpuinfo_test.go:104: sie ==> size, sigh
./proc_fdinfo.go:44: structed ==> structured

@brian-brazil
Copy link
Contributor

@SuperQ mentioned in another PR that the version of codespell updated.

@SuperQ
Copy link
Member

SuperQ commented May 25, 2020

Pushed the fix for codespell here: #301

@pgier pgier force-pushed the handle-thermal-zones-enodata branch from 9e1b5ca to 29bdec2 Compare May 26, 2020 18:48
@pgier
Copy link
Collaborator Author

pgier commented May 26, 2020

Rebased, and the tests seem good now.

In some cases the value of <thermal_zoneX>/temp will return
ENODATA.  If this is the case, we should just skip this zone
and continue reading the rest of the zones.

Fixes prometheus#293

Signed-off-by: Paul Gier <pgier@redhat.com>
@pgier pgier force-pushed the handle-thermal-zones-enodata branch from 29bdec2 to ea166e0 Compare May 27, 2020 13:46
@pgier pgier requested a review from SuperQ May 27, 2020 13:48
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pgier pgier merged commit 562ee69 into prometheus:master May 27, 2020
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle thermal zones which return ENODATA for temp

4 participants