Re: Logging CPU / Memory usage

2010-05-20 Thread F10
I created a module, http://paste.org/pastebin/view/18743 apxs2 -c -i mod_foo.c LoadModule myhits_module /usr/lib/apache2/modules/mod_foo.so LogFormat "%{cpu}n" rusage CustomLog /tmp/access.log rusage The problem is when I run this http://paste.org/pastebin/view/18744 script the first time, the

Re: Logging CPU / Memory usage

2010-05-20 Thread Ben Noordhuis
You are updating global variables in code that is run concurrently. It might work OK with the pre-fork MPM but it certainly won't with the threaded MPM.

Re: Logging CPU / Memory usage

2010-05-20 Thread F10
Yes, this module don't work with the threaded. How can I get a correct data, when the request will be completed. May be there is another hook that is called after the completed request. On Thu, May 20, 2010 at 09:42:01PM +0200, Ben Noordhuis wrote: > You are updating global variables in code that