-
-
Save alekstrust/b941850228617ca50633ffb861ce9b5f to your computer and use it in GitHub Desktop.
processs memory check on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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