[mrtg] Re: monitor disk IO

Joseph Pierini JPierini at mmlive.com
Thu Sep 30 20:37:09 MEST 2004


I use this script I grabbed from someplace, apologies to the original author
for the lack of credit:



######################################################################
# Author comments:                                                   #
# This is the Swap and Paging I/O from sar -B -W -h                  #
# I scaled mine by 1000 because the numbers were so small            #
#                                                                    #
######################################################################
Target[swap]: `perl -e '$f="%.0f";$fmt="$f\n$f\n1\nSwap and
Paging\n";($v1,$v2)=(qx(sar -W -h | tail
-2)=~/pswpin\/s\s+([\d\.]+).*?pgpgout\/s\s+([\d\.]+)/sm);$v1=1000*$v1;$v2=10
00*$v2;$p1=$v1+$v2;($v1,$v2)=(qx(sar -B -h | tail
-2)=~/pgpgin\/s\s+([\d\.]+).*?pgpgout\/s\s+([\d\.]+)/sm);$v1=1000*$v1;$v2=10
00*$v2;$p2=$v1+$v2;$o=sprintf $fmt,$p1,$p2;print $o; print STDERR $o'`
Options[swap]: gauge,growright, transparent, dorelpercent, nopercent
MaxBytes[swap]: 100000000
YLegend[swap]: In+Out blocks per second * 1000
ShortLegend[swap]: io blk/s x 1000
Legend1[swap]: read
Legend2[swap]: write
Legend3[swap]: Maximal 10 Min
Legend4[swap]: Maximal 10 Min
LegendI[swap]:  swap:
LegendO[swap]:  page:
Timezone[swap]: GMT
Title[swap]: Server Swap and Paging I/O (in+out blocks per second times
1000)
PageFoot[swap]:
PageTop[swap]: <H1>Server Swap and Paging I/O (in+out blocks per second
times 1000)</H1>
######################################################################

Joe Pierini
-----Original Message-----
From: Leonardo Rodrigues Magalhães [mailto:leolistas at solutti.com.br] 
Sent: Thursday, September 30, 2004 10:50 AM
To: MRTG Mailing List
Subject: [mrtg] monitor disk IO


    Hello Guys,

    I have some Red Hat 9 Linux servers, some with one IDE disk, some with 2
IDE disks and some with IDE/SCSI disks.

    What I need is to monitor the IO usage per device or even better per
partition (no RAID is involved). I need to graph blocks in/blocks out, KBs
read/write, etc etc. I was looking the sysstat package, which has some
applications that seems to give me some informations like this. But I
couldnt figure out how to feed mrtg with those informations.

    Question is: is there any scripts or HOWTO or some link that you could
point me to help me getting this work ?? As mrtg is running in the same
machine I wanna to monitor, there's no problem on running perl scripts or
something like that. I DONT need a SNMP solution ...

    Thanks for the replies,
    Leonardo Rodrigues

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list