[hobbit] sar & cpu-utilization graph

Galen Johnson gjohnson at trantor.org
Wed Dec 7 14:10:31 CET 2005


Henrik Stoerner wrote:

>On Mon, Dec 05, 2005 at 02:37:18PM -0600, Jeff Newman wrote:
>  
>
>>My boss wants the cpu-utilization graph to reflect the statistics on a per
>>cpu basis.
>>Investigating, I see that sar can do this, while reporting similar data to
>>vmstat (i.e. User, System Idle, average etc...) with
>>the addition of a cpu number. Output:
>>    
>>
>[snip]
>  
>
>>What is the easiest way to change the cpu utilization graph in hobbit to
>>take advantage of this?
>>
>>It's one of those things that's either more complicated than it looks, or
>>easier than I think :-)
>>    
>>
>
>"The devil is in the detail" ... but it really comes down to the same
>issue as when you want to build graphs from some custom test you are
>running.
>
>Your boxes should send in the "sar" data using a "data" or "status"
>message. If you use a "status" message, you have the benefit (for
>debugging) of having the raw data visible on your Hobbit display.
>So use a custom column-name, like "sardata" or something unique.
>
>Then you'll have to write a script to interpret these data, and save
>them in an RRD file. The hobbitd_rrd tool does this for the standard
>data, but you'll have to write your own module to interpret the data
>from sar, and save it to one or more RRD files - see the hobbitd_rrd
>man-page, the "Custom RRD data via scripts" section. You probably have
>a varying number of CPU's in each box, so I'd suggest using one RRD file
>for each CPU, and collecting the user/system/idle average for each CPU.
>Then you can name the RRD files "sar.[cpu number].rrd".
>
>Finally, build a graph definition in hobbitgraph.cfg to generate a graph
>from the RRD files; look at one of the existing definitions and it
>should be fairly doable. E.g. use the "la1-multi" definition as a
>template for building a "sarcpu" graph definition.
>
>
>Henrik
>
>
>To unsubscribe from the hobbit list, send an e-mail to
>hobbit-unsubscribe at hswn.dk
>
>
>  
>
Have you tried running the sar script on deadcat.net against hobbit?  I
haven't tried it with Hobbit yet myself but it's definitely on my todo
list.  It's one of the more functional tests for Big Bro out there.  It
has some minor issues but works great otherwise (if you have a lot of
partitions on your disks the disk graphs get a bit cluttered...)

=G=



More information about the Xymon mailing list