How to find total apache memory usage?
Top only show the memory usage for individual processes. Apache often runs hundreds of processes, each of which may use only a small amount of memory, however the total memory consumed by all apache processes can be fairly large.
Is there a way to see the total memory usage for all apache processes? |
Are you familiar with perl? The info here might help if you are.
|
I am familiar with perl but don't use it myself (I'm a python man), that script looks cool though. I tried to run it and got an error related to `use Statistics::Descriptive;`, a module I don't have I assume.
|
Wellll .... in that case, try this.
Much better - handles shared libraries. |
Code:
ps aux| awk '/apach[e]/{total+=$4}END{print total}' |
Using the python script recommended by syg00 I get
Code:
Private + Shared = RAM used Program |
That is because the script takes into account the (common) shared libraries that most utilities count multiple times.
Memory accounting is a real can of worms - try looking at this for example. |
Quote:
Thanks for all your replies. |
All times are GMT -5. The time now is 02:05 AM. |