Created
April 28, 2021 13:11
-
-
Save gxovano/23a671514ce0f1b3d4fdb44f753c169c to your computer and use it in GitHub Desktop.
List used swap by process name
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
| #!/bin/bash | |
| pgrep $1 | while read line ; do | |
| grep --color Name /proc/$line/status; | |
| grep --color -E "^Pid*" /proc/$line/status; | |
| grep --color VmSwap /proc/$line/status ; | |
| echo "- - - - - -" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment