total bandwidth wrong calculation?

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

Moderators: Developers, Moderators

Post Reply
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

total bandwidth wrong calculation?

Post by dagonet »

Hi community,
we are using cacti nearly half a year. Now it seems to me, that the total bandwith is wrong calculated. I have attached to images of a webservers traffic (last day and last week).
As you can see the total out of last week is less the total out of last day.

Dagonet
Attachments
web01_last_day.jpg
web01_last_day.jpg (39.77 KiB) Viewed 3790 times
web01_last_week.jpg
web01_last_week.jpg (36.12 KiB) Viewed 3790 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: total bandwidth wrong calculation?

Post by gandalf »

dagonet wrote:Hi community,
we are using cacti nearly half a year. Now it seems to me, that the total bandwith is wrong calculated. I have attached to images of a webservers traffic (last day and last week).
As you can see the total out of last week is less the total out of last day.

Dagonet
Arghhh, hit again. This is, how rrdtool works (if not specifically configured to work the other way round). See first few links of my signature and http://www.rrdtool.org to learn about consolidation.
To sum up: when viewing at data from last week, you're looking at consolidated data. With built-in Graph Templates, you see 6 values consolidated to one single value representing the AVERAGE of the six (AVERAGE is defined by the Graph Item). This will of course lead to numerically lower values (an AVERAGE can never be greater than each single value).
You may omit this behaviour, when adding another Graph Item for Inbound/Outbound respectively (perhaps a LINE1) that uses the consolidation function MAX(IMUM). Then you'll see that AVERAGE and MAXIMUM will give different results, but only on those Graphs using consolidated data points.
Reinhard
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Unfortunetly I am not that into with rrdtool. I am just using it.
But I can definitly tell, that the total in/out did work correctly, because I already used it. Now it does not work anymore.

So, I did check the total traffic per week using cacti and it did show nearly the same amount as we got from our service provider.

Dagonet
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

After all I did some testing about the issue.
Here are the results:
When I choose "last week" from the timespan section, it shows the result like in my first posting.

When I click on the network graph to get the daily/weekly/monthly/yearly overview, it does work correctly. I do get the total amount of traffic passed from and to the specific device.

Dagonet.
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Hi community,
as lvm suggest I took two more screenshots to illustrate my issue.

Compare the weekly traffic graphs of web01. The Total in/out is not correct calculated in the second image.

Dagonet
Attachments
web01_cacti01.jpg
web01_cacti01.jpg (113.84 KiB) Viewed 3717 times
web01_cacti02.jpg
web01_cacti02.jpg (113.99 KiB) Viewed 3717 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Ok, now I understand better. The second data seems to be about 1/7 of the first one (so it may take one day only into account).
To clarify, please leave the standard Preset and manually select the start/end time from the time picker (for the same week) and post the screenshot. I suppose, that it will give the same, wron results. But this will help me to dig deeper into the code. If my assumption is correct, this will take at least until this weekend
Reinhard
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Here's the requested image, Reinhard.
Attachments
web01_cacti03.jpg
web01_cacti03.jpg (117.15 KiB) Viewed 3686 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Same data, as I expected. So I've to do some code inspection. This will last 'til sunday at least
Reinhard
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

thanks for checking!
I would do it myself, but it is a very complex project.

Dagonet.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I just tried to reproduce.
I was comparing following graphs:
- the one obtained when clicking on the traffic graph, taking the Weekly one
- the one obtained from timeshifter, when choosing "Last Week"
both gave same results for me, when comparing the Total In/Out.
I'm using current 0.8.6h SVN code. Lately, there was some improvement/changes on the Totals Function. It is possible, that this changed sth
Reinhard
anuraganuj
Cacti User
Posts: 70
Joined: Tue Feb 21, 2006 9:50 am

need to convert bytes to bits

Post by anuraganuj »

convert bytes to bits from cdef function
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: need to convert bytes to bits

Post by gandalf »

anuraganuj wrote:convert bytes to bits from cdef function
I wonder whether this is the correct explanation. Cause this should apply to all pictures. And there are two different displays of the same week giving different results.
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please find attached my views generated with current cacti 0.8.6h (from svn). I can't find any deviation between the weekly graph produced when using the timeshifter compared to the view when displaying all 4 rras. Find my graphs attached
Reinhard
Attachments
Graph from TimeShifter
Graph from TimeShifter
weeky-timeshifter.png (75.2 KiB) Viewed 3475 times
Graph from View of all 4 RRAs
Graph from View of all 4 RRAs
weekly-allrra.png (115.12 KiB) Viewed 3475 times
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Hi Reinhard,
so I am going to check the SVN version and see what happens:)
Thanks for your effort!

Dagonet.
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Hi Community, hi lvm!

my problem is solved. But I have no clue why it's working now. I did update my plugins and now it works as excepted.

Dagonet.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests