Fix running and blocked process count for AIX#2019
Merged
shirou merged 2 commits intoshirou:masterfrom Mar 8, 2026
Merged
Conversation
…ix-load-misc-procs-running
shirou
approved these changes
Mar 8, 2026
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.
Update the
load.Miscimplementation on AIX to fix running and blocked process number.SACTIVEmeans active in memory, but it includes sleeping processes, so the current implementation is not correct, it basically counts every process (and only counts processes, while I believe the Linux implementation rather counts threads).SSTOPmeans stopped by a signal, not blocked on IO.The PR fixes the two fields to correctly count active and blocked processes:
perfstatfor blocked onesStill getting processes and threads one at a time for simplicity, it could be improved to reduce the number of calls.
https://www.ibm.com/docs/en/aix/7.1.0?topic=g-getthrds-subroutine
https://www.ibm.com/docs/en/aix/7.3.0?topic=p-perfstat-cpu-total-subroutine
https://www.ibm.com/docs/en/aix/7.3.0?topic=files-libperfstath-file