Shoutbox

Calculating PHP script resource usage - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Calculating PHP script resource usage (/showthread.php?tid=90658)

Calculating PHP script resource usage by Mike on 05-16-2009 at 04:27 PM

Hey, is there a way to calculate how many resources a PHP scripts uses (especially CPU usage) other than checking how long it takes for the script to execute?

Thanks :)


RE: Calculating PHP script resource usage by Dr4g0n on 05-16-2009 at 08:35 PM

Run a resource monitor at the same time?

Presumably you're running it on a webserver, do you have shell access aswell? If so, you could run 'top' while executing the PHP script to monitor resource changes.