-
Notifications
You must be signed in to change notification settings - Fork 323
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
add flush request and time spend flushing diskstats for kernel 5.5+ #289
Conversation
Signed-off-by: binjip978 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
blockdevice/stats.go
Outdated
if err != nil && err != io.EOF { | ||
return diskstats, err | ||
} | ||
if d.IoStatsCount == 14 || d.IoStatsCount == 18 { | ||
if d.IoStatsCount == 14 || d.IoStatsCount == 18 || d.IoStatsCount == 20 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this condition. I'd rather check if it's at least 14 or just get rid of it altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that would be better assuming that sscanf doesn't fail on more than 20 fields.
Signed-off-by: binjip978 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that works for me as well. Thanks! LGTM
…rometheus#289) * add flush request and time spend flushing diskstats for kernel 5.5+ Signed-off-by: binjip978 <[email protected]> * add diskstats if at least 14 params are present Signed-off-by: binjip978 <[email protected]>
Signed-off-by: binjip978 [email protected]