Skip to content

Instantly share code, notes, and snippets.

@mdoyle13
Created May 16, 2018 13:55
Show Gist options
  • Save mdoyle13/773bb47791eef2fc7b2e50dfcb7fdb15 to your computer and use it in GitHub Desktop.
Save mdoyle13/773bb47791eef2fc7b2e50dfcb7fdb15 to your computer and use it in GitHub Desktop.
Get the memory usage of a running process
# see below, change 'process-name' to the name of the process you want to get the memory usage of (in MB)
ps -eo rss,pid,euser,args:100 --sort %mem | grep -v grep | grep -i process-name | awk '{printf $1/1024 "MB"; $1=""; print }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment