I'm looking for a way to observe which processes in my system are consuming an increasing amount of swap over time.

The following function generates a list of swap user per process :

sbp(){ grep VmSwap /proc/*/status 2>/dev/null | awk -F'[/ \t]+' '$3>0{print $3,$5}'| sort -nk2;}

However, I would like to continually monitor both changes to these values, and the addition of new processes which consume swap. Ideally, the output should display the cumulative change from the point that I start observing, rather than small changes from moment to moment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.