--------- Forwarded message ----------
From: Brandon <[email protected]>
To: [email protected]
Cc:
Date: Sun, 10 Jun 2012 16:25:40 -0700
Subject: Load values being rounded to 0 in graphite export
Hello All,

Pretty sure that the values for the system load are being averaged and
being made useless, it looks like I might be able to fix it by hacking
formatit.ph, but I'm not sure where to begin with it. Anyways here's what
I'm seeing.

 [root@overwatch01 collectl-3.6.3]# collectl -i 10 -F60 -s cC --export
> graphite,localhost:2003,i=10,**d=9|grep load
> overwatch01.cpuload.avg1 0 1339370467
> overwatch01.cpuload.avg5 0 1339370467
> overwatch01.cpuload.avg15 0 1339370467
>

 [root@overwatch01 collectl-3.6.3]# collectl -i 10 -F60 -s cC --home
> waiting for 10 second sample...
> ### RECORD    1 >>> overwatch01 <<< (1339370502.001) (Sun Jun 10 16:21:42
> 2012) ###
> # CPU SUMMARY (INTR, CTXSW & PROC /sec)
> # User  Nice   Sys  Wait   IRQ  Soft Steal  Idle  CPUs  Intr  Ctxsw  Proc
>  RunQ   Run   Avg1  Avg5 Avg15 RunT BlkT
>     0     0     0     0     0     0     0    98     8   295    378     0
> 287     0   0.18  0.20  0.18    0    0
> # SINGLE CPU STATISTICS
> #   Cpu  User Nice  Sys Wait IRQ  Soft Steal Idle
>      0     0    0    0    0    0    0     0   99
>      1     0    0    0    5    0    0     0   94
>      2     0    0    0    0    0    0     0   99
>      3     0    0    0    0    0    0     0  100
>      4     0    0    0    0    0    0     0   99
>      5     3    0    1    0    0    0     0   95
>      6     0    0    0    0    0    0     0   99
>      7     0    0    0    0    0    0     0   99
>

-Brandon

damn - you're right.  loadavg's are numbers I virtually never look at,
probably because I don't have a good feel for what make sense.  All I know
 on a heavily loaded nfs server the loads were in the 80s (or maybe even
90s) and the system was perfectly happy.  In the right cases though I do
know they can be useful.

In any event I guess those are the only numbers collectl doesn't report as
integers and so when I printed everything as an int() in graphite.ph it
never occurred to me something might break.  Looking more closely at the
code I think what I'd do is add a 4th parameter to the sendData() routing
in graphite.ph and pass a 1 in the calls to it for the loadavg.  There's
one line where it does an int of the passed value and I'm make that
conditional on whether or not that 4th parameter is set.  Then I'd do the
same in the sprintf where it always uses a %d and in the case of loadavg it
would need to use a %.2f.

Do you do perl?  If so perhaps you can try it out.  If not, I'll try to get
it into the next release OR if  you want I can send you a copy to try out
yourself.  Actually maybe that would be the best way to handle if it you're
game.

-mark
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest

Reply via email to