From s.shipway at auckland.ac.nz Thu Oct 8 22:44:27 2009 From: s.shipway at auckland.ac.nz (S Shipway) Date: Thu, 8 Oct 2009 13:44:27 -0700 (PDT) Subject: [mrtg-developers] Strange behavious when using unknaszero In-Reply-To: <1254978896697-3786031.post@n2.nabble.com> References: <1254978896697-3786031.post@n2.nabble.com> Message-ID: <1255034667410-3790718.post@n2.nabble.com> This is a known race condition caused by the update time window when using RRDTool. The Routers2 frontend contains some special code to avoid this problem. Basically, if your updates occur at 12:04 and you are generating the graph at 12:01, you are in the 12:00-12:05 'bucket' but the update has not yet occurred. Therefore, the last value in the graph is Unknown. 14all may hop back to the previous bucket when its unknown and so you get the correct value... however with unknaszero this unknown is translated to zero, and so the Last value is displayed as zero. There is no fix for this without updating the 14all code to check for the condition and add a backskip, as Routers2 does. Steve ________________________________ From: jayashree (via Nabble) [mailto:ml-user+292048-566247669 at n2.nabble.com] Sent: Thursday, 8 October 2009 6:15 p.m. To: Steve Shipway Subject: [mrtg-developers] Strange behavious when using unknaszero Hi All, I am using the unknaszero option while displaying certain graphs. I am using 14all.cgi in the front end to create the pngs. The funny thing is when I look at the legend at the bottom of the graph, even if there is data on my graph, The current In value is '0', when there is a data of 2M being plotted in the graph. When I remove the option from the router config file, and regenerate the pngs, the data is correctly displayed. I cannot do away with the use of 'unknaszero' option. So is there any fix for this problem or am I doing something incorrectly. 14all version - 14all.cgi,v 2.23 2002/07/13 MRTG version - 2.100015 Appreciate any inputs. Thanks & regards jayashree ________________________________ View message @ http://n2.nabble.com/Strange-behavious-when-using-unknaszero-tp3786031p3786031.html To start a new topic under MRTG Developers Mailinglist, email ml-node+795384-1747653317 at n2.nabble.com To unsubscribe from MRTG Developers Mailinglist, click here< (link removed) =>. -- View this message in context: http://n2.nabble.com/Strange-behavious-when-using-unknaszero-tp3786031p3790718.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From nisha.sasindran at gmail.com Wed Oct 21 12:04:10 2009 From: nisha.sasindran at gmail.com (nisha) Date: Wed, 21 Oct 2009 03:04:10 -0700 (PDT) Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <1251420308922-3531210.post@n2.nabble.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> Message-ID: <1256119450574-3864251.post@n2.nabble.com> Hi Steve, This solution worked. But now i have a problem when the calcualtion results in a negative value. Lets say [oid1 - (oid2 * 5)] gives a positive value and [oid3 - (oid4 * 10)] gives a negative value then the rrds are not able to update these values and hence my graph shows Nan Have you come across something like this before? Can mrtg can handle this? Regards, Nisha S Shipway wrote: > > This is not possible as you state it; Target line calculations can only be > done on an OID pair. However you might achieve it like this: > > Target[targetname]: oid1&oid3:comm. at host - ( oid2&oid4:comm at host * 5 + ( > pseudoZero&oid4:comm. at host * 5 ) ) > > Note that the spaces around the brackets and arithmetic signs are > essential. 'pseudoZero' is a magic MRTG virtualOID that always resolves > to zero. > > Check the documentation on complex calculated Target lines online at > www.mrtg.org or get a copy of the book from > www.steveshipway.org/book > > Your example below is using oid4x10 in one place but oid4x8 in another but > I guess that's just a typo. > > Steve > > ________________________________ > From: nisha (via Nabble) [mailto:ml-user+230579-585948030 at n2.nabble.com] > Sent: Thursday, 27 August 2009 11:02 p.m. > To: Steve Shipway > Subject: [mrtg-developers] Mathematical operations on OIDs > > Hi all, > > I want to perform mathematical operations on OIDs in the target line. For > example, there are 4 oids as shown below: > traffic packet > In oid1 oid2 > Out oid3 oid4 > > > Now i want to apply the following formula > traffic in = oid1 - (oid2 * 5) > traffic out = oid3 - (oid4 * 10) > > My target line in router cfg file is like this: > Target[targetname]: oid1&oid3:comm at hostname - (oid2 * 5)&(oid4 * > 8):comm at hostname > > Is this possible in MRTG? Can the router cfg file handle oids with > mathematical operations? > > > > -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3864251.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From s.shipway at auckland.ac.nz Thu Oct 22 00:29:24 2009 From: s.shipway at auckland.ac.nz (S Shipway) Date: Wed, 21 Oct 2009 15:29:24 -0700 (PDT) Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <1256119450574-3864251.post@n2.nabble.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> <1256119450574-3864251.post@n2.nabble.com> Message-ID: <1256164164920-3868979.post@n2.nabble.com> MRTG is able to handle negative values, provided that: a) you are using RRDTool as your backend, not native mode, and b) You manually set the Minimum for the DS appropriately within the RRD file using RRDTune (MRTG always sets the minimum to 0). Also, unless this is a gauge, you might need to use 'derive' rather than 'counter' in order to cope with negative slopes. Steve ________________________________ From: nisha [via MRTG Mailinglists] [mailto:ml-node+3864251-1100011265 at n2.nabble.com] Sent: Wednesday, 21 October 2009 11:04 p.m. To: Steve Shipway Subject: RE: [mrtg-developers] Mathematical operations on OIDs Hi Steve, This solution worked. But now i have a problem when the calcualtion results in a negative value. Lets say [oid1 - (oid2 * 5)] gives a positive value and [oid3 - (oid4 * 10)] gives a negative value then the rrds are not able to update these values and hence my graph shows Nan Have you come across something like this before? Can mrtg can handle this? Regards, Nisha S Shipway wrote: This is not possible as you state it; Target line calculations can only be done on an OID pair. However you might achieve it like this: Target[targetname]: oid1&oid3:comm. at host - ( oid2&oid4:comm at host * 5 + ( pseudoZero&oid4:comm. at host * 5 ) ) Note that the spaces around the brackets and arithmetic signs are essential. 'pseudoZero' is a magic MRTG virtualOID that always resolves to zero. Check the documentation on complex calculated Target lines online at www.mrtg.org or get a copy of the book from www.steveshipway.org/book Your example below is using oid4x10 in one place but oid4x8 in another but I guess that's just a typo. Steve ________________________________ From: nisha (via Nabble) [mailto:ml-user+230579-585948030 at n2.nabble.com] Sent: Thursday, 27 August 2009 11:02 p.m. To: Steve Shipway Subject: [mrtg-developers] Mathematical operations on OIDs Hi all, I want to perform mathematical operations on OIDs in the target line. For example, there are 4 oids as shown below: traffic packet In oid1 oid2 Out oid3 oid4 Now i want to apply the following formula traffic in = oid1 - (oid2 * 5) traffic out = oid3 - (oid4 * 10) My target line in router cfg file is like this: Target[targetname]: oid1&oid3:comm at hostname - (oid2 * 5)&(oid4 * 8):comm at hostname Is this possible in MRTG? Can the router cfg file handle oids with mathematical operations? ________________________________ View message @ http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3864251.html To start a new topic under MRTG Developers Mailinglist, email ml-node+795384-1747653317 at n2.nabble.com To unsubscribe from MRTG Developers Mailinglist, click here< (link removed) =>. -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3868979.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From simon.westlake at twcable.com Thu Oct 22 16:28:07 2009 From: simon.westlake at twcable.com (Westlake, Simon) Date: Thu, 22 Oct 2009 10:28:07 -0400 Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <1256164164920-3868979.post@n2.nabble.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> <1256119450574-3864251.post@n2.nabble.com> <1256164164920-3868979.post@n2.nabble.com> Message-ID: <75C5D401E3498C42BE938788997F97A915E2A32A0E@PRVPEXVS11.corp.twcable.com> Nisha, For reference, this is the script I use in order to tune my files (I graph cable modem signal levels and I have to tune all the files to allow them to display negative dB values) for RRD in `ls /var/www/mrtg/*/*-down.rrd` ; do rrdtool tune $RRD -i ds0:-60 -a ds0:60 blah ; done You will obviously have to modify the values to match your setup.. HTH -- Simon Westlake -----Original Message----- From: mrtg-developers-bounces at lists.oetiker.ch [mailto:mrtg-developers-bounces at lists.oetiker.ch] On Behalf Of S Shipway Sent: Wednesday, October 21, 2009 5:29 PM To: mrtg-developers at lists.oetiker.ch Subject: Re: [mrtg-developers] Mathematical operations on OIDs MRTG is able to handle negative values, provided that: a) you are using RRDTool as your backend, not native mode, and b) You manually set the Minimum for the DS appropriately within the RRD file using RRDTune (MRTG always sets the minimum to 0). Also, unless this is a gauge, you might need to use 'derive' rather than 'counter' in order to cope with negative slopes. Steve ________________________________ From: nisha [via MRTG Mailinglists] [mailto:ml-node+3864251-1100011265 at n2.nabble.com] Sent: Wednesday, 21 October 2009 11:04 p.m. To: Steve Shipway Subject: RE: [mrtg-developers] Mathematical operations on OIDs Hi Steve, This solution worked. But now i have a problem when the calcualtion results in a negative value. Lets say [oid1 - (oid2 * 5)] gives a positive value and [oid3 - (oid4 * 10)] gives a negative value then the rrds are not able to update these values and hence my graph shows Nan Have you come across something like this before? Can mrtg can handle this? Regards, Nisha S Shipway wrote: This is not possible as you state it; Target line calculations can only be done on an OID pair. However you might achieve it like this: Target[targetname]: oid1&oid3:comm. at host - ( oid2&oid4:comm at host * 5 + ( pseudoZero&oid4:comm. at host * 5 ) ) Note that the spaces around the brackets and arithmetic signs are essential. 'pseudoZero' is a magic MRTG virtualOID that always resolves to zero. Check the documentation on complex calculated Target lines online at www.mrtg.org or get a copy of the book from www.steveshipway.org/book Your example below is using oid4x10 in one place but oid4x8 in another but I guess that's just a typo. Steve ________________________________ From: nisha (via Nabble) [mailto:ml-user+230579-585948030 at n2.nabble.com] Sent: Thursday, 27 August 2009 11:02 p.m. To: Steve Shipway Subject: [mrtg-developers] Mathematical operations on OIDs Hi all, I want to perform mathematical operations on OIDs in the target line. For example, there are 4 oids as shown below: traffic packet In oid1 oid2 Out oid3 oid4 Now i want to apply the following formula traffic in = oid1 - (oid2 * 5) traffic out = oid3 - (oid4 * 10) My target line in router cfg file is like this: Target[targetname]: oid1&oid3:comm at hostname - (oid2 * 5)&(oid4 * 8):comm at hostname Is this possible in MRTG? Can the router cfg file handle oids with mathematical operations? ________________________________ View message @ http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3864251.html To start a new topic under MRTG Developers Mailinglist, email ml-node+795384-1747653317 at n2.nabble.com To unsubscribe from MRTG Developers Mailinglist, click here< (link removed) =>. -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3868979.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. _______________________________________________ mrtg-developers mailing list mrtg-developers at lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers This E-mail and any of its attachments may contain Time Warner Cable proprietary information, which is privileged, confidential, or subject to copyright belonging to Time Warner Cable. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout. From nisha.sasindran at gmail.com Fri Oct 23 14:31:26 2009 From: nisha.sasindran at gmail.com (nisha) Date: Fri, 23 Oct 2009 05:31:26 -0700 (PDT) Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <75C5D401E3498C42BE938788997F97A915E2A32A0E@PRVPEXVS11.corp.twcable.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> <1256119450574-3864251.post@n2.nabble.com> <1256164164920-3868979.post@n2.nabble.com> <75C5D401E3498C42BE938788997F97A915E2A32A0E@PRVPEXVS11.corp.twcable.com> Message-ID: <1256301086669-3878452.post@n2.nabble.com> Hi Simon, Thanks for the response. But my graph needs to have only the positive values and not negative values. The negative values are caused because the oid3 - (oid4 * 10) calculation returns a negative value. In my case when oid3 - (oid4 * 10) is a negative value (not always though), how can i handle them in mrtg? And another query is what will happen if the 4 counters (oid1 to oid4) overflow? For example, the oid4 counter resets at a slower rate than the oid3 counter. There are chances of getting a spike on the graph when oid3 value is very high and oid4 value is negligible and oid3 - (oid4 * 10) is approx equal to oid3. how can we handle this scenario? Regards, Nisha Westlake, Simon wrote: > > Nisha, > > For reference, this is the script I use in order to tune my files (I graph > cable modem signal levels and I have to tune all the files to allow them > to display negative dB values) > > for RRD in `ls /var/www/mrtg/*/*-down.rrd` ; do rrdtool tune $RRD -i > ds0:-60 -a ds0:60 blah ; done > > You will obviously have to modify the values to match your setup.. > > HTH > > -- > Simon Westlake > > > -----Original Message----- > From: mrtg-developers-bounces at lists.oetiker.ch > [mailto:mrtg-developers-bounces at lists.oetiker.ch] On Behalf Of S Shipway > Sent: Wednesday, October 21, 2009 5:29 PM > To: mrtg-developers at lists.oetiker.ch > Subject: Re: [mrtg-developers] Mathematical operations on OIDs > > > MRTG is able to handle negative values, provided that: > a) you are using RRDTool as your backend, not native mode, and > b) You manually set the Minimum for the DS appropriately within the > RRD file using RRDTune (MRTG always sets the minimum to 0). > > Also, unless this is a gauge, you might need to use 'derive' rather than > 'counter' in order to cope with negative slopes. > > Steve > > ________________________________ > From: nisha [via MRTG Mailinglists] > [mailto:ml-node+3864251-1100011265 at n2.nabble.com] > Sent: Wednesday, 21 October 2009 11:04 p.m. > To: Steve Shipway > Subject: RE: [mrtg-developers] Mathematical operations on OIDs > > Hi Steve, > > This solution worked. But now i have a problem when the calcualtion > results in a negative value. > > Lets say [oid1 - (oid2 * 5)] gives a positive value and [oid3 - (oid4 * > 10)] gives a negative value then the rrds are not able to update these > values and hence my graph shows Nan > > Have you come across something like this before? Can mrtg can handle this? > > Regards, > Nisha > > S Shipway wrote: > This is not possible as you state it; Target line calculations can only be > done on an OID pair. However you might achieve it like this: > > Target[targetname]: oid1&oid3:comm. at host - ( oid2&oid4:comm at host * 5 + ( > pseudoZero&oid4:comm. at host * 5 ) ) > > Note that the spaces around the brackets and arithmetic signs are > essential. 'pseudoZero' is a magic MRTG virtualOID that always resolves > to zero. > > Check the documentation on complex calculated Target lines online at > www.mrtg.org or get a copy of the book from > www.steveshipway.org/book > > Your example below is using oid4x10 in one place but oid4x8 in another but > I guess that's just a typo. > > Steve > > ________________________________ > From: nisha (via Nabble) [mailto:ml-user+230579-585948030 at n2.nabble.com] > Sent: Thursday, 27 August 2009 11:02 p.m. > To: Steve Shipway > Subject: [mrtg-developers] Mathematical operations on OIDs > > Hi all, > > I want to perform mathematical operations on OIDs in the target line. For > example, there are 4 oids as shown below: > traffic packet > In oid1 oid2 > Out oid3 oid4 > > > Now i want to apply the following formula > traffic in = oid1 - (oid2 * 5) > traffic out = oid3 - (oid4 * 10) > > My target line in router cfg file is like this: > Target[targetname]: oid1&oid3:comm at hostname - (oid2 * 5)&(oid4 * > 8):comm at hostname > > Is this possible in MRTG? Can the router cfg file handle oids with > mathematical operations? > > ________________________________ > View message @ > http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3864251.html > To start a new topic under MRTG Developers Mailinglist, email > ml-node+795384-1747653317 at n2.nabble.com > To unsubscribe from MRTG Developers Mailinglist, click here< (link > removed) =>. > > > -- > View this message in context: > http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3868979.html > Sent from the MRTG Developers Mailinglist mailing list archive at > Nabble.com. > > _______________________________________________ > mrtg-developers mailing list > mrtg-developers at lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers > This E-mail and any of its attachments may contain Time Warner > Cable proprietary information, which is privileged, confidential, > or subject to copyright belonging to Time Warner Cable. This E-mail > is intended solely for the use of the individual or entity to which > it is addressed. If you are not the intended recipient of this > E-mail, you are hereby notified that any dissemination, > distribution, copying, or action taken in relation to the contents > of and attachments to this E-mail is strictly prohibited and may be > unlawful. If you have received this E-mail in error, please notify > the sender immediately and permanently delete the original and any > copy of this E-mail and any printout. > > _______________________________________________ > mrtg-developers mailing list > mrtg-developers at lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers > > -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3878452.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From s.shipway at auckland.ac.nz Sat Oct 24 05:48:07 2009 From: s.shipway at auckland.ac.nz (S Shipway) Date: Fri, 23 Oct 2009 20:48:07 -0700 (PDT) Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <1256301086669-3878452.post@n2.nabble.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> <1256119450574-3864251.post@n2.nabble.com> <1256164164920-3868979.post@n2.nabble.com> <75C5D401E3498C42BE938788997F97A915E2A32A0E@PRVPEXVS11.corp.twcable.com> <1256301086669-3878452.post@n2.nabble.com> Message-ID: <1256356087419-3882569.post@n2.nabble.com> If one of the countes wraps, then MRTG should be able to detect it. The only problem would be if two counters wrap during the same polling cycle, which may confuse things. If you don't want the negative numbers, then no trouble - by default, since they are outside the defined range (0-maxbytes) they will be dropped. It's if you want to keep them that you need to tune the RRD files. Steve ________________________________ Thanks for the response. But my graph needs to have only the positive values and not negative values. The negative values are caused because the oid3 - (oid4 * 10) calculation returns a negative value. In my case when oid3 - (oid4 * 10) is a negative value (not always though), how can i handle them in mrtg? And another query is what will happen if the 4 counters (oid1 to oid4) overflow? For example, the oid4 counter resets at a slower rate than the oid3 counter. There are chances of getting a spike on the graph when oid3 value is very high and oid4 value is negligible and oid3 - (oid4 * 10) is approx equal to oid3. how can we handle this scenario? -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3882569.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From nisha.sasindran at gmail.com Tue Oct 27 05:24:01 2009 From: nisha.sasindran at gmail.com (nisha) Date: Mon, 26 Oct 2009 21:24:01 -0700 (PDT) Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <1256356087419-3882569.post@n2.nabble.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> <1256119450574-3864251.post@n2.nabble.com> <1256164164920-3868979.post@n2.nabble.com> <75C5D401E3498C42BE938788997F97A915E2A32A0E@PRVPEXVS11.corp.twcable.com> <1256301086669-3878452.post@n2.nabble.com> <1256356087419-3882569.post@n2.nabble.com> Message-ID: <1256617441634-3896994.post@n2.nabble.com> But this time my target line has 4 OIDs instead of 2 OIDs: Target[targetname]: oid1&oid3:comm at host - ( ( oid2&oid4:comm at host * 5 ) + ( pseudoZero&oid4:comm at host * 5 ) ) So how is it that MRTG is detecting the counter reset for all 4 OIDs? If the calculation [oid1 - (oid2 * 5)] is returning consecutive negative values, and if MRTG keeps dropping them, then i'm losing the data for that period. Though negative it still represents my data. My graph will show only the positive x and y axis. What if i want to keep the values by just ignoring the negative sign and take the absolute value. can that be done in MRTG? Regards, Nisha S Shipway wrote: > > If one of the countes wraps, then MRTG should be able to detect it. The > only problem would be if two counters wrap during the same polling cycle, > which may confuse things. > > If you don't want the negative numbers, then no trouble - by default, > since they are outside the defined range (0-maxbytes) they will be > dropped. It's if you want to keep them that you need to tune the RRD > files. > > Steve > > ________________________________ > Thanks for the response. But my graph needs to have only the positive > values and not negative values. > The negative values are caused because the oid3 - (oid4 * 10) calculation > returns a negative value. > In my case when oid3 - (oid4 * 10) is a negative value (not always > though), how can i handle them in mrtg? > > And another query is what will happen if the 4 counters (oid1 to oid4) > overflow? > For example, the oid4 counter resets at a slower rate than the oid3 > counter. There are chances of getting a spike on the graph when oid3 value > is very high and oid4 value is negligible and > oid3 - (oid4 * 10) is approx equal to oid3. > how can we handle this scenario? > > -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3896994.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From s.shipway at auckland.ac.nz Tue Oct 27 05:37:38 2009 From: s.shipway at auckland.ac.nz (S Shipway) Date: Mon, 26 Oct 2009 21:37:38 -0700 (PDT) Subject: [mrtg-developers] Mathematical operations on OIDs In-Reply-To: <1256617441634-3896994.post@n2.nabble.com> References: <1251370931727-3524231.post@n2.nabble.com> <1251420308922-3531210.post@n2.nabble.com> <1256119450574-3864251.post@n2.nabble.com> <1256164164920-3868979.post@n2.nabble.com> <75C5D401E3498C42BE938788997F97A915E2A32A0E@PRVPEXVS11.corp.twcable.com> <1256301086669-3878452.post@n2.nabble.com> <1256356087419-3882569.post@n2.nabble.com> <1256617441634-3896994.post@n2.nabble.com> Message-ID: <1256618258164-3897021.post@n2.nabble.com> Although your Target line uses 4 OIDs, it is only defining 2 variables: (oid1-5*oid2) and (oid3 -10*oid4). MRTG needs 2 variables; since usually people have one OID per variable, sometimes people will say MRTG needs 2 OIDs, but it is more precise to say it needs 2 variables, however calculated. MRTG detects target reset by seeing a normally incrementing counter suddenly drop by a large amount. In this case, it adds 2^32 to the negative value (or 2^64 if it is a 64bit value) If you want MRTG to graph the negative values, then this is possible, provided you use RRDTool as the backend and tune the RRD files to allow negative numbers. The axis will rescale automatically. If you want to graph the absolute value, then you'll need to write a custom plugin to collect all the data and do the necessary calculations as post-processing functions can only be used per-component. There's a vague possibility that Tobi used a siumple Perl eval to calculate the value in which case you could do something like Target[xxxx]: abs( oid1&oid2:comm. at host ) but I think this would fail. Steve ________________________________ From: nisha [via MRTG Mailinglists] [mailto:ml-node+3896994-737613633 at n2.nabble.com] Sent: Tuesday, 27 October 2009 5:24 p.m. To: Steve Shipway Subject: RE: [mrtg-developers] Mathematical operations on OIDs But this time my target line has 4 OIDs instead of 2 OIDs: Target[targetname]: oid1&oid3:comm at host - ( ( oid2&oid4:comm at host * 5 ) + ( pseudoZero&oid4:comm at host * 5 ) ) So how is it that MRTG is detecting the counter reset for all 4 OIDs? If the calculation [oid1 - (oid2 * 5)] is returning consecutive negative values, and if MRTG keeps dropping them, then i'm losing the data for that period. Though negative it still represents my data. My graph will show only the positive x and y axis. What if i want to keep the values by just ignoring the negative sign and take the absolute value. can that be done in MRTG? -- View this message in context: http://n2.nabble.com/Mathematical-operations-on-OIDs-tp3524231p3897021.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. From matrixhasu at gmail.com Sat Oct 31 20:26:38 2009 From: matrixhasu at gmail.com (Sandro Tosi) Date: Sat, 31 Oct 2009 20:26:38 +0100 Subject: [mrtg-developers] How to tickets in MRTG trac? Message-ID: <8b2d7b4d0910311226u319b95a3ve4adc1f860ff089b@mail.gmail.com> Hi all, I'm Sandro, the Debian maintainer of mrtg. I'd like to report upstream some of the bugs in our BTS, and I went to the mrtg trac instance but couldn't find a way to report a ticket there. Can you please give me some advice on how to do that? Thanks in advance, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi