Skip to content
Discussion options

You must be logged in to vote

Great question! On modern kernels (Linux 4.20+), checking Pressure Stall Information (PSI) via /proc/pressure/memory is much more reliable than static free memory percentages because it measures actual execution stall times during memory contention and paging.

Here is a clean pattern you can use in shell scripts:

#!/usr/bin/env bash
if [[ -f /proc/pressure/memory ]]; then
    # avg10 indicates percentage of time tasks were stalled on memory over last 10 seconds
    awk '/some/ {print $2}' /proc/pressure/memory
fi

We plan to integrate PSI metrics into system_info.sh in an upcoming update.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amitpadhan525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants