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.

Revisions

  1. boynoiz created this gist Mar 28, 2019.
    2 changes: 2 additions & 0 deletions check_apache_mem_usage_per_process.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #!/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) }'