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

Traffic Summation calculating incorrect values

Post by drawkcab »

Today I was tidying up my graph templates, upgraded to RRD tool 1.2 and changed defaults fonts. Unfortunately since then (and I cant pinpoint exactly which change did it) data summation on my traffic graphs has been rather broken and for the life of me I cant work out why. Even graphs with templates I didnt touch are summating wrong now.
Summation totals for 24 hour periods seem to be always ~5 times less than what they should be.

Attached graph shows this.

Average inbound is 38.06Megabit. 38.06Megabit is 0.0047575 Gigabytes. (86400 seconds in a 24 hour period) * 0.0047575 Gigabytes = 411.048 GB

However the graph, as attached only calculated 82.2? 5 times less than what it should be. Any ideas on what I have broken?

The COMMENT fields for the summation are:

Code: Select all

Total In: |sum:auto:current:2:auto|
Total Out: |sum:auto:current:2:auto|
The RRDTool code of the attached graph is:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title=" xxx " \
--rigid \
--base=1000 \
--height=150 \
--width=600 \
--upper-limit=50000000 \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12:/usr/share/fonts/truetype/BankGothicLightBT.ttf \
--font LEGEND:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
DEF:a="/usr/share/cacti/site/rra/core_traffic_in_250.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/core_traffic_in_250.rrd":traffic_out:AVERAGE \
DEF:c="/usr/share/cacti/site/rra/core_traffic_in_250.rrd":traffic_in:AVERAGE \
DEF:d="/usr/share/cacti/site/rra/core_traffic_in_250.rrd":traffic_in:AVERAGE \
CDEF:cdefa=d,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefba=d,0,*,50000000,0.75,*,+ \
CDEF:cdefbb=d,0,*,50000000,1,*,+ \
AREA:cdefa#797C6E:"Inbound"  \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total In\: 82.2 GB\n"  \
LINE1:cdeff#55D6D3:"Outbound"  \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total Out\: 38.32 GB\n"  \
LINE1:cdefba#DE0056:"75% Utilisation\n"  \
LINE1:cdefbb#333333:"100% Utilisation" 
Attachments
dailygraph.png
dailygraph.png (32.12 KiB) Viewed 4347 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

What version of Cacti?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
ddouma
Posts: 49
Joined: Sun Aug 06, 2006 1:02 pm

Post by ddouma »

I have the same problem, BUT if you click on the graph it works..

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

Post by drawkcab »

Cacti 0.8.6h
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

If you click on the graph it works?

Can you post example graphs?

I really want to track this down, this is the 4th report of summation calculation issues.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
ddouma
Posts: 49
Joined: Sun Aug 06, 2006 1:02 pm

Post by ddouma »

DATE: 23-05 till 24-05

Image

My ISP says I used that day about +/- 7,6 GB.

If I do:

61,79k = 0.000058927 GB * 86400 = 5.091 GB (86400secs=24hours)
29,42k = 0.000028057 GB * 86400 = 2.424 GB (86400secs=24hours)

5.091 + 2.424 = 7.515 GB


How can that be??


Also:

I use the 1 min modification, this is the screen shot:

Image

How can the 5 minute average say about 600k, and the 1 min average says only above 100k used??
ddouma
Posts: 49
Joined: Sun Aug 06, 2006 1:02 pm

Post by ddouma »

What I just want is that cacti counts the TOTAL, not the average of a day/week/month. For a dedicated server host we want to calc everything, and not just average.

How do I set this?
drawkcab
Posts: 10
Joined: Wed Mar 08, 2006 8:16 am

Post by drawkcab »

rony, let me know if you need any further details. My rrd's, or specific configs - to help try and track down the mysterious summation issue.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Something is wrong with your 1 minute average graph.

In and out are the same, but aren't the same on the 5 minute?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
ddouma
Posts: 49
Joined: Sun Aug 06, 2006 1:02 pm

Post by ddouma »

Graphs also get lost, see my second post: http://forums.cacti.net/viewtopic.php?t=21473

Maybe these 2 problems have something in common.
drawkcab
Posts: 10
Joined: Wed Mar 08, 2006 8:16 am

Post by drawkcab »

rony, of the reports you have seen - do these users run rrdtool 1.2 ?

ddouma, did you create those graphs before upgrading to rrdtool 1.2 or did you start out with 1.2 ?

My graphs were all created with 1.x and summated properly, now with 1.2 they dont. Allthough due to my other template changes, cant be 100% sure it was the upgrade that has caused the issue.
drawkcab
Posts: 10
Joined: Wed Mar 08, 2006 8:16 am

Post by drawkcab »

Actually, ignore that, have since found previously saved graphs using rrdtool 1.2 (can tell by the antialiasing) where summation was functioning correctly.

Same graphs with similar averages attached, with hugely different totals.
Attachments
totaltraf_summationfucked.gif
totaltraf_summationfucked.gif (37.9 KiB) Viewed 4148 times
totaltraf_summationgood.gif
totaltraf_summationgood.gif (41.06 KiB) Viewed 4148 times
ddouma
Posts: 49
Joined: Sun Aug 06, 2006 1:02 pm

Post by ddouma »

I always used 1.2.

But this problem is since to upgrade to cacti version 'j'.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

drawkcab,

Can you post the graph items for the "screwed" up graph?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
ddouma
Posts: 49
Joined: Sun Aug 06, 2006 1:02 pm

Post by ddouma »

Rony, do you think this problem has also something to do with my losing grapsh from 2+ days?
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests