Sorry,
I found the problem (by reading 
http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html for Options>Gauge).  
Turns out I had an option for gauge set.  I removed the gauge option and it is 
now reporting data.  Now, just need to find out how to convert blocks to bytes.

Brent Atkerson/Quad "A" Enterprises
Professional Web Site Design and Hosting, 
PC Repair, and Networking solutions
Phone  (989) 670-0885
http://www.quadaenterprises.com
----- Original Message ----- 
From: Brent Atkerson 
To: [email protected] 
Sent: Thursday, December 13, 2007 1:00 PM
Subject: Disk IO on Debian with MRTG


I am trying to monitor disk IO (in either bytes or blocks, anything right now). 
 I have scoured the web on several different occasions and have not come up 
with much.  I do now have a script that when run will give me some information 
but I cannot get MRTG to graph it.  I am guess I do not have my mrtg.cfg setup 
correctly to accept the output of the script.  
The script I have found on the Internet:
#!/bin/bash
hostname=`hostname`
uptime=`uptime | awk '{print $3}'`
uptime="$uptime days"

# default to hdiska's line.
tag=${1:-hda}
blck_in=`iostat -d | grep $tag | awk '{ print $5 }'`
blck_out=`iostat -d | grep $tag | awk '{ print $6 }'`
echo $blck_in
echo $blck_out
echo $uptime
echo $hostname


When just running the script from the command line, I get some information.  If 
I keep running the script the information changes so I assume it is blocks in 
and out...

My relative mrtg.cfg section:

#---------------------------------------------
Target[diskhda]: `/home/quadaent/mrtg/diskhda.sh`
MaxBytes[diskhda]: 500
LegendI[diskhda]: blck_in :
LegendO[diskhda]: blck_out :
Options[diskhda]: gauge,noinfo,nopercent,growright,unknaszero
YLegend[diskhda]: blocks
ShortLegend[diskhda]: IO/Sec
Title[diskhda]: server uptime
PageTop[diskhda]: <h1>Disk IO</h1>
# Legend1[diskhda]: IO/Sec
# Colours[diskhda]: LIGHT BLUE#7AAFFF,BLUE#1000FF,DARK 
GREEN#006000,VIOLET#FF00FF


Could someone help me please?  Seems this would be a common thing to want to 
track but there is very little available from what I have found (same thing for 
exim unfortunately).

Brent Atkerson/Quad "A" Enterprises
Professional Web Site Design and Hosting, 
PC Repair, and Networking solutions
Phone  (989) 670-0885
http://www.quadaenterprises.com
_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to