disk: implement IOCountersWithContext for AIX nocgo via iostat#2033
Merged
shirou merged 2 commits intoshirou:masterfrom Mar 29, 2026
Merged
disk: implement IOCountersWithContext for AIX nocgo via iostat#2033shirou merged 2 commits intoshirou:masterfrom
shirou merged 2 commits intoshirou:masterfrom
Conversation
bd01d1b to
749ce99
Compare
There was a problem hiding this comment.
Pull request overview
Implements an AIX !cgo (nocgo) fallback for disk I/O counters by parsing iostat -d, replacing the previous ErrNotImplementedError stub, and refactors UsageWithContext parsing to match mountpoints more reliably while avoiding repeated mount subprocess calls.
Changes:
- Implement
IOCountersWithContextfor AIX nocgo by parsingiostat -dand returning per-diskReadBytes/WriteBytes. - Add a helper to build a device→fstype map from
mountoutput and use it inUsageWithContext. - Fix
UsageWithContextparsing to match thePath/mountpoint column and handle-values more robustly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
749ce99 to
efa2e76
Compare
efa2e76 to
be66821
Compare
30 tasks
This was referenced Apr 23, 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.
Summary
Replaces the
ErrNotImplementedErrorstub forIOCountersWithContexton the AIX nocgo path with a real implementation that parsesiostat -doutput.Returns
ReadBytesandWriteBytesfor each disk by parsing the KB read/written columns and converting to bytes.The CGO path already has a perfstat-based implementation (merged via #2016). This provides the nocgo fallback for environments where CGO is not available.
Only affects AIX nocgo path — no cross-platform changes.