Apr 23 2007
User: cedric
Category: Ruby on Rails
Tags: log analyzer

Rails log analyzer rawk.rb

Voilà un petit script bien utile pour ceux qui désirent extraire les précieuses infos des logs de leur application Ruby on Rails:

ruby-on-rails-log-analyzer-rawk

Petit exemple de resultats:

Top 20 by Sum of Time
Request                                        Count     Sum     Max  Median     Avg     Min     Std
/                                                110   13.42    1.64    0.02    0.12    0.01    3.83
/plugin/catgraph                                  10    7.29    1.06    0.69    0.73    0.48    2.25
/media/show                                       12    1.08    0.95    0.01    0.09    0.01    0.95
/sitealizer/summary                                6    0.72    0.27    0.13    0.12    0.04    0.35
/sitealizer/hourly_stats                           4    0.54    0.32    0.17    0.14    0.02    0.31
/sitealizer/menu                                   6    0.49    0.24    0.01    0.08    0.01    0.29
/sitealizer/referrer_stats                         5    0.21    0.07    0.05    0.04    0.01    0.09
/themes/white                                     42    0.19    0.04    0.00    0.00    0.00    0.07
/sitealizer                                        6    0.19    0.10    0.02    0.03    0.00    0.10
/themes/new                                       36    0.14    0.05    0.00    0.00    0.00    0.06
/sitealizer/visitor_info                           5    0.13    0.05    0.01    0.03    0.01    0.06
/sitealizer/search_stats                           4    0.10    0.04    0.02    0.02    0.02    0.04
/account/login                                     3    0.10    0.06    0.06    0.03    0.01    0.05
/setting/show                                      2    0.09    0.08    0.04    0.04    0.01    0.05
/media/2007                                        1    0.03    0.03    0.03    0.03    0.03    0.00
/setting/list                                      1    0.01    0.01    0.01    0.01    0.01    0.00
/media                                             1    0.01    0.01    0.01    0.01    0.01    0.00
/plugin/themeswitch                                1    0.00    0.00    0.00    0.00    0.00    0.00
/plugin/langswitch                                 1    0.00    0.00    0.00    0.00    0.00    0.00

Usage:

ruby rawk.rb < development.log

comments : 0 Add comment

Back
Log in

Quick links

Localization

Search

weather


  • metric us

gallery

Last comments

Categories

  • categories

nabaztag

  • message

    left
    right
    voice
    speed
    pitch

hcard