<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY><!-- Converted from text/plain format -->
<P><FONT size=2>Hello Vernon<BR>        I've 
written a script that gathers data from the squidclient util (just called client 
in the earlier versions).<BR>I've just started collecting data so I don't have 
error status's set up yet ... </FONT></P>
<P><FONT size=2>The squidclient util will give can give you ridiculous amounts 
of data on squid memory usage, disk IO, 5min and 60min averages 
etc.<BR>Squidclient mgr:menu will tell you what you can get.<BR><BR>You should 
be able to change the client script to grab what ever data you want ...<BR>On 
the hobbit server<BR><BR>Entered in to hobbitgraph.cfg<BR></P>
<P>
<HR>
</P>
<P>[squid]<BR>        TITLE Squid 
IN-OUT<BR>        YAXIS # 
bits<BR>        
DEF:serverhttpbitsin=squid.rrd:serverhttpbitsin:AVERAGE<BR>        
DEF:serverhttpbitsout=squid.rrd:serverhttpbitsout:AVERAGE<BR>        
DEF:clienthttpbitsin=squid.rrd:clienthttpbitsin:AVERAGE<BR>        
DEF:clienthttpbitsout=squid.rrd:clienthttpbitsout:AVERAGE<BR>        
AREA:serverhttpbitsin#@COLOR@:Server Traffic 
in<BR>        
LINE3:serverhttpbitsout#@COLOR@:Server Traffic 
out<BR>        
AREA:clienthttpbitsin#@COLOR@:Client Traffic 
in<BR>        
LINE2:clienthttpbitsout#@COLOR@:Client Traffic 
out<BR>        
COMMENT:\n<BR>        
GPRINT:clienthttpbitsin:LAST:Client Traffic in \: %5.1lf%s 
(cur)<BR>        GPRINT:clienthttpbitsin:MAX: 
\: %5.1lf%s (max)<BR>        
GPRINT:clienthttpbitsin:MIN: \: %5.1lf%s 
(min)<BR>        
GPRINT:clienthttpbitsin:AVERAGE: \: %5.1lf%s 
(avg)\n<BR>        
GPRINT:clienthttpbitsout:LAST:Client Traffic out \: %5.1lf%s 
(cur)<BR>        
GPRINT:clienthttpbitsout:MAX: \: %5.1lf%s 
(max)<BR>        
GPRINT:clienthttpbitsout:MIN: \: %5.1lf%s 
(min)<BR>        
GPRINT:clienthttpbitsout:AVERAGE: \: %5.1lf%s 
(avg)\n<BR>        
GPRINT:serverhttpbitsin:LAST:Server Traffic in \: %5.1lf%s 
(cur)<BR>        GPRINT:serverhttpbitsin:MAX: 
\: %5.1lf%s (max)<BR>        
GPRINT:serverhttpbitsin:MIN: \: %5.1lf%s 
(min)<BR>        
GPRINT:serverhttpbitsin:AVERAGE: \: %5.1lf%s 
(avg)\n<BR>        
GPRINT:serverhttpbitsout:LAST:Server Traffic out \: %5.1lf%s 
(cur)<BR>        
GPRINT:serverhttpbitsout:MAX: \: %5.1lf%s 
(max)<BR>        
GPRINT:serverhttpbitsout:MIN: \: %5.1lf%s 
(min)<BR>        
GPRINT:serverhttpbitsout:AVERAGE: \: %5.1lf%s 
(avg)\n<BR>[squidclients]<BR>        TITLE 
Squid Clients<BR>        YAXIS # 
count<BR>        
DEF:numberofclients=squidclients.rrd:numberofclients:AVERAGE<BR>        
LINE2:numberofclients#@COLOR@:Number_of_clients<BR>        
COMMENT:\n<BR>        
GPRINT:numberofclients:LAST:Number_of_clients \: %5.1lf%s 
(cur)<BR>        GPRINT:numberofclients:MAX: 
\: %5.1lf%s (max)<BR>        
GPRINT:numberofclients:MIN: \: %5.1lf%s 
(min)<BR>        
GPRINT:numberofclients:AVERAGE: \: %5.1lf%s (avg)\n<BR></P>
<P>Entered into hobbitserver.cfg<BR>Added to 
TEST2RRD="squid=ncv,squidclients=ncv"<BR>Added to 
GRAPHS="ncv,squid,squidclients"<BR>Create these new 
lines<BR>NCV_squid="clienthttpbitsin:GAUGE,clienthttpbitsout:GAUGE,serverhttpbitsin:GAUGE,serverhttpbitsout:GAUGE,*:NONE"<BR>NCV_squidclients="numberofclients:GAUGE,*:NONE"<BR><BR>
<HR>
</P>
<P>On the hobbit client<BR><BR>Create Squid.sh in the ext 
directory<BR>#!/bin/sh<BR>#Script to<BR>COLUMN=squid    # Name of 
the 
column<BR>COLUMN1=squidclients<BR>COLOR=green             
# By default, everything is OK<BR>MSG="Squid Status"<BR># Get Squid traffic in 
and out.<BR>VAR2=`/usr/local/squid/bin/squidclient mgr:5min | awk 
'/server.http.kbytes_/||/client_http.kbytes_/{print $0}' | sed -e 's/=/:/g' -e 
's/\/sec//g' -e 's/server\.http\.kbytes_/serverhttpbits/g' -e 
's/client\_http\.kbytes_/clienthttpbits/g' |awk '{print $1,$2,$3*8*1024}'`<BR># 
Get number of connected clients.<BR>VAR3=`/usr/local/squid/bin/squidclient 
mgr:info | awk '/Number of clients accessing cache/{print $0}'| sed -e 's/Number 
of clients accessing cache\:/numberofclients\ \:/' -e 's/\//g' -e 's/\ 
//g'`<BR># Tell Hobbit about it<BR>$BB $BBDISP "status $MACHINE.$COLUMN $COLOR 
`date`<BR><br><b>Data in and out of cache 5 minute 
average</b><BR>$VAR2<BR>"<BR>$BB $BBDISP "status $MACHINE.$COLUMN1 $COLOR 
`date`<BR>$VAR3<BR>"<BR>exit 0<BR><BR>Add entry to run the script in 
clientlaunch.cfg<BR><BR>[squid]<BR>        
DISABLED<BR>        ENVFILE 
$HOBBITCLIENTHOME/etc/hobbitclient.cfg<BR>        
CMD $HOBBITCLIENTHOME/ext/squid.sh<BR>        
LOGFILE 
$HOBBITCLIENTHOME/logs/squid.log<BR>        
INTERVAL 5m<BR></P>
<P>That gives me pretty graphs about traffic and number of clients.</P>
<P>Hope that helps.</P>
<P><BR>Alun<BR><BR>-----Original Message-----<BR><BR>From: Everett, Vernon [<A 
href="mailto:Vernon.Everett@dpi.wa.gov.au">mailto:Vernon.Everett@dpi.wa.gov.au</A>]<BR>Sent: 
Monday, 18 December 2006 2:55<BR>To: hobbit@hswn.dk<BR>Subject: [hobbit] Squid 
& Dansguardian<BR><BR>Hi all<BR><BR>I detest reinventing wheels, so let's 
first check if they exist.<BR><BR>Has anybody got anything to monitor Squid 
and/or Dansguardian?<BR><BR>Regards<BR>    Vernon<BR><BR>To 
unsubscribe from the hobbit list, send an e-mail to 
hobbit-unsubscribe@hswn.dk<BR><BR></P></FONT></BODY></HTML>