[rrd-users] Re: HOWTO: average office hours only (another issue)

Paul Pot paul_pot at nl.sonymusic.com
Tue Jan 30 14:35:41 MET 2001


Alex,

Thanks for the explanantion - good to learn.

I struggle with the following problem. (rrdtool-1028, rh 6.2), hope you can
help.

I sample a (frame) router every minute for a few OID's like octets in/out.
Using a perl-cgi, I can set the startdate back to a selected value, while the
end date always remains now. (need some more experience in perl before I can set
this the way I want :0))

The cgi shows the max throughput, the percent cir/bandwidth and average of the
throughput. Using a smal timespan, the values are accurate, but when startdate
is  F.e. 7 days before, the percent still shows the value of the highest peak,
while the graph is averaged out over the whole period, therefore the max is less
and the numbers don't match.

How can I calculate the proper percent of the cir based upon what I see on the
graph ? (or set values to unknown if outside the by cgi selected periods)

rrd1 - input values
rrd2 - output values
size = Kb size of CIR
sizew = Kb size * 1000
 print "<SMALL>Last update: $LAST</SMALL><BR>";
 my ($graphret,$xs,$ys) = RRDs::graph $GIF,
        "--title", "Traffic statistics for $TEXT ",
        "--start", "$PERIOD",
        "--imgformat", "PNG",
        "--vertical-label", "bits/second ($LAST)",
        "--width","600",
        "--height", "250",
        "--lazy",
        "--imginfo", "<IMG SRC='$GIFSRC'>",
        "DEF:inbytes=$RRD1:input:AVERAGE",
        "DEF:maxi=$RRD1:input:MAX",
        "DEF:outbytes=$RRD2:output:AVERAGE",
        "DEF:maxo=$RRD2:output:MAX",
        "CDEF:inb=inbytes,8,*",
        "CDEF:outb=outbytes,8,*",
        "CDEF:maxpi=maxi,8,*,$sizew,/,100,*",
        "CDEF:maxpo=maxo,8,*,$sizew,/,100,*",
        "COMMENT:Legend:\\n",
        "HRULE:$sizew#F000FF:Defined PVC @ $size Kbit",
        "COMMENT:\\n",
        "CDEF:Iinb=inb,$sizew,LE,inb,$sizew,IF",
        "CDEF:Oinb=inb,$sizew,LE,0,inb,$sizew,-,IF",
        "CDEF:Ioutb=outb,$sizew,LE,outb,$sizew,IF",
        "CDEF:Ooutb=outb,$sizew,LE,0,outb,$sizew,-,IF",
        "AREA:Iinb#00FF00:In traffic ",
        "GPRINT:inb:MAX:Max  (%4.0lf%s)",
        "GPRINT:maxpi:MAX:%3.0lf %%",
        "GPRINT:inb:LAST:Last (%4.0lf%s)",
        "GPRINT:inb:AVERAGE:Avg  (%4.0lf%s)",
        "STACK:Oinb#99F500:Over PVC in",
        "COMMENT:\\n",
        "AREA:Ioutb#0000FF:Out traffic",
        "GPRINT:outb:MAX:Max  (%4.0lf%s)",
        "GPRINT:maxpo:MAX:%3.0lf %%",
        "GPRINT:outb:LAST:Last (%4.0lf%s)",
        "GPRINT:outb:AVERAGE:Avg  (%4.0lf%s)",
        "STACK:Ooutb#005F99:Over PVC out" ;

Thanks

paul
<#include standard.disclaimer>



--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list