Skip to content

Instantly share code, notes, and snippets.

@domargan
Created July 21, 2016 14:46
Show Gist options
  • Save domargan/48650e2ff69d6e7b14d256c6d4cdbf05 to your computer and use it in GitHub Desktop.
Save domargan/48650e2ff69d6e7b14d256c6d4cdbf05 to your computer and use it in GitHub Desktop.
Display how much memory a process is using
while true; do ps -eo rss,pid,euser,args:100 --sort %mem | grep -v grep | grep -i $@ | awk '{printf $1/1024 "MB"; $1=""; print }' ; sleep 0.5s ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment