Today Rui Meireles wrote:

> Tobi,
>
> Thanks a lot for the quick answer.
>
> I hadn't notice the difference between SD in Overview graphs and SD in
> Detail Graphs. Now I get it!
>
> What I need is exactly the value "av sd" that is being shown in the Overview
> graphs. If you could help me with the rrdtool command that I should use to
> fetch that value, I would be most grateful, since I've already been
> "digging" smokeping.cgi but haven't found how to do it yet.

the heart of the operation is this function here:

sub calc_stddev {
    my $rrd = shift;
    my $id = shift;
    my $pings = shift;
    my @G = map 
{("DEF:pin${id}p${_}=${rrd}:ping${_}:AVERAGE","CDEF:p${id}p${_}=pin${id}p${_},UN,0,pin${id}p${_},IF")}
 1..$pings;
    push @G, "CDEF:pings${id}="."$pings,p${id}p1,UN,".join(",",map 
{"p${id}p$_,UN,+"} 2..$pings).",-";
    push @G, "CDEF:m${id}="."p${id}p1,".join(",",map {"p${id}p$_,+"} 
2..$pings).",pings${id},/";
    push @G, "CDEF:sdev${id}=p${id}p1,m${id},-,DUP,*,".join(",",map 
{"p${id}p$_,m${id},-,DUP,*,+"} 2..$pings).",pings${id},/,SQRT";
    return @G;
}

> Congratulations on this (and many other) projects, they sure are priceless
> tools!

well if you want to encurrage future development of the tools, you are welcome 
to become a sponsor:

there are awfully few sponsors for the smokeping project

http://oss.oetiker.ch/smokeping/sponsors.en.html

cheers
tobi


-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900

_______________________________________________
smokeping-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Reply via email to