93964f9c93
tool -- project homepage is at http://munin.sourceforge.net/ This package has added support for NetBSD, via a number of new plugin scripts where specific steps needs to be taken to collect information. I also modified the ntp_ plugin script to make it possible to not plot the NTP poll delay, leaving just jitter and offset, which IMO produces a more telling graph.
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
$NetBSD: patch-ac,v 1.1.1.1 2006/06/04 20:53:57 he Exp $
|
|
|
|
--- node/node.d/ntp_.in.orig 2004-11-21 21:19:09.000000000 +0100
|
|
+++ node/node.d/ntp_.in
|
|
@@ -76,6 +76,8 @@ $0 =~ /ntp_(.+)*$/;
|
|
my $name = $1;
|
|
exit 2 unless defined $name;
|
|
|
|
+my $do_delay = ! defined($ENV{'NTP_NODELAY'});
|
|
+
|
|
if ($ARGV[0] and $ARGV[0] eq "config") {
|
|
my @lines = `ntpq -c "hostnames no" -c peers`;
|
|
my $host;
|
|
@@ -91,8 +93,10 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
|
|
print "graph_title NTP statistics for peer $host\n";
|
|
}
|
|
print "graph_args --base 1000 --vertical-label msec --lower-limit 0\n";
|
|
- print "delay.label Delay\n";
|
|
- print "delay.draw LINE2\n";
|
|
+ if ($do_delay) {
|
|
+ print "delay.label Delay\n";
|
|
+ print "delay.draw LINE2\n";
|
|
+ }
|
|
print "offset.label Offset\n";
|
|
print "offset.draw LINE2\n";
|
|
print "jitter.label Jitter\n";
|
|
@@ -110,8 +114,12 @@ foreach (@lines) {
|
|
$host =~ s/[\.-]/_/g;
|
|
next unless $host eq $name;
|
|
my @F = split;
|
|
- print <<"EOT";
|
|
+if ($do_delay) {
|
|
+ print <<"EOT"
|
|
delay.value $F[7]
|
|
+EOT
|
|
+}
|
|
+ print <<"EOT";
|
|
offset.value $F[8]
|
|
jitter.value $F[9]
|
|
EOT
|