[rrd-users] Re: Bandwidth per week
I posted this already earlier. but I think with some adjustments it can be used for your purpose. I don't know your perl-scripting skills but it is pretty simple script. here is a(working) sample for month and year stats, http://haas.oezie.org/cgi-bin/traffic.pl?jaar=2005&maand=4 and http://haas.oezie.org/cgi-bin/traffic.pl?jaar=2005. the source of the scripts is at the bottom of the page. if there are any question, just ask. mvg Erik de Mare Anders Nielsen wrote: >I am monitoring the bandwidth usage on the different network interfaces >with rrd and it's great :) > >However, I would also like to know how much bandwidth we are using per >week. How can I accomplish this with rrd? > >I am using Redhat Linux > >Thanks in advance > Anders Nielsen > -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Bandwidth per week
> However, I would also like to know how much bandwidth we are using per > week. How can I accomplish this with rrd? Weekly, query RRD for the average rate for the last week. Multiply that rate by 7*86400. Record that rate as a GAUGE value. -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Bandwidth per week
I am monitoring the bandwidth usage on the different network interfaces with rrd and it's great :) However, I would also like to know how much bandwidth we are using per week. How can I accomplish this with rrd? I am using Redhat Linux Thanks in advance Anders Nielsen -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Help on listing available DEF fields
On Thu, Apr 14, 2005 at 04:40:09PM +0200, Serge Maandag wrote: > > Is there any way to list all available fields in RRD > > database? > > Yes, > > rrdtool info file.rrd | grep type > > Serge. Thanks for your answers. Now another related question, I hope this is the last one :-) "rddtool info" returned me the data below, can you give me a sample command to use xport to retrieve the data in this file? I couldn't imagine how to find a DEF parameter for this info. Thanks, Pedro filename = "172.20.254.1_1.rrd" rrd_version = "0001" step = 300 last_update = 1113490960 ds[ds0].type = "COUNTER" ds[ds0].minimal_heartbeat = 600 ds[ds0].min = 0.00e+00 ds[ds0].max = 7.60e+04 ds[ds0].last_ds = "1854409829" ds[ds0].value = 4.44e+04 ds[ds0].unknown_sec = 0 ds[ds1].type = "COUNTER" ds[ds1].minimal_heartbeat = 600 ds[ds1].min = 0.00e+00 ds[ds1].max = 7.60e+04 rra[0].cf = "AVERAGE" rra[0].rows = 800 rra[0].pdp_per_row = 1 rra[0].xff = 5.00e-01 rra[0].cdp_prep[0].value = NaN rra[0].cdp_prep[0].unknown_datapoints = 0 rra[0].cdp_prep[1].value = NaN rra[0].cdp_prep[1].unknown_datapoints = 0 rra[1].cf = "AVERAGE" rra[1].rows = 800 rra[1].pdp_per_row = 6 rra[1].xff = 5.00e-01 (rra goes up to rra[6]) -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Adding many data samples at once
On Thu, Apr 14, 2005 at 11:01:20AM -0400, Marc Bilodeau wrote: > You're right about the order of variables. It was a typo!. > > I tried your recommendation and still I get the error message: > > ERROR while updating 21.rrd: expected 2 data source readings (got 576) That means you have the equivalent of: rrdtool update file.rrd time1:1:time2:2:time3:3:time4:4:... You want: rrdtool update file.rrd time1:1 time2:2 time3:3 time4:4 ... Another approach would be to use the remote command method: have a file: update file.rrd time1:1 update file.rrd time2:2 update file.rrd time3:3 update file.rrd time4:4 [...] or this one: update file.rrd time1:1 time2:2 update file.rrd time3:3 time4:4 [...] and pipe it through rrdtool: mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Adding many data samples at once
You're right about the order of variables. It was a typo!. I tried your recommendation and still I get the error message: ERROR while updating 21.rrd: expected 2 data source readings (got 576) The issue is with LOTS of RRDs the performance lags when you create an RRD and try to fit a months worth of 5 minutes samples into several rrds at once (converting some raw 5 minutes samples into rrd files). Right now, to do 10 rrd files at 8928 (number of 5 minutes samples in 31 days) takes 10 to 11 seconds. I'm trying to reduce this into a single RRD update perl file in order to reduce the overall time to convert. For those who are interested, here is my complete example: use RRDs; # 288 = day # 2016 = 7 days # 8928 = 31 days if (! $ARGV[0]) { print "\n\nNo Arg specified defaulting to 8928 (31 days)\n"; $ARGV[0] = 8928; } print "Total Datapoints: $ARGV[0]\n"; foreach (1..10) { unlink "2${_}.rrd"; RRDs::create ("2${_}.rrd", "--start","1", "DS:input:GAUGE:600:U:U", "DS:output:GAUGE:600:U:U", "RRA:AVERAGE:0.5:1:600", "RRA:AVERAGE:0.5:6:700", "RRA:AVERAGE:0.5:24:775", "RRA:AVERAGE:0.5:288:797", "RRA:MAX:0.5:1:600", "RRA:MAX:0.5:6:700", "RRA:MAX:0.5:24:775", "RRA:MAX:0.5:288:797" ); } $StartTime = time(); foreach $c (1 .. 10) { @DataPoints = undef; foreach $d (1 .. $ARGV[0]) { $TimeStamp = time() + ($d * 300); $in = int(rand(100)); $out = int(rand(100)); push (@DataPoints, "${TimeStamp}:${in}:${out}"); } #RRDs::update ("2${c}.rrd", @DataPoints); RRDs::update ("2${c}.rrd", join (" ",@DataPoints)); my $ERR=RRDs::error; die "ERROR while updating 2${c}.rrd: $ERR\n" if $ERR; } $totalTime = time() - $StartTime; print "total time : $totalTime\n"; I appreciate the help! Sincerely, Marc -Original Message- From: Serge Maandag [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 10:46 AM To: Marc Bilodeau; rrd-users@list.ee.ethz.ch Subject: RE: [rrd-users] Re: Adding many data samples at once > foreach (1..5000) { > $NewTimeStamp = $baseTime + 300; > Push (@DataPoints, "ValIn:ValOut:$NewTimeStamp"); > } shouldn't that be "$NewTimeStamp:ValIn:ValOut" ? > RRDs::update ("test.rrd", @DataPoints); > > The problem is that this will produce an error because it > tells me that it > was looking for 2 data points but got 5000 (in this example). > How can I > perform this update in 1 rrd update instead of (much slower) > 5000 updates? Uhm, perhaps this works? RRDs::update ("test.rrd", join (" ",@DataPoints)); Serge. - Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php - For the content of this e-mail message and its attachment(s) the following disclaimer applies: http://www.zeelandnet.nl/disclaimer.php --- [This E-mail scanned for viruses by Declude Virus] --- [This E-mail scanned for viruses by Declude Virus] -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: How to simply insert and extract data in rrdtool without any averaging
> But extracting the data from our archive, we see that > averaging is done > whenever we set the hearbeat greater than the step. But if we set > heartbeat also to 10s, we get "Unknown" values all the time. > > Any hints what we could do? update exactly on N x step epoch timestamps. Then rrdtool will not need to interpolate. Serge. - Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php - For the content of this e-mail message and its attachment(s) the following disclaimer applies: http://www.zeelandnet.nl/disclaimer.php -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Adding many data samples at once
> foreach (1..5000) { > $NewTimeStamp = $baseTime + 300; > Push (@DataPoints, "ValIn:ValOut:$NewTimeStamp"); > } shouldn't that be "$NewTimeStamp:ValIn:ValOut" ? > RRDs::update ("test.rrd", @DataPoints); > > The problem is that this will produce an error because it > tells me that it > was looking for 2 data points but got 5000 (in this example). > How can I > perform this update in 1 rrd update instead of (much slower) > 5000 updates? Uhm, perhaps this works? RRDs::update ("test.rrd", join (" ",@DataPoints)); Serge. - Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php - For the content of this e-mail message and its attachment(s) the following disclaimer applies: http://www.zeelandnet.nl/disclaimer.php -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Help on listing available DEF fields
> Is there any way to list all available fields in RRD > database? Yes, rrdtool info file.rrd | grep type Serge. - Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php - For the content of this e-mail message and its attachment(s) the following disclaimer applies: http://www.zeelandnet.nl/disclaimer.php -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Help on listing available DEF fields
Hi, I am new to RRD and have a problem that I think is simple (well, for me it seems simple, but I could find no answer :-) I already have some SNMP machines sending data to MRTG that stores in RRD (this environment was already implemented, but I did not implement anything). Now I need to get data from RRD to use in shell/perl scripts. Reading RRD manpages, I discovered that this can be done with: rrdtool xport \ --start now-1h --end now \ DEF:xx=host-inout.lo.rrd:output:AVERAGE \ DEF:yy=host-inout.lo.rrd:input:AVERAGE \ XPORT:xx:"out bytes" \ XPORT:yy:"in bytes" I'd like to know what can I put in "host-inout.lo.rrd:output" field for all the computers and all the interfaces. Is seems to be a field specification. Is there any way to list all available fields in RRD database? Thanks in advance, Pedro -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] How to simply insert and extract data in rrdtool without any averaging
Hi, we use rrd.tool to insert sample data and extract it to a graph. We insert data every 10s. We would like to simply store the data and retrieve it without any averaging done whatsoever. We use the following command: rrdtool create ${RRDPATH}/st_${DBNAME}_${HOST}.rrd --start N --step 10 DS:chr:GAUGE:15:0:100 DS:datareads:GAUGE:15:0:20 DS:datawrites:GAUGE:15:0:20 RRA:LAST:0.5:1:8640 But extracting the data from our archive, we see that averaging is done whenever we set the hearbeat greater than the step. But if we set heartbeat also to 10s, we get "Unknown" values all the time. Any hints what we could do? Thanks very much Bye Sabine -- Würth Phoenix S.r.l. Sabine Bödefeld System Integration Via Kravogl 4 I-39100 Bolzano Direct +39 0471 564 173 Fax +39 0471 564 122 email: [EMAIL PROTECTED] Website: http://www.wuerth-phoenix.com -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Adding many data samples at once
Hi All, I was having a problem updating an RRD file with multiple data point using the Perl modules (RRDs). My dilemma is I need to assemble all my data points ahead of time and then dump them into the rrd like: foreach (1..5000) { $NewTimeStamp = $baseTime + 300; Push (@DataPoints, "ValIn:ValOut:$NewTimeStamp"); } RRDs::update ("test.rrd", @DataPoints); The problem is that this will produce an error because it tells me that it was looking for 2 data points but got 5000 (in this example). How can I perform this update in 1 rrd update instead of (much slower) 5000 updates? Sincerely, Marc --- [This E-mail scanned for viruses by Declude Virus] -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Graph: start of '--step' Consolidation
> >Then you probably will have to use a step size of 1 day. > This could be true, but is look very strange and doesn't fit > into my idea... When the row size of your highest resolution RRA is 1 week, then your database will contain a value for the end of each week. That value will have an epoch timestamp of N x 604800. With N being an integer. The closest N times 604800 may have been at a wednesday for the start of your graph. You want to have the agility to choose the starting day. Giving the database a 1 day resolution will help you. > This didn't affect the start of week. Do you mean --end or the end of > Data in the rra? --end Serge. - Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php - For the content of this e-mail message and its attachment(s) the following disclaimer applies: http://www.zeelandnet.nl/disclaimer.php -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: Graph: start of '--step' Consolidation
Serge Maandag wrote: >Then you probably will have to use a step size of 1 day. > > This could be true, but is look very strange and doesn't fit into my idea... >You will also have to specify an end time when graphing to make sure >the graph ends on a sunday. > > This didn't affect the start of week. Do you mean --end or the end of Data in the rra? Thanks. greetings, Synox -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] problem with RRDs::graph
I'm trying to use the perl module the RRDs:update works fine but RRDs:graph alays give me the same error on 2 different machines, a linux debian with rrdtool 1.0.49, perl 5.8.4 and on Mac OS X with rrdtool 1.0.49, perl 5.8.1 here is the script with the error (I'm aperl beginner so ... might not be the best code you've seen): = SCRIPT === #!/usr/bin/perl -w use SNMP; use RRDs; die "usage :\n\t snmp.pl host community nb_cpu rrd_file graph_path\n\n" if(@ARGV <5); $ENV{'MIBS'}="ALL"; #Load all available MIBs ($SNMP_TARGET, $SNMP_COMMUNITY, $NBCPU, $RRD_FILE, $RRD_GRAPH_PATH) = @ARGV; $SESSION = new SNMP::Session (DestHost => $SNMP_TARGET, Community => $SNMP_COMMUNITY, Version => '2c'); # # Get the snmp values # $user=$SESSION->get('ssCpuRawUser.0'); $system=$SESSION->get('ssCpuRawSystem.0'); $idle=$SESSION->get('ssCpuRawIdle.0'); $kernel=$SESSION->get('ssCpuRawKernel.0'); $nice=$SESSION->get('ssCpuRawNice.0'); # # update the RDD # RRDs::update($RRD_FILE,"N:$user:$system:$idle:$kernel:$nice:$NBCPU"); my $ERR=RRDs::error; die "ERROR while updating mem.rrd: $ERR\n" if $ERR; # # Crate the graph # RRDs::graph ( "$RRD_GRAPH_PATH/sys_day.gif ", \ "--title=Dayly system use", \ "--start -84600", \ "-u 100", \ "-r",\ "-M", \ "DEF:User=$RRD_FILE:user:AVERAGE", \ "DEF:System=$RRD_FILE:system:AVERAGE", \ "DEF:Idle=$RRD_FILE:idle:AVERAGE", \ "DEF:Kernel=$RRD_FILE:kernel:AVERAGE", \ "DEF:Nice=$RRD_FILE:nice:AVERAGE", \ "DEF:Cpu=$RRD_FILE:cpu:AVERAGE", \ "CDEF:pUser=User,Cpu,/", \ "CDEF:pSystem=System,Cpu,/", \ "CDEF:pIdle=Idle,Cpu,/", \ "CDEF:pKernel=Kernel,Cpu,/", \ "CDEF:pNice=Nice,Cpu,/", \ "AREA:pUser#00FF00:user", \ "LINE1:pSystem#FF8080:system", \ "LINE1:pIdle#FF:idle"); my $err=RRDs::error; die "problem generating the graph: $err\n" if ($err) ; == END SCRIPT = and here is the error : problem generating the graph: unknown function 'SCALAR' if I doing the same graph using the command line (rrdtol graph ...) either from perl (`rrdtool graph `) or bash it works anybody has any idea how to help me out of this ?! thanks Rodolphe -- |Rodolphe PineauRTI-Zone| | http://www.rti-zone.org/ | | Coldfire Robot / Unix / Atari / Astronomy | -- Attached file removed by Ecartis and put at URL below -- -- Type: application/pkcs7-signature -- Size: 2k (2367 bytes) -- URL : http://lists.ee.ethz.ch/p/425DC2F328784-smime.p7s -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi
[rrd-users] Re: how to input the old data with "update" parameter?
On Thu, Apr 14, 2005 at 01:11:29AM +0800, JoeCen wrote: > 1$B!"(B > I create a new "rrd" file : > /opt/rrdtool/bin/rrdtool create \ > one.rrd \ > --start `date -d '2005/04/01' +%s` \ > --step 300 \ > DS:test1:GAUGE:600:0:100 \ ^^ GAUGE and between 0 and 100 > value=123 start at 123 ... >value=`expr $value + 1` and increase each time. > why$B!)(B > Is there anything I miss? Every update is outside the allowed range so every update is discarded as per the manual. Alex -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdminhttp://lists.ee.ethz.ch/lsg2.cgi