Skip to content

Instantly share code, notes, and snippets.

@sayem314
Created September 30, 2016 14:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save sayem314/4ba869d7fde06369570644b46e5e499f to your computer and use it in GitHub Desktop.
Save sayem314/4ba869d7fde06369570644b46e5e499f to your computer and use it in GitHub Desktop.
processs memory check on linux
#!/bin/bash
ps -C $1 -O rss | awk '{ count ++; sum += $2 }; END {count --; print "Number of processes =",count; print "Memory usage per process =",sum/1024/count, "MB"; print "Total memory usage =", sum/1024, "MB" ;};'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment