[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] Need for a report
- To: hobbit (at) hswn.dk
- Subject: RE: [hobbit] Need for a report
- From: PNIXON (at) ci.somerville.ma.us
- Date: Tue, 23 May 2006 17:01:36 -0400
Doh!
I didn't realize I was doing things abnormally :)
My apologizes for the spam then.
--Pat
-----Original Message-----
From: henrik (at) hswn.dk [mailto:henrik (at) hswn.dk]
Sent: Tuesday, May 23, 2006 4:50 PM
To: hobbit (at) hswn.dk
Subject: Re: [hobbit] Need for a report
On Tue, May 23, 2006 at 04:27:10PM -0400, PNIXON (at) ci.somerville.ma.us wrote:
> Cleaned up the formatting and changed from grep -h red to grep -l "^red"
>
> --
> #!/bin/sh
> BBVAR="/bb/bbvar"
>
> TOTAL=`ls $BBVAR/logs/*.conn | wc -l`
> red=`grep -l "^red" $BBVAR/logs/*.conn | wc -l` yellow=`grep -l
> "^yellow" $BBVAR/logs/*.conn | wc -l` clear=`grep -l "^clear"
> $BBVAR/logs/*.conn | wc -l` blue=`grep -l "^blue" $BBVAR/logs/*.conn |
> wc -l` purple=`grep -l "^purple" $BBVAR/logs/*.conn | wc -l`
>
> echo "Total Connectivity: $TOTAL
> Red Conn: $red
> Yellow Conn: $yellow
> Clear Conn: $clear
> Disabled Conn: $blue
> Purple Conn: $purple"
This works fine for a BB installation, but not for Hobbit since Hobbit
doesn't store the logfiles on disk (not in the default configuration, at
least).
So as Francesco mentioned, you should fetch the status with the hobbitdboard
command. Something like this would do it:
bb 127.0.0.1 "hobbitdboard color=red,yellow,purple,green test=conn
fields=color" | sort | uniq -c
On one of my systems this yields:
1416 green
68 purple
143 red
Sounds like what the original poster wanted.
Regards,
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk