Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there any tool that would give me memory usage statistics over the last 5 minutes for each individual PHP script on the server?

On average /var/foo.php used that much CPU and RAM over the last 5 minutes, etc.

share|improve this question
You could always modify your script to setup a register_shutdown_handler which sends that output of memory_get_usage to something you like. –  Zoredache Nov 9 '11 at 2:55
Well, that would require to modify every script on the server. Therefore, not a solution. –  Guy Nov 9 '11 at 11:17
Not really, see the ini auto_prepend_file setting. –  Zoredache Nov 9 '11 at 16:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.