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

add flush request and time spend flushing diskstats for kernel 5.5+ #289

Merged
merged 2 commits into from
May 12, 2020

Conversation

binjip978
Copy link
Contributor

@binjip978 binjip978 commented May 8, 2020

Signed-off-by: binjip978 [email protected]

Copy link
Collaborator

@pgier pgier left a comment

Choose a reason for hiding this comment

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

LGTM

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 {
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

@pgier @SuperQ thoughts?

Copy link
Collaborator

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.

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.

Ok that works for me as well. Thanks! LGTM

@discordianfish discordianfish merged commit 7a44272 into prometheus:master May 12, 2020
@binjip978 binjip978 deleted the add-disk-stats branch May 12, 2020 16:18
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
…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]>
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.

3 participants