[mrtg] Disk reporting - wrong size

Kenneth Sundby kenneth at radical.no
Sun Jan 12 17:38:29 MET 2003


Hi,

I'm new to using MRTG but I found the whole thing fairly easy to use,
however, there is one problem I can't seem to solve.
When trying to use the hrStorageSize it seems to miss-calculate.

This is the "script" im using
--------------------------------------
start --------------------------------------
Target[kenneth.disk]:hrStorageSize.3&hrStorageUsed.3:public at 192.168.0.4
RouterUptime[kenneth.disk]: public at 192.168.0.4
MaxBytes[kenneth.disk]: 300000000000
Directory[kenneth.disk]: work/
Title[kenneth.disk]: Disk usage on kenneth
PageTop[kenneth.disk]: <H1>Disk usage on kenneth</H1>
hrStorageDescr.3:public at 192.168.0.4
kMG[kenneth.disk]: k,M,G,T,P
kilo[kenneth.disk]: 1024
ShortLegend[kenneth.disk]:B
YLegend[kenneth.disk]: DISK / Utilization
Legend1[kenneth.disk]: disk size
Legend2[kenneth.disk]: disk usage
Legend3[kenneth.disk]:
Legend4[kenneth.disk]:
LegendI[kenneth.disk]: disk size
LegendO[kenneth.disk]: disk usage
Options[kenneth.disk]: growright,gauge,nopercent

--------------------------------------
end --------------------------------------

This reports: Current Root disk size 9491.5 M B
But the disk (partition /usr) is actually 37GB!

now, at my first glance this seemed to be a Unit Allocation error, so i
checked the output of hrStorageSize and hrStorageAllocationUnits.

--------------------------------------
start --------------------------------------
su-2.05b# snmpwalk -v1 -c public 192.168.0.4 hrStorageSize.3
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 9719317
su-2.05b# snmpwalk -v1 -c public 192.168.0.4 hrStorageAllocationUnits.3
HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 4096 Bytes
su-2.05b#
--------------------------------------
end --------------------------------------

Now this is easy calculation..9719317 * 4096 which = 39810322432, or in
other words 39GB, this seems more correct so i changed "kilo[kenneth.disk]:
1024" to "kilo[kenneth.disk]: 4096"...
This however only raises it to 2372.9 MB...

So I tried another thing, changing the kilo back to 1024 and using the
Factor statement to multiply everything with 4096, fairly confident that
this should work i made the changes...
and hallelujah! Current disk size 37.1 G B
..now this what I wanted!, but wait..the graph still shows the "old" result.
Factor only changes the text *doh*

How come I cant get the right disk size? what am I doing wrong?

Regards,
Kenneth Sundby.

--
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