[rrd-users] Re: MAX function in CDEF
On Tue, Sep 24, 2002 at 06:40:58PM +0200, Radovan Turan wrote: And this is problem. By manual page, CDEF:y=x1,x2,MAX is the propper function to select maximum of the values x1 and x2. But y is leaved UNKNOWN. max(unknown,unknown) == unknown max(known,unknown) == unknown max(unknown,known) == unknown max(known,known) == known So, if either x1 or x2 (or both) are unknown, so will be the result. Solution: if (x1==unknown) then return x2 elsif (x2==unknown) then return x1 else return max(x1,x2) fi In RPN (may need some debugging which I didn't do!): x1,UN,x2,result_of_next,IF(this is the if-then) result_of_next: x2,UN,x1,result_next,IF (this is the elsif-then) result_next: x1,x2,MAX (in case both x1 and x2 are known) Combined: CDEF:y=x1,UN,x2,x2,UN,x1,x1,x2,MAX This function: f(unknown1,unknown2) == unknown2 f(known1,unknown2) == known1 f(unknown1,known2) == known2 f(known1,known2) == max(known1,known2) will return an unknown only if both x1 AND x2 are unknown. The original function will return unknown if x1 OR x2 are unknown. HTH Alex -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] larrd-grapher.cgi Question
I am trying to graph the number to process in the run que and number of blocked processes. I made the following entry in the larrd-grapher.cgi file: vmstat4 = { hourly = { start_sec = e-48h, title = $host Processes in Que Last 48 Hours, }, daily = { start_sec = e-12d, title = $host Processes in Que Last 12 Days, }, weekly = { start_sec = e-48d, title = $host Processes in Que Last 48 Days, }, monthly = { start_sec = e-576D, title = $host Processes in Que 576 Days, }, yaxis = # of Processes, lines = sub { my ($RRD,$service,$graph,$p,$color)[EMAIL PROTECTED]; return [ #qq{-b 1024}, qq{DEF:r=$host.vmstat.rrd:cpu_r:AVERAGE}, qq{DEF:b=$host.vmstat.rrd:cpu_b:AVERAGE}, qq{LINE1:r#ff:Processes in Run Que}, qq{LINE1:b#00FF00:Blocked Processes}, ] }, }, However, I am not getting any new graphs to appear. Could someone tell me what I am doing wrong. Thanks, Daniel -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] conversion
Hi, I'm using snmpwalk on a switch to get bandwidth data. Say I have a line like the following: IF-MIB::ifInOctets.14 = Counter32: 2049398269 How would I mathematically go about converting that number into bytes (decimal). Is it already in decimal? Or what? Thanks in advance. Joe Rozzi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: conversion
It is in bytes. It's the number of bytes that have passed through the interface since it started counting or since the counters wrapped. So the number itself is probably meaningless. It's the change in value in a known interval that makes it interesting. Therefore, store it as a counter value. Rrdtool will compute (new value - old value) / timespan and store it in the database. serge Maandag. -Original Message- From: Joe Rozzi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 6:42 AM To: rrd-users@list.ee.ethz.ch Subject: [rrd-users] conversion Hi, I'm using snmpwalk on a switch to get bandwidth data. Say I have a line like the following: IF-MIB::ifInOctets.14 = Counter32: 2049398269 How would I mathematically go about converting that number into bytes (decimal). Is it already in decimal? Or what? Thanks in advance. Joe Rozzi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: conversion
I am subtracting it from another value. I have cron running once a day, keeping the value for the beginning of the day, and the value for the end of the day. Then I'm doing (new value - old value) / 8 / 1024 / 1024 to get how many megabytes has passed through in that given amount of time.I was converting the base from 8 to 10, because I thought the value is in octets, but that was wrong I see. So to get MB do I (new value - old value) / 8 / 1024 / 1024, or do I just (new value - old value) / 1024 /1024? I'm confused on which it is? Thanks for your inputs, and in advance, again. Joe Rozzi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Serge Maandag Sent: Wednesday, September 25, 2002 2:47 AM To: Joe Rozzi; rrd-users@list.ee.ethz.ch Subject: [rrd-users] Re: conversion It is in bytes. It's the number of bytes that have passed through the interface since it started counting or since the counters wrapped. So the number itself is probably meaningless. It's the change in value in a known interval that makes it interesting. Therefore, store it as a counter value. Rrdtool will compute (new value - old value) / timespan and store it in the database. serge Maandag. -Original Message- From: Joe Rozzi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 6:42 AM To: rrd-users@list.ee.ethz.ch Subject: [rrd-users] conversion Hi, I'm using snmpwalk on a switch to get bandwidth data. Say I have a line like the following: IF-MIB::ifInOctets.14 = Counter32: 2049398269 How would I mathematically go about converting that number into bytes (decimal). Is it already in decimal? Or what? Thanks in advance. Joe Rozzi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: conversion
You would do: ( (new value - old value) * 8 /1024 / 1024 ) To get the total No of MBytes that passed by during the day. And ( (new value - old value) * 8 /1000 / 1000 )/ 24 * 3600 To get the No of Mbit/s that flew through the interface on average that day. Be sure your counters don't wrap though. It goes up to 2^32 or 4294967295. If it has counted more than that it starts over at 0. If you set up an rrdtool database, you poll the counters and store them in the database, you can let rrdtool do the math for you. It even recognises counter wraps. You can Add a RRA with daily averages, convert those values to total bytes in per day by making in a cdef that multiplies the values with the timespan (24 * 3600). Serge. -Original Message- From: Joe Rozzi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 1:55 PM To: rrd-users@list.ee.ethz.ch Subject: [rrd-users] Re: conversion I am subtracting it from another value. I have cron running once a day, keeping the value for the beginning of the day, and the value for the end of the day. Then I'm doing (new value - old value) / 8 / 1024 / 1024 to get how many megabytes has passed through in that given amount of time.I was converting the base from 8 to 10, because I thought the value is in octets, but that was wrong I see. So to get MB do I (new value - old value) / 8 / 1024 / 1024, or do I just (new value - old value) / 1024 /1024? I'm confused on which it is? Thanks for your inputs, and in advance, again. Joe Rozzi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Serge Maandag Sent: Wednesday, September 25, 2002 2:47 AM To: Joe Rozzi; rrd-users@list.ee.ethz.ch Subject: [rrd-users] Re: conversion It is in bytes. It's the number of bytes that have passed through the interface since it started counting or since the counters wrapped. So the number itself is probably meaningless. It's the change in value in a known interval that makes it interesting. Therefore, store it as a counter value. Rrdtool will compute (new value - old value) / timespan and store it in the database. serge Maandag. -Original Message- From: Joe Rozzi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 6:42 AM To: rrd-users@list.ee.ethz.ch Subject: [rrd-users] conversion Hi, I'm using snmpwalk on a switch to get bandwidth data. Say I have a line like the following: IF-MIB::ifInOctets.14 = Counter32: 2049398269 How would I mathematically go about converting that number into bytes (decimal). Is it already in decimal? Or what? Thanks in advance. Joe Rozzi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: MAX function in CDEF
That's the problem. I had one rrd file with inpropper data. And when I used GE version, graph was O.K because GE(unknown, known) = known ... :-((( Thanks for hint. And when someone else will need this - with Milan Obuch big help, this is solution, how to obtain the biggest value from the 3 inputs: DEF:x1= DEF:x2= DEF:x3= CDEF:biggest=x1,x2,GE,x1,x2,IF,x3,GE,x1,x2,GE,x1,x2,IF,x3,IF or much more efficient readable: CDEF:biggest=x1,x2,GE,x1,x2,IF,DUP,x3,GE,EXC,x3,IF Problem solved, you can close the thread :-) -- Rado1 On Tue, Sep 24, 2002 at 11:44:41PM +0200, Alex van den Bogaerdt wrote: # # On Tue, Sep 24, 2002 at 06:40:58PM +0200, Radovan Turan wrote: # # And this is problem. By manual page, CDEF:y=x1,x2,MAX is the propper # function to select maximum of the values x1 and x2. But y is leaved # UNKNOWN. # # # max(unknown,unknown) == unknown # max(known,unknown) == unknown # max(unknown,known) == unknown # max(known,known) == known # # So, if either x1 or x2 (or both) are unknown, so will be the result. # # Solution: # # if (x1==unknown) # then # return x2 # elsif (x2==unknown) # then # return x1 # else # return max(x1,x2) # fi # # # In RPN (may need some debugging which I didn't do!): # # x1,UN,x2,result_of_next,IF(this is the if-then) # # result_of_next: # x2,UN,x1,result_next,IF (this is the elsif-then) # # result_next: # x1,x2,MAX (in case both x1 and x2 are known) # # # Combined: # # CDEF:y=x1,UN,x2,x2,UN,x1,x1,x2,MAX # # This function: # # f(unknown1,unknown2) == unknown2 # f(known1,unknown2) == known1 # f(unknown1,known2) == known2 # f(known1,known2) == max(known1,known2) # # will return an unknown only if both x1 AND x2 are unknown. # The original function will return unknown if x1 OR x2 are unknown. # # HTH # Alex # # -- # Unsubscribe mailto:[EMAIL PROTECTED] # Helpmailto:[EMAIL PROTECTED] # Archive http://www.ee.ethz.ch/~slist/rrd-users # WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi # -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] HELP needed with rrdtool tune
Hi there, I ran into a performance problem with my SUN monitoring a lot of things with MRTG and RRD So now I want to change the update intervall for some data from the default 5 minutes to 10 minutes The main problem is, that I don't want to loose my old data collected for about one year. So my question is: What happens if I do something like this: -- rrdtool tune filesys.rrd -h TOTAL:120 -h USED:120 -h AVAIL:120 and then only feed data in all 10 minutes instead of 5? How do I change the step value for this rrds or isnt't this nescessary? The output of rrdtool info filesys.rrd now shows the follwing: - ... - step = 300 - ... - ds[TOTAL].minimal_heartbeat = 600 - ... Any help welcome (even a link to a manual ;-) ) JB \|/ @ @ oOO-(_)-OOo- Jürgen Brändle MediaNet Netzwerk- und Applikationsservice Lörracherstr. 5a 79115 Freiburg -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: HELP needed with rrdtool tune
On Wed, Sep 25, 2002 at 03:01:48PM +0200, Braendle, Juergen wrote: I ran into a performance problem with my SUN monitoring a lot of things with MRTG and RRD Hmm.. perl, probably. So now I want to change the update intervall for some data from the default 5 minutes to 10 minutes The main problem is, that I don't want to loose my old data collected for about one year. Just update every 10 minutes. You don't need to alter anything except the heartbeat. The heartbeat needs to be *at*least* 600. So my question is: What happens if I do something like this: -- rrdtool tune filesys.rrd -h TOTAL:120 -h USED:120 -h AVAIL:120 Er, that's two minutes ?!? How do I change the step value for this rrds or isnt't this nescessary? If you would change the step value, you would change the amount of time per PDP and thus the amount of time per CDP. Don't. HTH Alex -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] rrdtool integration using mrtg-rrd
Hi! I trying to do the RRDtool integration with MRTG, but I´m getting this error: Error: RRDs::graph failed, can't parse DEF 'in=c:/mrtg-img/target.rrd:ds0:AVERAGE' -2 I´m trying with mrtg-rrd.cgi and the config start is this one: # EDIT THIS to reflect all your MRTG config files BEGIN { @config_files = qw(c:/mrtg/conf/mrtg.cfg); } In the address location: httP://localhost/cgi-bin/mrtg-rrd.cgi/target.html Mrtg is working and the rrd DB is being updated. It´s a windows 2000 professional with apache 2 for test. If it work I will do the RRDtool integration in a w2k with IIS. Thank you! Augusto Castelan Carlson Florianópolis - SC - Brasil -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] mrtg performance
Hi! I have i friend that sent me an email asking about a problem that he is having with mrtg. I´m going to translate with my poor english. Perhaps something that may help him is to do the RDtool integration? The email is: I´m having some problems to monitor more than 4000 interfaces in habil time, or either, less than 5 minutes. Analysing, mrtg takes most part of the time creating the images and generating the log archives. I´m running MRTG in a XEON 1GHz single, with two RAID SCSI disks, 1GB of RAM (It´s a Compaq hardware) and running Windows 2000 server. The total time to collect and generate the graphs of 24 interfaces of one switch gives a time 10 seconds, giving a total of approximately of 27 minutes. What can I do to optimize MRTG to monitor this volume of interfaces in a time less then 5 minutes? Sugestions? Thank you! Guilherme Thank you! Augusto Castelan Carlson Florianópolis - SC - Brasil -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: rrdtool integration using mrtg-rrd
On Wed, Sep 25, 2002 at 02:30:55PM -0300, Augusto Castelan Carlson wrote: Error: RRDs::graph failed, can't parse DEF 'in=c:/mrtg-img/target.rrd:ds0:AVERAGE' -2 DEF name database datasource consolidationfunction :=: : You have: DEF in c /mrtg-img/target.rrd ds0 AVERAGE : = :: : do you're trying to define this: name in database c datasource /mrtg-img/target.rrd CF ds0 ???AVERAGE You ment to define this ... name in database c:/mrtg-img/target.rrd datasource ds0 CF AVERAGE ... but you didn't. Alex -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: mrtg performance
You need to look for another way to do it. MRTG does not scale well. One idea is to write scripts to collect the snmp stats and log them to flat files. This collection can be done in less than 5 minutes. Write an analysis script and plotting script which run asynchronously to the data collection. I have an older slower solaris system, and easily collect the data from 2600 switches in about 1.5-2. minutes. You really do not need to plot the data every 5 minutes. In a crisis you can look at the raw data if you have it in a flat file, although there are other tools that can be used in a crisis situation. Plotting the data every 20 minutes or so is usually frequent enough I find. This will greatly reduce the load on your monitoring machine. Hopefully others can refer you to existing tools that scale better. Connie Logg - Network Analyst - 650-926-2879 Stanford Linear Accelerator Center MS 97; 2575 SandHill Road; Menlo Park CA 94025 Happiness is found along the way, not at the end of the road -Original Message- From: Augusto Castelan Carlson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 10:50 AM To: 'rrd-users@list.ee.ethz.ch' Subject: [rrd-users] mrtg performance Hi! I have i friend that sent me an email asking about a problem that he is having with mrtg. I´m going to translate with my poor english. Perhaps something that may help him is to do the RDtool integration? The email is: I´m having some problems to monitor more than 4000 interfaces in habil time, or either, less than 5 minutes. Analysing, mrtg takes most part of the time creating the images and generating the log archives. I´m running MRTG in a XEON 1GHz single, with two RAID SCSI disks, 1GB of RAM (It´s a Compaq hardware) and running Windows 2000 server. The total time to collect and generate the graphs of 24 interfaces of one switch gives a time 10 seconds, giving a total of approximately of 27 minutes. What can I do to optimize MRTG to monitor this volume of interfaces in a time less then 5 minutes? Sugestions? Thank you! Guilherme Thank you! Augusto Castelan Carlson Florianópolis - SC - Brasil -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: rrdtool integration using mrtg-rrd
Today Augusto Castelan Carlson wrote: Hi! I trying to do the RRDtool integration with MRTG, but I´m getting this error: Error: RRDs::graph failed, can't parse DEF 'in=c:/mrtg-img/target.rrd:ds0:AVERAGE' -2 note that rrdtool gets confused by the : after the drive letter ... I would rather use just /mrtg and make sure you are running rrdtool on the drive in the first place ... oh and the / has to be a \ in windows you could also just make your life easy by using linux ... tobi I´m trying with mrtg-rrd.cgi and the config start is this one: # EDIT THIS to reflect all your MRTG config files BEGIN { @config_files = qw(c:/mrtg/conf/mrtg.cfg); } In the address location: httP://localhost/cgi-bin/mrtg-rrd.cgi/target.html Mrtg is working and the rrd DB is being updated. It´s a windows 2000 professional with apache 2 for test. If it work I will do the RRDtool integration in a w2k with IIS. Thank you! Augusto Castelan Carlson Florianópolis - SC - Brasil -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi -- ____ _ /_ __/_ / / (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland / // _ \/ _ \/ / phoneto:+41(0)1-632-5286 faxto:+41(0)1-632-1517 /_/ \.__/_.__/_/ [EMAIL PROTECTED] http://google.com/search?q=tobi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: mrtg performance
Today Logg, Connie A. wrote: You need to look for another way to do it. MRTG does not scale well. One idea is to write scripts to collect the snmp stats and log them to flat files. This collection can be done in less than 5 minutes. Write an analysis script and plotting script which run asynchronously to the data collection. Connie, I must object, of you use the fork option in mrtg the snmp data collection can be improved a lot ... further can you run mrtg as a daemon which saves the startup time which again is substantial with a large config file ... and last you can use rrdtool for logging within mrtg which will cut down logging time massively ... depending on the amount of diskcache (ram) your box has, it will be able to log between 30 and 1000 values a second ... Oh, and you are using Unix I hope... cheers tobi -- ____ _ /_ __/_ / / (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland / // _ \/ _ \/ / phoneto:+41(0)1-632-5286 faxto:+41(0)1-632-1517 /_/ \.__/_.__/_/ [EMAIL PROTECTED] http://google.com/search?q=tobi -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi