Skip to content

Instantly share code, notes, and snippets.

@gxovano
Created April 28, 2021 13:11
Show Gist options
  • Select an option

  • Save gxovano/23a671514ce0f1b3d4fdb44f753c169c to your computer and use it in GitHub Desktop.

Select an option

Save gxovano/23a671514ce0f1b3d4fdb44f753c169c to your computer and use it in GitHub Desktop.
List used swap by process name
#!/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