Posted by & filed under PHP.

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.

9 Responses to “Let’s monitor your PHP applications with Pinba”

  1. Puckel

    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.

    Reply
  2. Vangelis

    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…

    Reply
  3. Guillaume Plessis

    @ForLoop : statsd is a very powerful tool to gather metrics, but Pinba has a lot of built-in features / algorithms that leads to out-of-the-box useful results. It’s up to you to use the tool that fits your needs.

    Reply

Trackbacks/Pingbacks

  1.  Pinba – Realtime Monitoring and Statistics Server for PHP | hakre on wordpress
  2.  Dotdeb | Pinba engine 1.0.0
  3.  Debugging & Profiling PHP - Linkpool | FASIGN Blog
  4.  Pinba – PHP性能监控 | 新生
  5.  Logging/Analysis (fluentd, kibana) | Annotary

Leave a Reply

  • (will not be published)


+ seven = 14