--- Martin Knoblauch <[EMAIL PROTECTED]> wrote:

> > error message:
> > 
> > Jan 24 17:24:18 localhost /usr/sbin/gmetad[30443]: RRD_update
> > (/var/lib/ganglia/rrds/production/raiden-8-db1/users.rrd):
> conversion
> > of
> > 'min,' to float not complete: tail 'min,'
> > 
> > This seems to relate to a recent change I made that I had forgotten
> > about.  :)  I added the following line to my crontab:
> > 
> > */2 * * * * /usr/bin/gmetric --name="users" --value=`w | head -1 |
> > awk '{print $6}'` --type=int16
> > 
> > The purpose of this line is to create a graph representing the
> number
> > of
> > logged in users to the host.  it seems right to me - do any of you
> > see a
> > problem with this line?
> > 
> 
>  actually, on my system (FC4) your command results in:
> 
> $ w | head -1 | awk '{print $6}'
> users,
> $
> 
>  which is not really what you want to put into that metric :-)
> Apparently yours seem to report "min," which would be "$4" on my
> system. The number of users would be "$5". Maybe different versions
> of
> "procps"?
> 
>  Hmm. Weird. Just played around with the setting of "LANG" and not
> the
> command reports "load" instead of "users,". Really weird .....
> 

 ha !!! The format of the "w" output changes with the uptime. The
position of the #users definitely flows around. Guess you need to work
on the awk. You need to look for "users" and take the token before
that.

Cheers
Martin

------------------------------------------------------
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www:   http://www.knobisoft.de

Reply via email to