[rrd-users] forcing partial pull of data for day over a month

Randy Ridley randy at ridley.net
Tue Oct 3 14:03:43 MEST 2006


I've been using this script segment to pull client bandwidth from the
rrd databases and sum it up for both input and output:

bandwidth=`rrdtool graph test.png \
   --start $(date +%s -d $start_date) --end $(date +%s -d $end_date) \
   DEF:output=/stats/clients/$host/db/hs_bandwidth.rrd:out:AVERAGE \
   DEF:input=/stats/clients/$host/db/hs_bandwidth.rrd:in:AVERAGE \
   CDEF:outbits=output,UN,0,output,IF,30,24,60,60,*,*,*,* \
   CDEF:inbits=input,UN,0,input,IF,30,24,60,60,*,*,*,* \
   CDEF:total=inbits,outbits,+ \
   PRINT:total:AVERAGE:"%.lf %sB" \
   | tail -1`

This script does not return test.png. I'm only interested in the
resulting numerical data to stuff in an e-mail message.

Now, however, we've decided to only count bandwidth that occurs between
the prime time hours of 8:00am to 10:00pm. Is there an easy way to have
the rrdtool do this automatically or am I stuck using the fetch tool and
doing the math manually?

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list