Traffic Summation calculating incorrect values

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

drawkcab
Posts: 10
Joined: Wed Mar 08, 2006 8:16 am

Post by drawkcab »

rony, attached graph items from two different templates - of which all graphs summate incorrectly. graphitems2.gif is the template for the above dailygraph.png in my first post.

Note however that _all_ graphs/graph templates within in my cacti(h) installation currently summate incorrectly.
Attachments
graphitems1.gif
graphitems1.gif (10.15 KiB) Viewed 1488 times
graphitems2.gif
graphitems2.gif (11.84 KiB) Viewed 1488 times
diluted
Posts: 3
Joined: Thu Aug 02, 2007 4:51 pm

Post by diluted »

I am having this same exact problem. What would you like to see to try to troubleshoot it?

Thanks
drawkcab
Posts: 10
Joined: Wed Mar 08, 2006 8:16 am

Post by drawkcab »

I ended up re-creating my entire cacti installation, running a fresh install side by side with the existing install (using the same rrd's) - I could never find what was causing it.

Now whenever I import graph templates, I always do a mysql dump of my cacti db - just incase.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Would it be of any use to publish some nice php script, that performs db-dump to generation data files (append timestamp) to make sure, that at least one current db dump is available?
Reinhard
drawkcab
Posts: 10
Joined: Wed Mar 08, 2006 8:16 am

Post by drawkcab »

gandolf, sounds useful to me..
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

Just another report of wrong total calculations:

average in: 2.62kB/s total in: 2.27GB, but should be: 2.62*86400/1024/1024 = 0.216GB
average out: 9.60kB/s total out: 8.29GB, but should be: 9.60*86400/1024/1024 = 0.791 GB

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1180648800 \
--end=1180735140 \
--title="host - Total Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/06/01 00\:00\:00 To 2007/06/01 23\:59\:00\c" \
COMMENT:"  \n" \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="/home/cacti/web/rra/host_bytes_38.rrd":bytes:AVERAGE \
DEF:b="/home/cacti/web/rra/host_bytes_39.rrd":bytes:AVERAGE \
AREA:a#00CF00:"Inbound"  \
GPRINT:a:LAST:" Current\:%8.2lf%s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:b#002A97:"Outbound"  \
GPRINT:b:LAST:"Current\:%8.2lf%s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"  \
COMMENT:"Total In\:  2.27 GB\n"  \
COMMENT:"Total Out\: 8.29 GB\n"
In the graph template, there's this line for the total calculations:

Code: Select all

COMMENT: Total In: |sum:auto:current:2:auto|<HR>
Using rrdtool v 1.2.15 and cacti 0.8.6h (I think, there really should be an about/credits/version box :))

Just tell me if more info is required:)

(I just noticed there was an error in the rrdtool command, the maximum it reports for the outbound graph is the same as for the inbound one. I have no idea why, I added 2 screenshots for my graph template. This shouldn't make a difference for the total calculations I think).

Anyone knows why my outbound max is the same as the input one? What's wrong with the graph template?
Attachments
cacti_graphtemplate.png
cacti_graphtemplate.png (13.48 KiB) Viewed 1352 times
cacti_graphtemplate2.png
cacti_graphtemplate2.png (13.49 KiB) Viewed 1352 times
cacti_bad_total.png
cacti_bad_total.png (15.13 KiB) Viewed 1355 times
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests