开发者

How to see more "detailed" apache/php processes

开发者 https://www.devze.com 2023-02-06 15:28 出处:网络
Some times Apache\'s CPU usage goes high on my server... recently, I saw something like 20 PHP process 开发者_Go百科running at same time.

Some times Apache's CPU usage goes high on my server... recently, I saw something like 20 PHP process 开发者_Go百科running at same time. I need a tool to see what script each instance is running - something better than apache server-status. A friend told me to use Zabbix.

I need see what scripts are running... that's all!


I think it would be better to use an code tracer in PHP to see what causes a high load in Apache. Check Xdebug.org


The Apache log will tell you what URLs have been accessed, as well as other useful information such as the response time for each request.

If you're concerned that certain pages are running slowly, use an Apache log analysis tool to filter the hits by response time. This should give you a fairly clear idea of which page(s) are causing a problem for you. There are any number of tools available to analyse Apache logs, ranging from web-based Analytics tools aimed at tracking your visitor demographics to more technical analysis tools. I can't really recommend any one in particular, so I'll just suggest using google for this. You'll get plenty of results.

Once you know which pages to investigate, you should then try profiling the pages in question, to see which functions are causing the bottleneck. XDebug is the de-facto tool for this with PHP. (It is a full PHP debugger, complete with the ability to step through code line-by-line, and integration into most of the popular IDEs.

0

精彩评论

暂无评论...
验证码 换一张
取 消