Let’s monitor your PHP applications with Pinba

January 31st, 2011 | by Guillaume Plessis |

Do you know Pinba? It’s a great tool and you really should use it on your LAMP platform.

Pinba is a realtime monitoring/statistics server for PHP using MySQL as a read-only interface.

It accumulates and processes data sent over UDP by multiple PHP processes and displays statistics in a nice human-readable form of simple “reports“, also providing read-only interface to the raw data in order to make possible generation of more sophisticated reports and stats.

With Pinba extension users also can measure particular parts of the code using timers with arbitrary tags.

Pinba is not a debugging tool in a common sense, since you’re not supposed to do debugging on production servers, but its main goal is to help developers to monitor performance of PHP scripts, locate bottlenecks in realtime and direct developers’ attention to the code that really needs it.

Here is a sample graph :

Pinba graphs

I’m proud to announce that Pinba is now available on Dotdeb for Debian 6.0 “Squeeze”. Once you read the Pinba features and usage, you’ll want to install those two packages :

  • pinba-mysql-engine : a custom MySQL engine to store all the gathered data efficiently. It has to be installed with the latest mysql-server packages.
  • php5-pinba : the PHP extension you’ll use to accumulate data and timers directly from your PHP scripts.

I hope you enjoy it.

Tags: , ,

  1. 8 Responses to “Let’s monitor your PHP applications with Pinba”

  2. By Puckel on Jan 31, 2011 | Reply

    Salut Gui,

    Tout d’abord merci pour le boulot ;)

    Dans les dépendances de pinba-mysql-engine, mysql-server-5.1.54-0.dotdeb.1 est requis, mais il n’est pas présent lors d’un apt-get, alors que sur le dépot, il date du 17/12.

    # apt-cache show mysql-server |grep Version
    Version: 5.1.54-0.dotdeb.0
    # cat /etc/debian_version
    6.0
    # grep dotdeb /etc/apt/sources.list
    deb http://packages.dotdeb.org stable all
    deb-src http://packages.dotdeb.org stable all
    deb http://php53.dotdeb.org stable all
    deb-src http://php53.dotdeb.org stable all

    Merci.

  3. By Puckel on Jan 31, 2011 | Reply

    Me -> []

    Je n’avais pas vu qu’il fallait utiliser :

    deb http://packages.dotdeb.org squeeze all
    deb-src http://packages.dotdeb.org squeeze all

    :)

  4. By Guillaume Plessis on Jan 31, 2011 | Reply

    @Puckel : pas de souci :)

  5. By Vangelis on Jan 31, 2011 | Reply

    This is a great tool! Thank you.

    The problem is that there are no graphical tools to display Pinba statistics, you must write your own scripts using RRDTool, There are some examples at pinba.org.

    If only there was a munin plugin…

  6. By Michael Lednev on Dec 15, 2011 | Reply

    Any chance on mysql-server-5.5 support?

  7. By Guillaume Plessis on Dec 15, 2011 | Reply

    @Michael Lednev : as soon as I fix some minor bugs in the MySQL 5.5 packaging script. The MySQL 5.1 support will be dropped then.

  8. By Faisal Humayun on Feb 6, 2012 | Reply

    Any chance this will end up in the ubuntu repositories?

  1. 1 Trackback(s)

  2. Feb 12, 2011: Pinba – Realtime Monitoring and Statistics Server for PHP | hakre on wordpress

Post a Comment