in reply to Re^4: CPU Usage by VirtualHost
in thread CPU Usage by VirtualHost

It just seems odd to me because there's no real communication that I can see about this between apache and the OS. The OS has no concept of a request, so why would it be waiting for the request to finish?

Replies are listed 'Best First'.
Re^6: CPU Usage by VirtualHost
by tdevil76 (Beadle) on Jun 11, 2007 at 19:41 UTC
    There is no direct communication between apache and the OS, but there is some point in the lifespan of the process that the OS is told to update the /proc/$pid/stats file with the cpu usage of the process and any child processes... Whatever this trigger may be, it does not occur until the apache process is reset and waiting for the next request to come in. I think if I could find out what triggers that update, I could force an update of the stats before the end of the request, and see the cpu usage.