bad Total Bandwidth

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
kiruah
Posts: 5
Joined: Tue May 04, 2010 8:52 am

bad Total Bandwidth

Post by kiruah »

Hello

Now I use Cacti in a production environment for 6 months and it's really a nice tool, with a reactive comunity.
Linux I have a machine whose traffic is regularly 700Mb / s, the traffic did not exceed 200mb / s of traffic, with the plugin "fix64bit" the problem is resolved!

My problem:

I hope to have the total traffic, I changed the template of "Interface - Traffic (bits / sec)" to "Interface - Traffic (bits / sec, Total Bandwidth)." Today the average is 327.47 M / s

Cacti is 3.43T, my 26,98T are wrong ?
My calcul:

Code: Select all

327.47*60(secondes)*60(minutes)*24(heures)=28293408M/1024=27630G/1024=26,98T
thank you for your return

Info :

calculating the sum of:

Code: Select all

Total Out: | sum: auto: current: 2: auto |
Graph/source propertie :

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1272905920 \
--end=1272992320 \
--title="xxxxx - Traffic - xxxx" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2010/05/03 18\:58\:40 To 2010/05/04 18\:58\:40\c" \
COMMENT:"  \n" \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti-0.8.7e/rra/xxxxx_traffic_in_28.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti-0.8.7e/rra/xxxxx_traffic_in_28.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
COMMENT:"Total In\:  450.26 GB\n"  \
LINE1:cdeff#002A97FF:"Outbound"  \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s\n"  \
COMMENT:"Total Out\: 3.44 TB\n" 
my graph:
Attachments
bad Total Bandwidth
bad Total Bandwidth
ScreenShot137.png (29.12 KiB) Viewed 2858 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Unless you've altered the default rra settings, you're experiencing the following: http://docs.cacti.net/manual:088:8_rrdt ... solidation
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Traffic is base 1000, not base 1024.
[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]
kiruah
Posts: 5
Joined: Tue May 04, 2010 8:52 am

Post by kiruah »

hello

thanks for your reply,

I looked at the page http://docs.cacti.net/manual:088:8_rrdt ... solidation # about_consolidation,

I stupidly tried with a file test.pl

Code: Select all

#---------------------------------------------------------------------------------
# create first DB
#---------------------------------------------------------------------------------
# name of rrd file for test data
my $db1         = "/tmp/rrddemo1.rrd";
my $interval    = 300;          # time between two data points (pdp's)
my $heartbeat   = 2*$interval;  # heartbeat
my $xff         = 0.5;          # primary data point's necessary to form one cdp

# last timestamp of rrd should equal actual time
# rounded to the last interval
my $no_iter     = 40;
my $end         = `date +%s`;
$end            = $interval * int($end/$interval);
my $start       = $end - $no_iter * $interval;

# define all consolidation functions to be used
my $CF1         = "AVERAGE";
my $CF2         = "MAX";
my $CF3         = "MIN";
my $CF4         = "LAST";

# steps and rows
my $rra1step    = 1;                            # no of steps in rra 1
my $rra1rows    = 5;                            # no of pdp's in rra 1
my $rra2step    = 5;                            # no of steps (pdp's of rra 1) to form one cdp
my $rra2rows    = int($no_iter/$rra2step)+1;    # no of cdp's in rra 2

RRDs::create(
    $db1,
    "--step=$interval",
    "--start=" . ($start-10),
#   define datasource
    "DS:load:GAUGE:$heartbeat:U:U",
#   consolidation function 1
    "RRA:$CF1:$xff:$rra1step:$rra1rows",
    "RRA:$CF1:$xff:$rra2step:$rra2rows",
#   consolidation function 2
    "RRA:$CF2:$xff:$rra1step:$rra1rows",
    "RRA:$CF2:$xff:$rra2step:$rra2rows",
#   consolidation function 3
    "RRA:$CF3:$xff:$rra1step:$rra1rows",
    "RRA:$CF3:$xff:$rra2step:$rra2rows",
#   consolidation function 4
    "RRA:$CF4:$xff:$rra1step:$rra1rows",
    "RRA:$CF4:$xff:$rra2step:$rra2rows",
    ) or die "Cannot create rrd ($RRDs::error)";
	
#---------------------------------------------------------------------------------
# create second DB
# it will hold all data in its first rra
# without consolidation
# (therefor it is much bigger than the first one)
#---------------------------------------------------------------------------------
# name of rrd file for test data
my $db2         = "/tmp/rrddemo2.rrd";

RRDs::create(
    $db2,
    "--step=$interval",
    "--start=" . ($start-10),
#   define datasource
    "DS:load:GAUGE:$heartbeat:U:U",
#   consolidation function 1
    "RRA:$CF1:$xff:$rra1step:$no_iter",
    ) or die "Cannot create rrd ($RRDs::error)";
	
#------------------------------------------
# generate rrd graph
#------------------------------------------
my $graph       = "/tmp/rrddemo1.png";
# defines some constants for graphing
my $width       = 500;
my $height      = 180;

RRDs::graph("$graph",
    "--title=RRDtool Test: consolidation principles",
    "--start=" . $start,
    "--end=" . $end,
    "--width=" . $width,
    "--height=" . $height,
    "DEF:demo2=$db2:load:$CF1",
    "DEF:demo11=$db1:load:$CF1",
    "DEF:demo12=$
	
    "DEF:demo13=$db1:load:$CF3",
    "DEF:demo14=$db1:load:$CF4",
    "COMMENT:raw data as follows, filesize=$db2size\\n",
    "LINE1:demo2#CCCCCC:RAW DATA, no consolidation\\n",
    "COMMENT:Consolidated data as follows, filesize=$db1size\\n",
    "LINE1:demo11#FF0000:CF=AVERAGE\\n",
    "LINE1:demo12#00FF00:CF=MAX equals CF=LAST in this case\\n",
    "LINE1:demo13#0000FF:CF=MIN\\n",
#   "LINE1:demo14#000000:CF=LAST\\n",
       ) or die "graph failed ($RRDs::error)";
Then I run

Code: Select all

perl test.pl
and the result

Code: Select all

Undefined subroutine &RRDs::create called at test.pl line 29.
[/b]

I look for the perl module with

Code: Select all

perl -MRRDs -le 'print q(ok!)'
and it is ok

any idea?
kiruah
Posts: 5
Joined: Tue May 04, 2010 8:52 am

Post by kiruah »

Hello

any idea? :D

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest