Posts by author vcaron

phptop 0.5.4 released (average and relative options)

PhpTop 0.5.4 is out, with two new analysis options :

  • -a, --average: show per-hit average time values instead of cumulated time
  • -r, --relative: show relative time values in percent relative to the sample duration

Sample usage :

lampserver:~# phptop -prs user
URL                                   Hit     Time    >User      Sys  Mem/hit  Mem_max
/                                    5.4%    25.0%     5.8%     0.4%      7.5     20.5
/fr/                                 2.5%     4.0%     2.8%     0.2%      5.6     14.5
/fr/user/startpage/                  1.4%    61.9%     2.6%     0.1%     11.4     17.5
/cv/baz/                             0.6%     3.9%     1.7%     0.1%      8.4      8.8
/fr/ajax/home/change_foobar/         2.3%     5.5%     1.6%     0.2%      4.5     13.8
/fr/ajax/munch/save/                 1.8%     3.8%     1.5%     0.1%      9.2     19.0
/dont-do-this/                       0.3%     1.7%     1.3%     0.1%      9.9     10.2
/cv/barbaz/                          0.6%     2.4%     1.3%     0.1%      9.4     21.8
/fr/ajax/identity/foo_upload/        0.2%     2.0%     1.2%     0.1%      4.0      4.5
/cv/afer/                            0.5%     2.5%     1.2%     0.1%      8.2      9.2
Total (from last 300 sec)          100.0%   397.2%   112.3%     7.8%                  

Here it is more easy to see that PHP used 112% CPU for the last 300sec (this is on a 4-way server, we have up to 400% CPU time). The hit ratio is also more meaningfull to quickly see the distribution curve : the more CPU costly page only represents 5.4% of total hits, maybe you don't want to waste your time optimizing that.

It could be better, hit totals should be kept as a plain number I guess. Same for the total elapsed time.

Note that the combination of -a and -r is allowed but is not very useful nor readable.

  • Posted: 2011-08-12 16:26
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

phptop 0.5.3 released (doc complete, minor fixes)

PhpTop 0.5.3 is out, with a few fixes and cleanups, complete doc and a discrete but important modification on the -t option:

  • Non-compatible change: -t is now using seconds, because it didn't make any sense to use minutes there and seconds here.
  • Minor bugfix, PHP comments use ; and not # now
  • Style fix: 'perlcritic phptop' OK
  • Added 2011 in various (c) notices
  • man page: finally writen the INTERPRETATION section, see PhpTopMan
  • Posted: 2011-03-14 21:57 (Updated: 2011-03-14 22:12)
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

Jobq 0.8.1 - Better and faster queuing

A minor Jobq release for an important fix, see the #18 ticket for all details:

  • A race condition has been fixed with the help of the start-stop-daemon from dpkg. Which makes it currently Debian only but reuse a very robust wheel.
  • A queued job is now run ASAP instead of waiting for a cyclic pickup process (which was set to 5sec, which could add up to lots of wasted time waiting on queue pickups).

Thanks a lot to Sébastien Bocahu which implemented and tested the aforementionned fixes, and bore with my details pushing.

See JobQueue for more info.

  • Posted: 2010-06-26 17:22
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

Bearmail 0.3.3 released (bugfix)

Bearmail 0.3.3 was released with one major bugfix (see #17); under corner case circonstances, the MTA could claim to host a foreign domain (like "" ...) and capture all outgoing emails for the latter.

A few patches from the trunk made it through too (Sieve home is now the user maildir, mod_perl support, etc). Changelog is:

  • Fixed bug #17 where non-hosted domains were improperly looped locally
  • Sieve support: moved conf files to maildirs
  • Added mod_perl support (BearMail/Dispatch?.pm)
  • Web UI tweak on domain_list mode

See the BearMail wiki page for global information.

  • Posted: 2010-05-27 17:22
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

Jobq 0.8 - New stat and profile tools

Jobq 0.8 is a release which does not modify jobq itself nor fixes bugs, but brings two new very useful tools to monitor your job queues.

For instance jobq-profile prints time and calls per script:

$ jobq-profile -q production < /var/log/user.log

Calls  Time(sec)  Command
   12     460504  ./script/runner "LivePush.clean" && ./script/pates 
  197      49165  rake -s import:foobar:home_news_competition
  201      35767  rake -s import:foobar:news
  492       3063  rake -s import:foobar:update_recent_game_squad

See JobQueue wiki page for download, source, samples, etc.

  • Posted: 2010-04-16 17:45 (Updated: 2010-04-16 18:02)
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

phptop 0.5.1 released - quick bugfix

Thanks to Duck, an important bug has been spotted and fixed in memory logging (#8). It might discard a lot of sample measures depending on the locale numeric settings about scientific notations and mantissa (in the wild it would look like an "heisenbug"). It's now locale independent.

  • Posted: 2010-03-23 20:21
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

phptop 0.5 released: bugfixes and cuteness

phptop 0.5 is out with bugfixes and massive output enhancement, especially the new HTML output. Check the PhpTop wiki page for details and output demos.

Changelog between 0.4.1 and 0.5:

New -ooutput-mode option, refactored reporting internally
  • New HTML output support
  • Text output: showing sorting column with '>' on text output
  • Text output: multiple reports are globally column aligned
  • Now checking that -t <value> is numeric
  • Now checking that -s <key> uses a known key
  • Changes -s usage: now using multiple -s instead comma-list
  • Fixed sorting which was not reliable (use proper <=> numeric comparison operator)
  • Using exactly one print per line (better buffering for large outputs or slow links)
  • Gave up 'inc' measure and display; it could be seen as a code complexity measure but has been merely useless in production use for the last months
  • Posted: 2010-03-19 00:59
  • Author: vcaron
  • Categories: (none)
  • Comments (0)

Bearstech Forge

Bearstech is an internet hosting company, but also much more than this.

We extensively use Free Software but also contribute to some projects, and sometimes develop our own. This 'forge' is a place where we try to polish and publish various tools, softwares and documentations we produced for ourselves, our partners or our clients.

  • Posted: 2009-11-16 22:30
  • Author: vcaron
  • Categories: (none)
  • Comments (0)