Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Escaping for graph generation on WinXP

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions
Author Message
gwalker



Joined: 29 Apr 2003
Posts: 1
Location: Toronto, Canada

PostPosted: Wed Apr 30, 2003 5:44 pm    Post subject: Escaping for graph generation on WinXP Reply with quote

raX,

Don't know if you test often on WinXP. I've just started off with the 04/25 build of 0.8 and cannot get Cacti to produce a graph.

If I take the output of the show_source screen to see the call to "rrdtool graph ..." I can generate proper graphs. I've narrowed the problem down to the way some of the parms are being escaped, I think.

If I take the following from a show_source screen:

<cite>
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-604800 \
--title="tdsi-ts-wal05 - Traffic - 49.23.26.130 (Network Teaming)" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="c\:/inetpub/wwwroot/cacti/rra/tdsitswal05_traffic_in_5.rrd":traffic_in:AVERAGE \
DEF:b="c\:/inetpub/wwwroot/cacti/rra/tdsitswal05_traffic_in_5.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s"
</cite>

and copy it into a .cmd file and then run it from a WinXP command shell, I get this:

<cite>
C:\Inetpub\wwwroot\cacti\scripts>c:/rrdtool/rrdtool.exe graph testgraph.gif --im
gformat=GIF --start=-604800 --title="tdsi-ts-wal05 - Traffic - 49.23.26.130 (Net
work Teaming)" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max
--lower-limit=0 --vertical-label="bits per second" DEF:a="c\:/inetpub/wwwroot/ca
cti/rra/tdsitswal05_traffic_in_5.rrd":traffic_in:AVERAGE DEF:b="c\:/inetpub/wwwr
oot/cacti/rra/tdsitswal05_traffic_in_5.rrd":traffic_out:AVERAGE CDEF:cdefa=a,8,*
CDEF:cdefe=b,8,* AREA:cdefa#00CF00:"Inbound" GPRINT:cdefa:LAST:" Current\:.2lf
cdefa:AVERAGE:"Average\:.2lf cdefa:MAX:"Maximum\:.2lf cdefe#002A97:"Outbound"
GPRINT:cdefe:LAST:"Current\:.2lf cdefe:AVERAGE:"Average\:.2lf cdefe:MAX:"Maximum
\:.2lf s"
ERROR: can't parse 'cdefa:MAX:Maximum\:.2lf cdefe#002A97:Outbound GPRINT:cdefe:
LAST:Current\:.2lf'
</cite>

It looks like the stuff passed to GPRINT is the problem. When I take those parts out, everything works fine. (Yes, the pasted text above is all on one line in the command prompt.)

Thanks in advance,

Greg Walker
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Wed Apr 30, 2003 11:01 pm    Post subject: Reply with quote

I actually installed cacti 0.8/IIS6/MySQL on XP and get posative results. I created a traffic graph (bits) just as you have and the graph renders ok. One thing I noticed about the command you executed at the command line is that it is missing a few GPRINT statements. However the rrdtool source that cacti printed out looks correct.

What happens if you go to this graph in graph management, and select "Turn On Graph Debug Mode"?

How did you derive the long command at the command line?

-Ian
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group