On Thu, 14 Mar 2002, Hsiao, Chang-Ping wrote:
> I am seeing a strange problem with rrdtool graph. RRD is created
> successfully. RRD update is correct, verified by rrdtool fetch. The
> problem happens when I run rrdtool graph. The graph generated looks OK,
> except the X axis is marked incorrectly. For instance, the data points for
> 2/11/2002 should be week 7, right? The X axis shows as week 6.
> Does anyone know what happens and what I can do to correct this? Thank
> you for your help!
Go check the code for printing X axis labels.
For example, I have included this in my CGI script:
if ($q->param('png') eq 'monthly') {
push @args,'-x','WEEK:1:MONTH:1:WEEK:1:604800:Week %V';
}
Quoting http://people.ee.ethz.ch/~oetiker/webtools/mrtg/reference.html:
"Weekformat
By default, mrtg (actually rateup) uses the strftime(3) '%W' option to
format week numbers in the monthly graphs. The exact semantics of this
format option vary between systems. If you find that the week numbers
are wrong, and your system's strftime(3) routine supports it, you can
try another format option. The POSIX '%V' option seems to correspond to
a widely used week numbering convention. The week format character
should be specified as a single letter; either W, V, or U.
Example:
Weekformat[ezwf]: V
"
But with rrdtool I don't think there is a default. See above how I set my
week format.
Yes, this is a FAQ, but not in the FAQ.
/H
--
Håkan Lindholm <[EMAIL PROTECTED]>
--
Unsubscribe mailto:[EMAIL PROTECTED]
Help mailto:[EMAIL PROTECTED]
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi