pbstat
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Perlbal > pbstat




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    pbstat  
Adam Jacob


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-07 12:11 AM

Hello all. I've had occasion to start using Perlbal to front some Rails
applications of late. Since it has fabulous statistics, we wanted to be able
to see what's up with our Perlbal instances in a vmstat-like way. Attached i
s
the (admittedly quick) first pass at a script that does just that, at the
moment for Client Socket states and URI listings. Language snobs beware, it'
s
written in Ruby, as that's what the client is most familiar with. 

For example:

./pbstat perlbal1 perlbal2
hostname        tc      r_h     w_b     b_s     w_r     x_r     d_r     w_s 
    w_o     x_d
perlbal1        0       0       0       0       0       0       0       0   
    0       0
perlbal2        18      0       0       0       17      1       0       0   
    0       0
perlbal1        0       0       0       0       0       0       0       0   
    0       0
perlbal2        18      0       0       0       16      2       0       0   
    0       0
perlbal1        0       0       0       0       0       0       0       0   
    0       0
perlbal2        20      0       0       0       19      1       0       0   
    0       0
perlbal1        0       0       0       0       0       0       0       0   
    0       0
perlbal2        19      0       0       0       17      2       0       0   
    0       0

The columns are:

total connections: tc
reading_headers: r_h
wait_backend: w_b
backend_req_sent: b_s
wait_res: w_r
xfer_res: x_r
draining_res: d_r
wait_stat: w_s
wait_open: w_o
xfer_disk: x_d

A more entertaining mode (but perhaps less useful) will show all the URIs th
at
the client proxy is serving:

./pbstat -d 0.1 -u perlbal1 perlbal2
perlbal1       http://127.0.0.1:4999/  1
perlbal2       http://127.0.0.1:4999/search    1

(The number on the end is a count.)

Finally, you can just issue raw commands to the Perlbal backends:

./pbstat -c 1 -r "proc" amos1test amos2test
perlbal1       time: 1178747525
perlbal1       pid: 21240
perlbal1       utime: 10.752672 (+9.732609)
perlbal1       stime: 2.756172 (+2.576161)
perlbal1       reqs: 3590 (+0)
perlbal2       time: 1178747525
perlbal2       pid: 25966
perlbal2       utime: 2629.856355 (+2629.856355)
perlbal2       stime: 519.304454 (+519.304454)
perlbal2       reqs: 1041492 (+0)

Like I said above, it's pretty rough, but not a bad first start. Are there
other statistics that would be useful to display? How should they be
displayed?

If people have suggestions, I'll be happy to refactor this and make it a mor
e
useful tool.

Otherwise, fun toy. 

It's attached to this message, or you can get it from:

svn://cabo.hjksolutions.com/pbstat/trunk

Adam

--
HJK Solutions - We Launch Startups - http://www.hjksolutions.com
Adam Jacob, Senior Partner
T: (206) 508-4759 E: adam@hjksolutions.com






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:44 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register