2

I want to monitor the execution time and memory usage for my web application running on Nginx + FPM. To that end, I am generating execution time and memory data in the page footer. I can also insert this into the FPM error log file, to be read later :

error_log("Performance Execution=$execution, Memory=$memory");

The data obtained from the /var/log/php-fpm.log file is as follows:

raijin log # tail -f php-fpm.log | grep "Performance"
[02-Mar-2013 17:48:57] WARNING: [pool www] child 5546 said into stderr: "NOTICE: PHP message: Performance Execution=0.076794, Memory=11.276"
[02-Mar-2013 17:48:58] WARNING: [pool www] child 5547 said into stderr: "NOTICE: PHP message: Performance Execution=0.075967, Memory=11.276"
[02-Mar-2013 17:49:30] WARNING: [pool www] child 5548 said into stderr: "NOTICE: PHP message: Performance Execution=0.085233, Memory=11.276"
[02-Mar-2013 17:49:33] WARNING: [pool www] child 5549 said into stderr: "NOTICE: PHP message: Performance Execution=0.077445, Memory=10.672"
[02-Mar-2013 17:49:35] WARNING: [pool www] child 5546 said into stderr: "NOTICE: PHP message: Performance Execution=0.075163, Memory=10.044"

I want to collect this information and log it using something like collectd or MRTG. So my question is :

  1. Is there a better way to log performance details to be read later by collectd or MRTG?
  2. How to pull this data into the logging programs?
Rohit
  • 300
  • 1
  • 7

0 Answers0