[smokeping-users] Calculation of maximum value

Tellerdreher Tellerdreher at bighamster.de
Tue Dec 27 10:05:26 MET 2005

Hi everyone!

I have a "problem" with how smokeping calculates the maximum value of a
graph. A look at the source tells me that you take the maximum media and
multiply it by 1.5 to "calculate" the max limit for the graph? Isn't it a
better idea to get the real max from all ping sources (ping1-20), e.g. for
the nave mode:

code sketch:

for ($i=1; $i<=20; $i++) {
     my ($graphret,$xs,$ys) = RRDs::graph
      '--start', $tasks[0][1],
      "DEF:maxping=${rrd}:ping$i" . ":AVERAGE",
      'PRINT:maxping:MAX:%le' );
      my $ERROR = RRDs::error();
      return "<div>RRDtool did not understand your input: $ERROR.</div>"
if $ERROR;
      $val = $graphret->[0];
      # ===== TODO check nan
      if ($val>$mymax) { $mymax=$val;}
# ===== multiply by 1.1 because otherwise there is no space between the
# ===== upper line and the biggest value
$max = { $tasks[0][1] => $val * 1.1 };

I notice the problem because my normal graphs looked different from the
nave graphs.


Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/smokeping-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the smokeping-users mailing list