Skip to content

Instantly share code, notes, and snippets.

@dynax60
Created April 10, 2014 11:33
Show Gist options
  • Save dynax60/10371343 to your computer and use it in GitHub Desktop.
Save dynax60/10371343 to your computer and use it in GitHub Desktop.
Apache
# ps -ylC httpd --sort:rss
S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 48 12279 1432 0 80 0 5076 4071 - ? 00:00:00 httpd
S 48 11996 1432 0 80 0 5096 4074 - ? 00:00:00 httpd
S 48 11998 1432 0 80 0 5116 4074 - ? 00:00:00 httpd
S 48 11999 1432 0 80 0 5116 4074 - ? 00:00:00 httpd
S 48 10235 1432 0 80 0 5124 4074 - ? 00:00:00 httpd
S 48 7275 1432 0 80 0 5136 4074 - ? 00:00:00 httpd
S 48 7353 1432 0 80 0 5136 4071 - ? 00:00:00 httpd
S 48 8730 1432 0 80 0 5148 4074 - ? 00:00:00 httpd
S 48 7276 1432 0 80 0 5160 4071 - ? 00:00:00 httpd
S 48 10233 1432 0 80 0 5172 4074 - ? 00:00:00 httpd
S 48 7274 1432 0 80 0 5176 4074 - ? 00:00:00 httpd
S 48 10234 1432 0 80 0 5180 4074 - ? 00:00:00 httpd
S 48 4789 1432 0 80 0 5196 4074 - ? 00:00:01 httpd
S 48 5928 1432 0 80 0 5204 4071 - ? 00:00:01 httpd
S 48 4648 1432 0 80 0 5220 4074 - ? 00:00:01 httpd
S 48 8153 1432 0 80 0 5220 4074 - ? 00:00:00 httpd
S 48 4651 1432 0 80 0 5224 4074 - ? 00:00:01 httpd
S 48 5929 1432 0 80 0 5236 4074 - ? 00:00:01 httpd
S 48 4650 1432 0 80 0 5260 4071 - ? 00:00:01 httpd
S 48 4660 1432 0 80 0 5292 4074 - ? 00:00:01 httpd
S 0 1432 1 0 80 0 5760 4006 - ? 00:00:00 httpd
# 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)}'
Apache Memory Usage (MB): 106.055
Average Proccess Size (MB): 5.05022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment