[rrd-users] Problem with RRDs::graph in Perl script
Dmitry V. Kolvakh
k_e_u at bk.ru
Mon Aug 8 14:49:41 MEST 2005
Hello rrd-users,
I'm using MRTG with RRDTool and slightly modified mrtg-rrd.cgi
(http://www.fi.muni.cz/~kas/mrtg-rrd/) generates output.
The problem has appeared after upgrading from RRDTool 1.0.49 to
RRDTool 1.2.9 (and still remains with 1.2.11).
Now the system has theese components:
MRTG 2.12.1
perl v5.8.6
FreeBSD
and can be seen at http://serv4.pstu.ru/~keu/cgi-bin/mrtg-rrd.cgi/
In mostly times (about 95%) there is no average, max and current
values printed under the graphs. I've tried to find the problem and
have found the following: RRDs::graph returns a pointer to an _empty_
array as a first element of returning array.
E.g.:
my @rv = RRDs::graph(....);
and @{$rv[0]} is an empty array.
The some parameters of RRDs::graph follows:
=========cut==========
DEF:in0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds0:AVERAGE
CDEF:in=in0,8,*
DEF:maxin0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds0:MAX
CDEF:maxin=maxin0,8,*
DEF:out0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds1:AVERAGE
CDEF:out=out0,8,*
DEF:maxout0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds1:MAX
CDEF:maxout=maxout0,8,*
PRINT:out:MAX:%.1lf
PRINT:in:MAX:%.1lf
PRINT:out:AVERAGE:%.1lf
PRINT:in:AVERAGE:%.1lf
PRINT:out:LAST:%.1lf
PRINT:in:LAST:%.1lf
=========cut==========
I've tried to avoid deprecate functions and changed the parameters to
a new style:
=========cut==========
DEF:in0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds0:AVERAGE
CDEF:in=in0,8,*
DEF:maxin0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds0:MAX
CDEF:maxin=maxin0,8,*
DEF:out0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds1:AVERAGE
CDEF:out=out0,8,*
DEF:maxout0=/home/keu/mrtg/data/cisco7.ccl.ru/cisco7.ccl.ru_1.rrd:ds1:MAX
CDEF:maxout=maxout0,8,*
VDEF:out_max=out,MAXIMUM
PRINT:out_max:%.1lf
VDEF:in_max=in,MAXIMUM
PRINT:in_max:%.1lf
VDEF:out_avg=out,AVERAGE
PRINT:out_avg:%.1lf
VDEF:in_avg=in,AVERAGE
PRINT:in_avg:%.1lf
VDEF:out_lst=out,LAST
PRINT:out_lst:%.1lf
VDEF:in_lst=in,LAST
PRINT:in_lst:%.1lf
=========cut==========
but nothing have changed.
The most interesting is that sometimes (rarely) it works, and max,
average and last values are calculated!
--
Best regards,
Dmitry mailto:k_e_u at bk.ru
--
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