Created
February 1, 2018 19:29
-
-
Save jason-idk/04fb09ef9d6de78cc699f5dd93878a4d to your computer and use it in GitHub Desktop.
Good starting point to begin calculating max clients for apache... Or just finding the average amount of memory used by a process.
This file contains 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
### Calculate the average apache process memory size… ### | |
ps --no-headers -o "rss,cmd" -C httpd | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }' | |
Example with output: | |
# ps --no-headers -o "rss,cmd" -C apache2 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }' | |
10M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment