Skip to content

feat(agent): send the pressure (PSI) of the CPU, the memory and the disk - #47

Merged
nabil1440 merged 2 commits into
agent/41-peaksfrom
agent/42-pressure
Sep 28, 2026
Merged

nabil1440 merged 2 commits into
agent/41-peaksfrom
agent/42-pressure

Conversation

@nabil1440

@nabil1440 nabil1440 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #42.

Part of the monitoring agent stack. This PR is on top of #46. Contract v0.4.0, "Pressure (PSI)".

What changes

  • At each reading, the agent reads /proc/pressure/cpu, /proc/pressure/memory and /proc/pressure/io. It uses the total= counter of the some line, not avg10 or avg60.
  • New optional sample fields: cpu_pressure_percent, memory_pressure_percent and io_pressure_percent, each with a _max_percent peak. A value is the microseconds of wait divided by the microseconds between two readings, times 100, from 0 to 100.
  • null when 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.
  • A reading without PSI is left out, and the windows on each side of it join.
  • The saved reading keeps the PSI counters, so the first sample after a restart continues.

Tests

  • The parser, the values and the peaks, no /proc/pressure, a reboot, a counter that went back, an old reading, the first sample, a restart, and a reading without PSI.
  • make check passes.

@nabil1440
nabil1440 added this pull request to stack #38 September 24, 2026 06:06
@nabil1440 nabil1440 changed the title agent/42 pressure feat(agent): send the pressure (PSI) of the CPU, the memory and the disk Sep 24, 2026
@nabil1440
nabil1440 marked this pull request as ready for review September 24, 2026 06:07
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
nabil1440 merged commit ee5ee2d into develop Sep 28, 2026
1 of 2 checks passed
@nabil1440
nabil1440 deleted the agent/42-pressure branch September 28, 2026 03:26
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.

feature: Send the pressure (PSI) of the CPU, the memory and the disk

1 participant