[mrtg] Question

Michael John Hess mikehess at hitter.net
Tue Apr 11 00:53:52 MEST 2000


I was digging in the cgi-bin today and noticed some things,  Why is the raw data divided by 1000 / 1000 / 1000?  To my understanding its should be 1024 / 1024 / 1024 to get the right math for gig.  
 
This is that DATA I was talking about found in prior.sh

# calculate info
cd $LOGBASE/$SITE
log=`ls *.log`
result=`$CGIBASE/traffic.pl $LOGBASE/$SITE/$log $MONTH-01-$YEAR-00:01 $MONTH-$DA
YS-$YEAR-23:59`
output=`echo $result | cut -d ' ' -f 30`
input=`echo $result | cut -d ' ' -f 26`

rawout=`bc << EOF
scale=2
${output} / 1000 / 1000 / 1000
quit
EOF`

rawin=`bc << EOF
scale=2
${input} / 1000 / 1000 / 1000
quit
EOF`

adjustedout=`bc << EOF
scale=2 
${output} / 1000 / 1000 / 1000 * ${FACTOR}
quit
EOF`

adjustedin=`bc << EOF
scale=2
${input} / 1000 / 1000 / 1000 * ${FACTOR}
quit
EOF`
 
 
Also I was looking at the I was wanting to know were they are getting the adjuested DATA,  I was looking for some kinda file were this math is done with no luck.  

Thanks,

Michael John Hess

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



More information about the mrtg mailing list