Skip to content

Instantly share code, notes, and snippets.

@redsfyre
Last active November 5, 2021 14:13
Show Gist options
  • Save redsfyre/98545ed291a317816309e5b8c6392e89 to your computer and use it in GitHub Desktop.
Save redsfyre/98545ed291a317816309e5b8c6392e89 to your computer and use it in GitHub Desktop.
The command that gives the memory usage of the named application in mb (WIP)
appname= XX;
for line in $(ps -e -orss=,args= | sort -b -k1 -nr | grep $appname | cut -d' ' -f1);
do
declare -i mem; mem="$line/1024"; echo "$mem M";
done
@redsfyre
Copy link
Author

redsfyre commented Nov 5, 2021

It works like sh*t;

1158 M
981 M
715 M
488 M
485 M
380 M
368 M
364 M
357 M
311 M
122 M
44 M
40 M

(Firefox btw)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment