Skip to content

Instantly share code, notes, and snippets.

@boynoiz
Created March 28, 2019 07:29
Show Gist options
  • Save boynoiz/9bdfc6be4861ae986ca279b1c5405125 to your computer and use it in GitHub Desktop.
Save boynoiz/9bdfc6be4861ae986ca279b1c5405125 to your computer and use it in GitHub Desktop.
#!/bin/sh
ps -ylC apache2 --sort:rss | awk '{ s += $8; } END { print "Average Size:", s/(NR-1)/1024, "MB,", NR-1, "Processes, Total usage:", (s/(NR-1)/1024)*(NR-1), "MB, Max Servers:", 6500/(s/(NR-1)/1024) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment