Paul C. Williamson wrote: > in a specified time period? The reason I ask is that I need to graph thei > fOperStatus of a Cisco 2620 ISDN card, and it is either 0 (up) or 1 (down).
So, you have a problem in two cases: 1) you don't enter the value into the database at the correct time 2) data gets consolidated The solution for problem #1 is to make sure that the timestamp is on a boundary. For instance, if your RRD expects values every 5 minutes, make sure that (time modulo 300) equals 0. Doing so will make data resampling unnecessary and you will keep your 0 or 1 value. Note that you *will* *be* *lying* if you graph the status of the line this way. See the section titled "the proper way". What you are graphing if you follow above approach is not the thruth, you will be missing calls and you won't know the real call duration. The solution for problem #2 is also very simple. Don't consolidate. This means that a) you can't have more than one RRA b) you can only graph 1 CDP per pixel; in case of 5 minutes per CDP and 400 pixels per graph you should create your graphs similar to "--end <something> --start 2000min". In other words, don't graph anything else than 1 day, 9 hours and 20 minutes. If you do, consolidation will happen and you'll get numbers like 0.125 lines in use. The proper way to process these numbers is by letting go of the 0s and 1s. Look at these values as percentages. The line is either active or it is not. You also need to find out what amount of time the line was active, and for which interval. For instance, at hh:05 you discover that the line is active. You also know that this call is active for 2 minutes. Furthermore another call occured, from hh:01 to hh:02. What do you need to put into the RRD? You can either let RRDtool do the work and do several updates each with the proper timestamp and value, or you can do the calculation yourself and just tell RRDtool once, at hh:05, that during the last interval the line was active for 0.8 of the time. If you're (also) interested in the maximum number of lines in use, a good way of doing so is to define: - an RRD with step time of one second, and a heartbeat of > 300. - an RRA with averages for 300 PDPs per CDP. - an RRA with maxima for 300 PDPs per CDP. Everytime something changes in the line status, remember the number of lines. The *next* time something changes, or the next 5-minute boundary, you enter the remembered value (which will be valid from the previous update to the current one). This way you can read the average number of lines in use, this will most likely be a fractional number, and you can read the maximum number of lines in use per interval (this will be an integer). With this approach you can have consolidation on your data, it doesn't matter. Maximum number of lines will correctly be processed, even if you graph one day per pixel. 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] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
