[rrd-users] Convert .rrd to .log ?
Hi... I am really trying to find a solution to this issue I am having. I am using the routers.cgi frontend which works great. What it doesnt do is have the ability to show total daily usage with historical capability. I want to be able to look up what the usage was in.. say January, and being able to show the daily totals. Does anyone know how to store historical data? I thought of converting the .rrd files back to mrtg .log format and using the tool from Toby's mrtg page http://iserv.nl/traffic/totaal/ (log file analysis by Seth). If there is an easier way to be able to get the data from a .rrd file.. please help... it is driving me nutso. ...Skeeve -- 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: rrd_fetch Segmentation Fault - getopts
Hello, RE: optind=0; It is indeed reset at the start of the function HandleInputLine. Which did confuse me a little bit, but I figure that something was being called in the intermediate code between the initialisation and the call to rrd_fetch that would use getopt. Which would eventually cause rrd_fetch to start processing with an erronous value of optind. The line I am using to call rrd tool is the following, interpreted by Perl 5.6.0 standard with Red Hat 7.2. my ($start,$step,$names,$data) = RRDs::fetch ($targetdata, $cf, "--start", $startval); Where cf is AVERAGE for a a few hundred iterations and then MAX. Start value is always either, -1day, -5days, -1month, 6months. The use of the --start argument causes getopt to be used. According to previous list postings, it is only in the case of using the --arguments that a segfault could be caused. Without them, it should not segfault, which is probably because it doesn't call getopt. What I will insert a debug message in rrd_tool.c to print out the value of optind before calling rrd_fetch. I will also remove my addition of the optind=0 and opterr=0 at line 512. Then we shall see if it changed! In theory I could do a dump of the code executed before the crash, but it has been so long since I have spent any time on c debugging that I fear it would probably spend too much time on it.. I don't really remember how to do it. ;-) Francois Mikus > > > > Francois, > > Can you shed any light on you optind should be reset again > when it gets reset at the beginning of the function ? > > does it get overwritten ? > > confused > 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: rrd_fetch Segmentation Fault - getopts
Today Francois Mikus wrote: > > Anyways, if someone has run into the same problems, I hope this helps. > In any case, should the change make sense, feel free to submit the > change in cvs. I do not have access to it, nor do I intend to. ;-) > > The diff was run against rrd_tool.c from the CVS snapshot of RRDtool > 1.1.x dated 2002-07-04. > > [EMAIL PROTECTED] src]# diff ../../rrdtool-2002-07-04/src/rrd_tool.c > rrd_tool.c > 511a512,513 > > optind=0; > > opterr=0; > > Francois, Can you shed any light on you optind should be reset again when it gets reset at the beginning of the function ? does it get overwritten ? confused 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
[rrd-users] Re: Convert from MRTG to RRD
Hi. I'm introducing to the RRd's world, I would like to know more about RRDtool to be able to do my own database and feed this with RRDtool. I'd like to someone can send me some sample code, as Max is requiring. May be this can help more to people like Max and Me to understand more this powerfull tool. Thank you in advance Giovanni Enriquez ICQ: 8266266 > Hi all - > > I was wondering if someone could offer me some quick advise. > > We currently use RRDtool with custom scripts on the front end and MRTG > for collection on the backend. I'm going through the documentation now > and trying to configure some scripts to do the collection with RRD. I'd > like to have RRA's that give me the same history as MRTG had, weekly, > monthly yearly, and am a bit confused about how to do it. > > Can someone offer some help or sample code? > > Thanks - Max -- --- remember, information is not knowledge, knowledge is not wisdom wisdom is not truth truth is not beauty beauty is not love love is not music music is the best --- Frank Zappa * GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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] rrd_fetch Segmentation Fault - getopts
Hello all, A few messages have passed by in relation to problems with the getopts counters that are used in parsing input to different rrd-tool functions. I believe fixes have been made for rrd_graph.c / RRDs::graph . Unfortunatly, I am running into problems within the fetch function. Just to recap, the problem is a segmentation fault on repetitive calls from a perl program to an rrd_* function such as graph, update or fetch. It seems to be caused by opt_ind and opt_err not being reset and causing the segfault in rdd_fetch.c. This would happen at semi-random numbers of iterations. After, approx: 150 to 400 calls. Within rrd_tool.c which is what calls graph, fetch and update. I was running into problems with the calls to fetch at line 512 of rrd_tool.c. I added: optind = 0; opterr = 0; Just before the call to fetch and, voila, my program would no longer segfault when calling fetch. The same "fix" seems to have been added in rrd_tool.c just before the call to the graph function at line 372. The usage of optind=0 seems to be a bit controversial in the sense some people say it should be reset to 1, other say it should be reset to 0 before calling a function that will parse arguments using getopts library. Anyways, if someone has run into the same problems, I hope this helps. In any case, should the change make sense, feel free to submit the change in cvs. I do not have access to it, nor do I intend to. ;-) The diff was run against rrd_tool.c from the CVS snapshot of RRDtool 1.1.x dated 2002-07-04. [EMAIL PROTECTED] src]# diff ../../rrdtool-2002-07-04/src/rrd_tool.c rrd_tool.c 511a512,513 > optind=0; > opterr=0; Francois Mikus -- 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] Convert from MRTG to RRD
Hi all - I was wondering if someone could offer me some quick advise. We currently use RRDtool with custom scripts on the front end and MRTG for collection on the backend. I'm going through the documentation now and trying to configure some scripts to do the collection with RRD. I'd like to have RRA's that give me the same history as MRTG had, weekly, monthly yearly, and am a bit confused about how to do it. Can someone offer some help or sample code? Thanks - Max -- 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: disk usage update on W2k
* Jarek Sobkowiak <[EMAIL PROTECTED]> [020708 07:56] wrote: > > Where can I find the information about the disk usage on W2k server. > I tried with host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed, > but it seems only to update if I restart the SNMP service on the server. > > Can anybody help me? Apparently this is a known issue; see: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q295587 Microsoft apparently has a fix, but you need to contact support, which could cost money, and they haven't released it publically, which is troubling. As far as I can tell, you have two other options. One is to use another SNMP agent which does give this information to you. The other is to write a batch file which restarts the SNMP service periodically. If I'm wrong, I'd be happy to hear about it. --Michael -- 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] disk usage update on W2k
Where can I find the information about the disk usage on W2k server. I tried with host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed, but it seems only to update if I restart the SNMP service on the server. Can anybody help me? Thank You. -- 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: Plotting number of samples/values
Alex the values are from a external program which reports the status of a modem call. A log file is created form the program with samples every 15 mins. So the program reports the following values 0,100, 200,300,400, 500, 600 depending on the status of the call. The create is : RRDs::create ("$RRD", "-b", $START, "-s", 900, "DS:ds0:GAUGE:86400:U:U", "DS:ds1:GAUGE:86400:U:U", "RRA:AVERAGE:0.5:1:900", "RRA:MAX:0.5:1:900", "RRA:AVERAGE:0.5:6:900", "RRA:MAX:0.5:6:900", "RRA:AVERAGE:0.5:24:900", "RRA:MAX:0.5:24:900", "RRA:AVERAGE:0.5:288:900", "RRA:MAX:0.5:288:900"); The rrd is updated every 2 hours. So, my objective is to plot the values (I hope that the graph attached is correct) and print the percentages of the values relative to the total number of calls during predefined time periods (daily, weekly etc) and/or the number for each value. The number is not printed . I am not so expirenced with PRN expression and is most likely to make same mistakes. The graph script is following : rrdtool graph /call.gif \ --width '500' \ --height '160' \ --start 'e-1w' \ --end 'n-3d' \ --title 'Call Success' \ 'DEF:C=/path/callsuceess.rrd:ds0:MAX' \ 'CDEF:num500=C,600,EQ,900,*' \ 'CDEF:num500=C,500,EQ,900,*' \ 'CDEF:num400=C,400,EQ,900,*' \ 'CDEF:num300=C,300,EQ,900,*' \ 'CDEF:num200=C,200,EQ,900,*' \ 'CDEF:num100=C,100,EQ,900,*' \ 'CDEF:num0=C,0,EQ,900,*' \ 'AREA:C#00FF00:Call Success ' \ 'GPRINT:C:MIN:(min=%3.2lf' \ 'GPRINT:C:AVERAGE:ave=%3.2lf' \ 'GPRINT:C:MAX:max=%3.2lf)' \ 'COMMENT:\n' \ 'GPRINT:num0:AVERAGE:0:%3.2lf' \ 'GPRINT:num100:AVERAGE:100:%3.2lf' \ 'COMMENT:\n' \ Any ideas ? A sample image is attached. Thanks in advance for your help Best Regards Paschalis (Embedded image moved to file: pic18302.pcx) I'm not sure if I got the question right. Are you saying you only feed rrdtool with the numbers 0,100,200,300,400,500,600 and 700 ? If so: are you aware of normalizing? See the faq site if you aren't. If you *are* aware and thus if you're certain you won't get unexpected numbers, you could use CDEF instructions to do the trick. Note: next is not tested. I never tried it so just try and follow the reasoning. If I make a mistake somewhere, correct that mistake and carry on. First of all make sure the graph is correct. Use appropriate start and end times. Appropriate is at exactly the right time, for instance: 00:00 is correct while 00:01 is not. You need to know *exactly* the amount of time covered in the graph. Lets work with an image with width 400, covering 12 seconds. This results in 12/400 seconds per pixel which is 300 seconds or 5 minutes. This also assumes you have an RRA in that resolution. Use CDEFs to remove all but one of the possible numbers. 1) fetch all values: DEF:ds0=/path/to/database.rrd:ds0:AVERAGE 2) remove all numbers except 700: CDEF:num700=ds0,700,EQ,400,* this means: if (value_of_ds0 == 700) then return 400 else return 0 Suppose ds0 was 700 during only one of the intervals. The amount of time it was this value is 300 seconds. During 300 out of the 12 seconds, the rate therefore is 400 in the CDEF. The rate during the other intervals is 0. 300 seconds at a rate of 400 per second makes a total of 12. When printing this total amount as an average, RRDtool will print "1". This is exactly the amount of intervals where ds0 was 700. Just one more: if the amount of intervals being equal to 700 was 3, the calculations are: 300*3*400=36. 36/12=3. Do the same for CDEF:num600=ds0,600,EQ,400,* CDEF:num500=ds0,500,EQ,400,* CDEF:num500=ds0,400,EQ,400,* and so on. Make sure to test the outcome. The result when added should match the total number: CDEF:total=num000,num100,num200,num300,num400,num500,num600,num700,+++ Printing is done so: GPRINT:num000:AVERAGE:" 0: %3.0lf\n" GPRINT:num100:AVERAGE:"100: %3.0lf\n" and so on. Maybe you'd like to see fractions as well, use "%6.2lf" If you want percentages, you should multiply by 100 and divide by the total amount of intervals. This would mean adding ",100,*,400,/" to each CDEF. However, that can be made more simple. The result of the CDEF upto and including "EQ" is one or zero. The remainder would be "400,*,100,*,400,/" which can be simplified into ",100,*". Each CDEF would therefore become "CDEF:numxxx=ds0,xxx,EQ,100,*". This has a nice side effect as well: the equasion doesn't use the width of the graph anymore. Let me know how it turned out. Perhaps you can produce a sample image for the galery as well. -- __ / [EMAIL PROTECTED] [EMAIL PROTECTED] \ | work private | | My employer is capable of speaking therefore I speak only for myself | +--+ | Technical questions sent directly to me will be nuked. Use the
[rrd-users] calculating usage..
Hi all, I'm using mrtg with rrd-tool now. I used to calculate usage using MRTG Total Traffic Generator (http://bjorn.swift.st/traffic/) , which just read the mrtg logs. But now that I'm using rrd-tool, it doesn't use the mrtg logs. Is there something similar for rrd-tool which can extract the usage figures ? Thanks. -- Ross. -- 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: Access Control for mrtg-rrd
Nipper, Arnold wrote: > I'm quite new to rrdtool and mrtg. I've installed mrtg and using rrdtool as > database. Frontend is mrtg-rrd. All works like a charm. I'm monitoring two > switches and have different customers connected to these switches. Each > customer should be able to have access to her statistics but not be abled to > see other. I.e customer with interface nr. 42 should be able to call > http://myweb.with/cgi-bin/mrtg-rrd.fcgi/sw1_42.html but not > http://myweb.with/cgi-bin/mrtg-rrd.fcgi/sw1_43.html. Any ideas? This has little to do with mrtg and rrdtool. You need to configure your web server to do this. Even if you would have told what web server you're using (...) I don't think this is the place to go into detail on that. The only thing configurable at the mrtg and/or rrdtool level is the place where the data is made available. This is often used to, for instance, store the images in a (sort of) home directory where that customer has access. As long as this customer has no access to another customer's home dir, the data should be safe. Configuring the location from MRTG is done with workdir, or a set of htmldir, imagedir and logdir. NOTE: Workdir overides the settings for htmldir, imagedir and logdir. RRDtool cannot configured. It can be told by the front end what path it should use (both for the data file and for the images). It is the front end (for instance: MRTG) that needs to be configured. cheers, -- __ / [EMAIL PROTECTED] [EMAIL PROTECTED] \ | work private | | My employer is capable of speaking therefore I speak only for myself | +--+ | Technical questions sent directly to me will be nuked. Use the list. | +--+ | http://faq.mrtg.org/ | | http://rrdtool.eu.org --> tutorial | +--+ -- 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] Access Control for mrtg-rrd
Hi all, I'm quite new to rrdtool and mrtg. I've installed mrtg and using rrdtool as database. Frontend is mrtg-rrd. All works like a charm. I'm monitoring two switches and have different customers connected to these switches. Each customer should be able to have access to her statistics but not be abled to see other. I.e customer with interface nr. 42 should be able to call http://myweb.with/cgi-bin/mrtg-rrd.fcgi/sw1_42.html but not http://myweb.with/cgi-bin/mrtg-rrd.fcgi/sw1_43.html. Any ideas? TIA, Arnold -- Arnold Nipper / nIPper consulting e-mail: [EMAIL PROTECTED] phone/mob: +49 172 265 0958 fax: +49 6224 9259 333 -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi