[rrd-users] Re: x axis print label

Alex van den Bogaerdt alex at ergens.op.het.net
Sat Dec 14 13:50:35 MET 2002

On Fri, Dec 13, 2002 at 04:09:03PM -0800, Peter Chiang wrote:

> part of my python script to define x-axis
> ----------------------------------------------------
> day_str = time.strftime("%a", time.localtime(time.time()))
> gif_weekly = "-s -604800 " + "-x HOUR:1:DAY:1:DAY:1:3600:" + '"' + day_str +
> '"'  ###<-x axis define here

You need to give the "%a" to RRDtool so it can use it.

> rrdtool graph command
> ----------------------------------------------------
> rrdtool graph /var/www/html/cvs_co3.gif -v "total in min" -t "Weekly Graph
> (1 hour Average)" -s -604800 -x HOUR:1:DAY:1:DAY:1:3600:"Sat" -h 400 -w
> 900 -l 0 DEF:secs=/var/www/html/cvs_co.rrd:checkout:MAX
> "CDEF:mins=secs,.0167,*" LINE3:mins#00FF00:"CVS Checkout"

This instructs RRDtool to print "Sat" each time.  Change "Sat"
into "%a" (in case you display several days) or into "%H" (for
displaying hours) or another formatter from the strftime manual page.

You have, correctly, used "3600" as your resolution.  If you want
the label directly under the major grid line (for instance for time)
you need to set it to "0".

Much of what looks like rudeness in hacker circles is not intended to give
offence. Rather, it's the product of the direct, cut-through-the-bullshit
communications style that is natural to people who are more concerned about
solving problems than making others feel warm and fuzzy.


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