Repository navigation
fix(zfs): use a live iostat sample instead of a since-boot average - #640
Merged
Merged
Conversation
ahoogerhuis
marked this pull request as ready for review
September 26, 2026 16:18
VVelox
requested changes
Oct 11, 2026
Collaborator
There was a problem hiding this comment.
This totally kills the ability to use it as a extend as it will result in a timeout. Docs need updated to reflect the output of this needs update to dump the results to a file and read via /bin/cat /var/cache/zfs.extend.
zpool iostat with no interval returns a since-boot average, not a live reading. Sampling a real interval costs about two seconds per pool, which is too slow to run directly as an extend, so -w writes the output to a file for SNMPD to cat and -q silences stdout for cron. Made with help from Claude
ahoogerhuis
force-pushed
the
bugs/zfs-iostat-live-sample
branch
from
October 12, 2026 06:38
3099ecf to
bfd8600
Compare
Contributor
Author
|
@VVelox Added -w, -q and -o defaulting to /var/cache/zfs.extend, written atomically. |
Collaborator
|
thanks! |
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zpool iostat without -y/interval reports a since-boot average, not current activity - stale scrub_wait/trim_wait long after activity stops. Changed to
-y -l -q -p -H <pool> 2 1for a live sample.Already running in our production fleet. Developed with Claude's assistance; reviewed, I take responsibility for correctness.