Christie Christie - 1 year ago 91
Linux Question

How to see which PHP script is consuming the most memory?

I'm trying to see which of my PHP scripts uses the most memory and CPU when it's viewed by a browser. I can only find methods like

that show per-process usage, but I need it narrowed down for a particular PHP script. Is there any way to do this?

Answer Source

If you want to see how much memory a particular PHP script uses you can use the memory_get_usage function listed here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download