Last active
July 24, 2022 11:29
-
-
Save daubac402/5e380f9e067c190181005a6481bdabf5 to your computer and use it in GitHub Desktop.
Calculate the current Apache memory usage and Average proccess size
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
# You can change httpd to apache, apache2, ... that match with your env | |
ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache 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
In my case, i ussually set these if I have 2 GB RAM for httpd (prefolk):
2 x 1024 / 66 (max mem is used by a httpd process) = 31 => 30
To check what is your current Server MPM, run
httpd -V | grep -i mpm