I have an apache module that we use. What we would like to do is measure the number of requests the module has served in a day. I know we can grep the acess_log or error_log and immediately know the number. I would like to do have some kind of counter inside the apache module itself and log it with every request. But this is not practical because the stock installation of apache uses 5 processes by default and so the apache module will be loaded into each process separately and so the counter will be meaningless. Also these helper processes can be restarted as needed.
Is there a way I can achieve this? There is obviously only one httpd process listening on port 80 and then it forwards the request to one of the helper process, right? If so can I have that process have a counter and increment it and log it with every request while forwarding?
There must be a better solution for this.
Thanks
-P