Linux iotstat graphs
Submitted by Stef on Mon, 06/12/2010 - 21:49
Attachment | Size |
---|---|
linux-iostat.pl_.txt | 2.18 KB |
Docs:
Server patch
Patch the server so it accepts trends messages: http://www.hswn.dk/hobbiton/2007/01/msg00236.htmlClient script
Make sure the command iostat is installed (for debian/ubuntu this is package =sysstat=) Add the script to the file[linux-iostat] ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/linux-iostat.pl LOGFILE $HOBBITCLIENTHOME/logs/linux-iostat.log INTERVAL 5m
graph defintions
Add to hobbitgraph.cfg:[iostat-disk] TITLE disk read and write YAXIS KB/s FNPATTERN iostat-disk.(.*).rrd DEF:Kb_read@RRDIDX@=@RRDFN@:Kb_read:AVERAGE LINE2:Kb_read@RRDIDX@#@COLOR@:@RRDPARAM@ read KB/s GPRINT:Kb_read@RRDIDX@:LAST: \: %8.1lf (cur) GPRINT:Kb_read@RRDIDX@:MAX: \: %8.1lf (max) GPRINT:Kb_read@RRDIDX@:MIN: \: %8.1lf (min) GPRINT:Kb_read@RRDIDX@:AVERAGE: \: %8.1lf (avg)\n DEF:Kb_wrtn2@RRDIDX@=@RRDFN@:Kb_wrtn:AVERAGE CDEF:Kb_wrtn@RRDIDX@=0,Kb_wrtn2@RRDIDX@,- LINE2:Kb_wrtn@RRDIDX@#@COLOR@:@RRDPARAM@ wrtn KB/s GPRINT:Kb_wrtn2@RRDIDX@:LAST: \: %8.1lf (cur) GPRINT:Kb_wrtn2@RRDIDX@:MAX: \: %8.1lf (max) GPRINT:Kb_wrtn2@RRDIDX@:MIN: \: %8.1lf (min) GPRINT:Kb_wrtn2@RRDIDX@:AVERAGE: \: %8.1lf (avg)\n [iostat-part] TITLE partition read and write YAXIS KB/s FNPATTERN iostat-part.(.*).rrd DEF:Kb_read@RRDIDX@=@RRDFN@:Kb_read:AVERAGE LINE2:Kb_read@RRDIDX@#@COLOR@:@RRDPARAM@ read KB/s GPRINT:Kb_read@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:Kb_read@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:Kb_read@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:Kb_read@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n DEF:Kb_wrtn2@RRDIDX@=@RRDFN@:Kb_wrtn:AVERAGE CDEF:Kb_wrtn@RRDIDX@=0,Kb_wrtn2@RRDIDX@,- LINE2:Kb_wrtn@RRDIDX@#@COLOR@:@RRDPARAM@ wrtn KB/s GPRINT:Kb_wrtn2@RRDIDX@:LAST: \: %5.1lf (cur) GPRINT:Kb_wrtn2@RRDIDX@:MAX: \: %5.1lf (max) GPRINT:Kb_wrtn2@RRDIDX@:MIN: \: %5.1lf (min) GPRINT:Kb_wrtn2@RRDIDX@:AVERAGE: \: %5.1lf (avg)\nWrites are negative, reads are positive. Add this to the linux hosts in bb-hosts so the extra graphs show up on the trends page:
TRENDS:*,disk:disk|iostat-disk|iostat-part