Created
May 29, 2019 06:22
-
-
Save Josh5/72c91d0719de13da293171790ec80c79 to your computer and use it in GitHub Desktop.
Calculate process memory use
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 | |
# | |
# Credit: http://cloudinservice.com/tune-apache-performance-using-mpm-prefork-module/ | |
# | |
ps -ylC ${1} | awk '{x += $8;y += 1} END {print "Process Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment