Skip to content

Instantly share code, notes, and snippets.

@ajeebkp23
Created May 27, 2020 17:54
Show Gist options
  • Save ajeebkp23/a8a6284e92e57c61574aa89afa4c1e64 to your computer and use it in GitHub Desktop.
Save ajeebkp23/a8a6284e92e57c61574aa89afa4c1e64 to your computer and use it in GitHub Desktop.
Memory used per process
ps -eo size,pid,user,command --sort -size | \
awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |\
cut -d "" -f2 | cut -d "-" -f1
# Find gunicorn specific
ps -eo size,pid,user,command --sort -size | \
awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |\
cut -d "" -f2 | cut -d "-" -f1 | grep gunicorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment