[mrtg] Re: rrdtool fetch doesn't match graph

Bishop, Dean dean.bishop at tcdsb.org
Fri Oct 18 20:23:35 MEST 2002


Good morning,

yes, i understand what you describe but i think that the problem is even
more simple than this.

if you look at the value stored in the rrd it is different than what is
displayed on the graph.

i tried using factor, and kilo but neither did what i needed.  besides in
order for these to work you need to _not_ use the gauge option which is
necessary for disk-space usage graphing.

What i just don't get is why the value from the rrd is not what is displayed
on the graph.

apparently there is some math done when creating the graph.  If i only knew
what math was being done, i could probably figure out how to counter it.

thanks,
dean


-----Original Message-----
From: Andrew Davis [mailto:andrew at socallinuxsolutions.com]
Sent: Friday, October 18, 2002 1:35 PM
To: Bishop, Dean
Cc: 'McDonald, Dan'; 'mrtg at list.ee.ethz.ch'
Subject: Re: [mrtg] Re: rrdtool fetch doesn't match graph


Bear in mind what a disk cluster does... let's take a h/w raid array as
an example: 

You have three 18gb drives in a RAID5, so close to 36gb of usable space.
But you set up 64k clusters (chunks, whatever the latest phraseology
is). Now you write a bunch of small 4k files. 16 files should go into
each cluster nicely. But now you write a single 80k file to the array.
The first 64k is written to one cluster, and another 16k write to the
next cluster (I'm intentionally beng very simplistic). That leaves 48k
free in the 2nd cluster. But the next file to write is 60K and starts at
a new cluster. Eventually, you end up with clusters with free space...
holes if you will. This is called fragmentation... parts of a single
file all over the disk, resulting in poor i/o. Going back to my initial
example, the OS sees that both clusters are used and says you've used
128k (consumed disk space based on two clusters being flagged as used),
when in reality you only used 80k (actual file size)... actual size vs.
disk space used size.

To add to the complexity, you could ALSO have the 1024K vs 1000K issue
mentioned below. So you could have a compound problem...

AD

On Fri, 2002-10-18 at 08:56, Bishop, Dean wrote:
> 
> That's what i first thought but:
> 
> 6860000 * 1.024 = 7024640 instead of 7366408; and
> 89150 * 1.024 = 91289.6 instead of 93164
> 
> thanks though,
> dean
> 
> -----Original Message-----
> From: McDonald, Dan [mailto:Dan.McDonald at austinenergy.com]
> Sent: Friday, October 18, 2002 11:47 AM
> To: 'Bishop, Dean'
> Subject: RE: [mrtg] Re: rrdtool fetch doesn't match graph
> 
> 
> looks to me like you are using 1024 based K's on one and 1000 based k's on
> the other.
> 
> Daniel J McDonald, CCIE #2495, CNX
> Lan/Wan Integrator
> Austin Energy
> 1.512.322.6739
> dan.mcdonald at austinenergy.com
> 
> 
> -----Original Message-----
> From: Bishop, Dean [mailto:dean.bishop at tcdsb.org]
> Sent: Friday, October 18, 2002 10:05 AM
> To: 'Matt Walkowiak'
> Cc: 'mrtg at list.ee.ethz.ch'
> Subject: [mrtg] Re: rrdtool fetch doesn't match graph
> 
> 
> 
> no.  i wondered about this but it does not seem to be the case
> 
> i have been trying to figure out any standard difference but can't.
> 
> rrdtool		graph
> used space	7.36G		6.86G		7366408Bytes
> free space 93.41M		89.15M	93164Bytes
> 
> i just can't find the correlation.
> 
> thanks,
> dean
> 
> --
> dream outloud
> 
> 
> 
> -----Original Message-----
> From: Matt Walkowiak [mailto:matt at inetdvd.com]
> Sent: Friday, October 18, 2002 10:47 AM
> To: Bishop, Dean
> Subject: Re: [mrtg] rrdtool fetch doesn't match graph
> 
> 
> ummm.... this is a complete WAG, but are you off by a factor of 8
anywhere?
> Remember, MRTG's main job was to graph bandwidth traffic, and you may be
> confusing your bits with your bytes...
> 
> Matt Walkowiak
> 
> ----- Original Message -----
> From: "Bishop, Dean" <dean.bishop at tcdsb.org>
> To: <mrtg at list.ee.ethz.ch>
> Sent: Friday, October 18, 2002 9:42 AM
> Subject: [mrtg] rrdtool fetch doesn't match graph
> 
> 
> >
> > Good morning,
> >
> > i am using mrtg and rrdtool to store hard-drive space info.  The
> > problem is that if i run rrdtool dump i get one number but the graph
gives
> > me another.
> > i have messed around with the script, the factor and kilo options
> > without solving the problem.
> >
> > Can someone please help??
> >
> > ######################################################################
> > #                                                                    #
> > # this is the disk used and free on /                   #
> > #                                                                    #
> > ######################################################################
> > Target[diskspaceusedandfree]:  `perl -e '$f="%.0f";$fmt="$f\n$f\n1\nDisk
> > Space Used and Free\n";@line=split " ", (qx(df));$o=sprintf
> > $fmt,$line[9]*1000,$line[10]*1000;print $o; print STDERR $o'`
> > Options[diskspaceusedandfree]: gauge
> > MaxBytes[diskspaceusedandfree]: 8858784000000
> > #ABSMax[diskspaceusedandfree]: 7858784000
> > kMG[diskspaceusedandfree]: M,G,T,P,X
> > YLegend[diskspaceusedandfree]: bytes
> > Unscaled[diskspaceusedandfree]: ymwd
> > ShortLegend[diskspaceusedandfree]:
> > Legend1[diskspaceusedandfree]: Used
> > Legend2[diskspaceusedandfree]: Free
> > LegendI[diskspaceusedandfree]:  Disk Space Used
> > LegendO[diskspaceusedandfree]:  Disk Space Free
> > Title[diskspaceusedandfree]: Server Disk space used and Free on /
> > PageTop[diskspaceusedandfree]: <H2>Server Disk Space Used and Free on
> /</H2>
> >
> >
> > ---snip from rrdtool dump diskspaceusedandfree.rrd----
> > <!-- 2002-10-18 10:30:00 EDT / 1034951400 -->
> > <row><v> 7.3661578400e+09 </v><v> 9.3414160000e+07 </v></row>
> > </database>
> > </rra>
> > </rrd>
> >
> > thanks,
> > dean
> >
> > --
> > 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
> 
> --
> 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
> 
-- 
Andrew Davis, Founder
SoCalLinuxSolutions
andrew at socallinuxsolutions.com
760-525-4689

SoCalLinuxSolutions.com
Linux Consultation & Integration Services

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