I am using apache and I want to log each php or any script file with its location which runs for more than 30 seconds or so. I tried to find solutions extensively, but no luck has come true. Is this possible in apache using any native or any opensource third part script? Please help, thanks.
Asked
Active
Viewed 164 times
1 Answers
0
Have you tried changing your Apache log format by adding %T/%D ? For a start this will add the seconds & microseconds that a request took.
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" **%T/%D**" combined
As far as logging each php script and how long it took, have a look through the code provided on this solution at using getrusage. Let me know if that helps at all.
https://stackoverflow.com/questions/535020/tracking-the-script-execution-time-in-php