Negative Unit Exponent Values

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
acasto
Posts: 38
Joined: Tue Mar 03, 2009 9:00 am

Negative Unit Exponent Values

Post by acasto »

I wasn't sure if this was a bug or not. Anyways, line 734 of lib/rrd.php has a regexp that only tests for a positive integer, which prevents negative exponent values from being passed to the graph. Changing the regexp to: "^-{0,1}[0-9]+$" seems to work fine. Is this right? I assume using negative exponent values is acceptable, but I'm not positive.


Adam
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Simply try this using plain rrdtool. If rrdtool works fine, I happily will accept any patch regarding this issue. Please create a bug report, then, to track this issue
Reinhard
acasto
Posts: 38
Joined: Tue Mar 03, 2009 9:00 am

Post by acasto »

I'm sorry, I'm not quite sure what you mean about trying with plain rrdtool? As far I could tell you can use negative exponent values with rrdtool, it's listed in the docs, and it does work as expected. The only problem was that particular regex was filtering out any negative values thus preventing them from ever getting passed to rrdtool. This shows when you view graph debug mode, the graph template still lists the negative exponent, but it doesn't make it into the options passed to rrdtool. When the regex is changed to allow for the negative value, it is passed properly to rrdtool, there is no errors displayed, and the graph looks as it should. If there's anything else you'd like me to try I would be happy to though.

Adam
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

That's fine, then. Please open a bug report and I'll fix it
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests