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

Parsing /proc/diskstats: better detection of unused block devices #3

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

kcgthb
Copy link
Member

@kcgthb kcgthb commented Apr 12, 2022

The format of /proc/diskstats has changed over the years:
Until kernel 4.17 there were 14 fields (which this code assumed)
Since 4.18 there are 18 fields, since 5.5 there are 20 fields.

Assume unused devices have all fields zero.

Closes #1.
Closes #5.
Closes #7.

ISSUE TYPE
  • New plugin pull-request
  • Feature pull-request
  • Bugfix pull-request
  • Docs pull-request
DSTAT VERSION
<!--- Paste verbatim output from “dstat --version” here -->
SUMMARY
<!--- Paste verbatim command output here, e.g. before and after your change -->

The format of /proc/diskstats has changed over the years:
Until kernel 4.17 there were 14 fields (which this code assumed)
Since 4.18 there are 18 fields, since 5.5 there are 20 fields.

Assume unused devices have all fields zero.

Closes scottchiefbaker#1.
Closes scottchiefbaker#5.
Closes scottchiefbaker#7.
@kcgthb kcgthb merged commit 0c98277 into stanford-rc:master Apr 13, 2022
@leahneukirchen leahneukirchen deleted the fix-disk-wait branch June 5, 2023 15:35
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