[ntp:bk-ntp-stable-send] BitKeeper patch
Harlan Stenn
stenn at whimsy.udel.edu
Thu Nov 20 00:45:46 PST 2003
This BitKeeper patch contains the following changesets:
stenn at whimsy.udel.edu|ChangeSet|20031120084429|23804
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# ID: stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
# User: stenn
# Host: whimsy.udel.edu
# Root: /backroom/ntp-stable
#
#--- 1.2/scripts/ntptrace.in Thu Nov 20 03:27:44 2003
#+++ 1.3/scripts/ntptrace.in Thu Nov 20 03:44:11 2003
#@@ -17,6 +17,8 @@
# $host ||= "127.0.0.1";
#
# for (;;) {
#+ $rootdelay = 0;
#+ $rootdispersion = 0;
# $stratum = 255;
# $cmd = "$ntpq -n -c rv $host";
# open(PH, $cmd . "|") || die "failed to start command $cmd: $!";
#@@ -26,12 +28,13 @@
# # Very old servers report phase and not offset.
# $offset = $1 if (/(?:offset|phase)=([^\s,]+)/);
# $rootdelay = $1 if (/rootdelay=([^\s,]+)/);
#+ $rootdispersion = $1 if (/rootdispersion=(^\s,]+)/);
# $refid = $1 if (/refid=([^\s,]+)/);
# }
# close(PH) || die "$cmd failed";
# last if ($stratum == 255);
# $offset /= 1000;
#- $rootdelay /= 1000;
#+ $syncdistance = ($rootdispersion + ($rootdelay / 2)) / 1000;
# $dhost = $host;
# # Only do lookups of IPv4 addresses. The standard lookup functions
# # of perl only do IPv4 and I don't know if we should require extras.
#@@ -40,8 +43,8 @@
# $name = (gethostbyaddr($iaddr, AF_INET))[0];
# $dhost = $name if (defined($name));
# }
#- printf("%s: stratum %d, offset %f, root distance %f",
#- $dhost, $stratum, $offset, $rootdelay);
#+ printf("%s: stratum %d, offset %f, synch distance %f",
#+ $dhost, $stratum, $offset, $syncdistance);
# printf(", refid '%s'", $refid) if ($stratum == 1);
# printf("\n");
# last if ($stratum == 0 || $stratum == 1 || $stratum == 16);
#
# Diff checksum=8ef092d6
# Patch vers: 1.3
# Patch type: REGULAR
== ChangeSet ==
stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
stenn at whimsy.udel.edu|ChangeSet|20031120082803|23810
D 1.1174 03/11/20 03:44:29-05:00 stenn at whimsy.udel.edu +1 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 217] ntptrace should show sync distance, not rootdelay.
K 23804
P ChangeSet
------------------------------------------------
0a0
> stenn at whimsy.udel.edu|scripts/ntptrace.in|20020331050637|42777|33feac75fefaa4a stenn at whimsy.udel.edu|scripts/ntptrace.in|20031120084411|07085
== scripts/ntptrace.in ==
stenn at whimsy.udel.edu|scripts/ntptrace.in|20020331050637|42777|33feac75fefaa4a
stenn at whimsy.udel.edu|scripts/ntptrace.in|20031120082744|61246
D 1.3 03/11/20 03:44:11-05:00 stenn at whimsy.udel.edu +6 -3
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 217] ntptrace should show sync distance, not rootdelay.
K 7085
O -rwxrwxr-x
P scripts/ntptrace.in
------------------------------------------------
I19 2
$rootdelay = 0;
$rootdispersion = 0;
I28 1
$rootdispersion = $1 if (/rootdispersion=(^\s,]+)/);
D34 1
I34 1
$syncdistance = ($rootdispersion + ($rootdelay / 2)) / 1000;
D43 2
I44 2
printf("%s: stratum %d, offset %f, synch distance %f",
$dhost, $stratum, $offset, $syncdistance);
# Patch checksum=ef009472
More information about the bk-ntp-stable-send
mailing list