Hi,
I found a problem where if there is ever a "nan" in the output from rrd for your data source on the interval in which you are scanning data, even if it is on a data source you are not interested in, the data will not be recorded in the 95th percentile scan functions.
In my particular case, I had some other data in the rrd file that always had a "nan" in one of the columns. This prevented ANY 95th percentile calculations on the other columns.
I made a quick fix for this by adding "$output = str_replace('nan','0.0e+00',$output);" just after the $line_one assignment in rrd.php. However, that isn't the right fix; the correct fix is to make the regexps further down match "nan" as well as a data value.
Since I know my patch can possibly produce wrong data, I don't want to include it as an easy to apply patch, but I figured someone here might want to take a look at the regex code and come up with some way to match 'nan' as well.
Problem with 95th percentile code
Moderators: Developers, Moderators
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Nth percentile code is a beast....
That being said, can you please submit a bug on this matter. I will take a look at it, but will not promise any changes.
http://www.cacti.net/bugs.php
Don't forget to reference this post in the bug. But don't make that your bug report. Details should be in the bug report.
That being said, can you please submit a bug on this matter. I will take a look at it, but will not promise any changes.
http://www.cacti.net/bugs.php
Don't forget to reference this post in the bug. But don't make that your bug report. Details should be in the bug report.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 3 guests