Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
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
[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]
#---------------------------------------------------------------------------------
# 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)";