cyberj / phptop

PHP basic ressource profiler (CPU/memory), safe and useful for production sites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phptop (c) 2009,2010,2011 Bearstech - http://bearstech.com/

phptop prints per query and average metrics comparable to 'time' (wallclock,
user and system CPU time) along with memory and other ressource usages.

It can be easily globally activated on a LAMP server and requires little
ressources and a single line configuration change in your php.ini.

Requires PHP >= 4.3.10 or PHP >= 5.0.3.

Homepage, more documentation and updates:

  http://forge.bearstech.com/trac/wiki/PhpTop

Example usage:

  server:~# echo auto_prepend_file=/path/to/phptop_hook.php >>/etc/php/php.ini
  server:~# apache2ctl reload

  (Wait at least a few minutes to collect data...)

  server:~# phptop -s mem
  URL                                       Hit     Time     User      Sys >Mem/hit  Mem_max
  http://blog.dummy.com/facebook/myapi/       5      0.8      0.5      0.1      6.2     31.0
  http://blog.dummy.com/feed                 10      1.0      0.8      0.1      6.0     30.2
  http://blog.dummy.com/feed/                10      1.2      1.0      0.0      6.0     30.2
  http://blog.dummy.com/tag/peekk/            5      0.6      0.5      0.0      6.2     30.8
  http://blog.dummy.com/2008/09/              5      0.9      0.6      0.1      6.2     31.0
  http://test.org/rss.xml                    10      0.6      0.5      0.1      5.2     25.8
  http://test.org/cron.php                    5      0.6      0.3      0.0      5.2     26.2
  http://test.org/                            5      4.3      0.2      0.1      5.3     26.5
  http://test.org/user/register               5      0.5      0.3      0.0      5.1     25.5
  http://test.org/page/welcome                5      0.7      0.2      0.1      5.0     25.0
  Total (from last 10 min)                 1140     95.9     27.0      3.7


Thanks for your participation:

 * Marc Dequènes aka Duck

About

PHP basic ressource profiler (CPU/memory), safe and useful for production sites

License:GNU General Public License v3.0


Languages

Language:Perl 59.7%Language:Groff 30.8%Language:PHP 7.9%Language:Makefile 1.6%