feat(agent): send the pressure (PSI) of the CPU, the memory and the disk - #47
Merged
Merged
Conversation
nabil1440
added this pull request to stack #38
September 24, 2026 06:06
nabil1440
marked this pull request as ready for review
September 24, 2026 06:07
nabil1440
force-pushed
the
agent/42-pressure
branch
from
September 24, 2026 08:09
1c66bc3 to
567cf8b
Compare
Contract v0.4.0, "Pressure (PSI)": the share of the minute in which at least one task waited, from the "some" total of /proc/pressure, and its peak within the minute. null without PSI, in the first sample, after a reboot and after a counter went back. Closes #42
nabil1440
force-pushed
the
agent/42-pressure
branch
from
September 24, 2026 08:14
567cf8b to
b2b99af
Compare
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.
Closes #42.
Part of the monitoring agent stack. This PR is on top of #46. Contract v0.4.0, "Pressure (PSI)".
What changes
/proc/pressure/cpu,/proc/pressure/memoryand/proc/pressure/io. It uses thetotal=counter of thesomeline, notavg10oravg60.cpu_pressure_percent,memory_pressure_percentandio_pressure_percent, each with a_max_percentpeak. A value is the microseconds of wait divided by the microseconds between two readings, times 100, from 0 to 100.nullwhen the kernel has no PSI (the agent writes one warning), in the first sample, after a reboot, after a reading older than 90 seconds, and after a counter went back.Tests
/proc/pressure, a reboot, a counter that went back, an old reading, the first sample, a restart, and a reading without PSI.make checkpasses.