Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some disks doesnt report device speed correctly, crashing script execution #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ARPABoy
Copy link

@ARPABoy ARPABoy commented Sep 2, 2023

Some disks doesnt report device speed correctly when pd_device_speed metric assigns a string value: "Unknown" script execution crashes in that case assign a 0 speed value.

…vice_speed metric a string value: Unknown, script execution crashes, in that case assign a 0 speed value.

Signed-off-by: kr0m <[email protected]>
@dswarbrick
Copy link
Member

My gut feeling is that transforming an "unknown" value to a value of zero is going to obscure cases where disks are spun-down, and truly have a rotational speed of zero. I think it would be better to simply omit the metric if it is not a valid numeric value (which can be tested with isnumeric()).

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.

2 participants