[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache and php resource consumption



Hello,

I am trying to set up a system so I can monitor the cpu and memory usage of apache processes, in particular of pages containing php scripts, because sometimes it happens that some apache processes eat up a machine. What I want are numbers to show to the people writing the programms.

I'm thinking of reading /proc/self/statm or /proc/self/status in a php script automatically appended to each request and writing the results to a logfile.

But I'm not shure how to interpret the output - what I am looking for is a way - if at all possible - to get the amount of memory used by the apache chield, by the php script (since it's the same process might be difficult) and the cpu time of the request (I guess I could also get that from the apache logs).

This is for machines running apache 1.3.20 and php 4.0.6.

Has someone gone into this before? Am I missing something?
Any pointers are appreciated!

Greetings,

Vinai



Reply to: