Created
July 30, 2024 08:51
-
-
Save eric-glb/4fd6aced3521248b9e196c92d0d8ca95 to your computer and use it in GitHub Desktop.
List swapped out processes
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
| ( | |
| echo -e "Name\tPID\tSwap\n----\t---\t----" | |
| for file in /proc/*/status; do | |
| awk '/^(VmSwap|Name|Pid):/{printf $2 " " $3}END{ print ""}' $file 2>/dev/null | |
| done | sort -k 3 -n -r | head -20 | |
| ) | column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment