[Git][NTPsec/ntpsec][master] 9 commits: Testing utils: bumpclock.c compiles and works
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Feb 26 10:25:48 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
ea9d8bd9 by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Testing utils: bumpclock.c compiles and works
- - - - -
f2916fdf by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Testing utils: Add "Tested" date
- - - - -
6dfb963d by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Fix shebang line and re-enable perl warnings
- - - - -
77c3ef0d by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Convert calc_tickadj to use ntpfrob
- - - - -
9d407889 by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Update calc_tickadj documentation
- - - - -
e6171635 by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Fix documentation page
As the man page will not be built by waf, asciidoc.conf may
not be available, so hardcode Project Name, etc.
- - - - -
1b5f2a41 by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Update README about hist.c
- - - - -
d2337db2 by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Tested ntpver
- - - - -
a4257d83 by Sanjeev Gupta at 2016-02-26T05:25:02-05:00
Added info on ntpdate wrapper in README
- - - - -
3 changed files:
- util/README
- util/calc_tickadj/calc_tickadj
- util/calc_tickadj/calc_tickadj.txt
Changes:
=====================================
util/README
=====================================
--- a/util/README
+++ b/util/README
@@ -5,6 +5,7 @@ They are not installed by default. Not much documentation, alas. Read
the header comments.
calc_tickadj:: Calculates "optimal" value for tick given ntp.drift file
+ Tested: 20160226
audio-pcm.c:: Probe the capabilities of your sound card. Assumes the
SADA (Sun Audio Driver) interface from
@@ -14,7 +15,8 @@ audio-pcm.c:: Probe the capabilities of your sound card. Assumes the
bumpclock.c:: This is a simple program to bump the system clock so
you can see how ntpd and your OS respond. The single
argument is the time-to-bump in microseconds. The
- default is 100000.
+ default is 100000. Stand-alone compile.
+ Tested: 20160226
hist.c:: This program can be used to calibrate the clock reading
jitter of a particular CPU and operating system. It
@@ -23,6 +25,10 @@ hist.c:: This program can be used to calibrate the clock reading
gettimeofday() and, finally, writes out the time
values for later analysis. From this you can determine
the jitter and if the clock ever runs backwards.
+ To compile in the util directory, run waf configure and:
+ gcc -I ../include/ -I ../build/ hist.c
+ There is no docimentation on how to interpret results.
+ Tested: 20160226
kern.c:: Header comment from deep in the mists of past time says:
"This program simulates a first-order, type-II
@@ -36,11 +42,16 @@ kern.c:: Header comment from deep in the mists of past time says:
monitoring:: Directory containing perl scripts useful for monitoring
operations
+ntpdate:: Wrapper script to maintain compatibility. Maps options
+ to ntpdig and calls it.
+ Tested: 20160226
+
ntpsweep:: prints per host given in <file> the NTP stratum level, the
clock offset in seconds, the daemon version, the operating
system and the processor.
ntpver:: Simple script using ntpq to print out the suite version.
+ Tested: 20160226
plot_summary:: Plot summaries generated by summary script.
=====================================
util/calc_tickadj/calc_tickadj
=====================================
--- a/util/calc_tickadj/calc_tickadj
+++ b/util/calc_tickadj/calc_tickadj
@@ -1,8 +1,11 @@
-#!/usr/bin/env -w
+#!/usr/bin/env perl
#
# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
#
# 970306 HMS Deal with nanoseconds. Fix sign of adjustments.
+
+use warnings;
+
package calc_tickadj;
use strict;
@@ -17,8 +20,8 @@ sub run {
my $tick = $opts->{'tick'};
if (!$tick) {
- my ($fl) = `ntptickadj`;
- if (defined $fl && $fl =~ /(?:KERNEL|PRESET)?\s*tick\s+=\s+(\d+)/) {
+ my ($fl) = `ntpfrob -A`;
+ if (defined $fl && $fl =~ /(\d+)/) {
$tick = $1;
}
else {
=====================================
util/calc_tickadj/calc_tickadj.txt
=====================================
--- a/util/calc_tickadj/calc_tickadj.txt
+++ b/util/calc_tickadj/calc_tickadj.txt
@@ -10,7 +10,7 @@ calc_tickadj [-d 'string' | --drift-file='string'] [-t 'number' | --tick='number
== DESCRIPTION ==
The _calc_tickadj_ script uses provided NTP drift file to generate
-optimal tick value. Generally, {ntpd} can do better job if the drift value
+optimal tick value. Generally, +ntpd+ can do better job if the drift value
is the smallest possible number.
The example output of
@@ -32,20 +32,20 @@ If 'tick' on that box is 10,000,000 then by setting it to 9999779 the
drift value will be somewhere around 0.0.
_calc_tickadj_ tries to determine the tick value by using the
-_tickadj_ program from the {project-shortname} package. If this
++ntpfrob+ program from the +NTPSec+ package. If this
doesn't work you can specify current tick manually on command line.
== OPTIONS ==
-d string, --drift-file=string::
- Ntp drift file to use. The default Istring for this option is:
+ Ntp drift file to use. The default string for this option is:
'/etc/ntp/drift'.
+
Use the specified drift file for calculations
-t number, --tick=number::
Tick value of this host. This option takes an integer number as its
- argument. The default value is obtained by calling tickadj(1).
+ argument. The default value is obtained by calling ntpfrob(1).
+
The current tick which to adjustment will be calculated
@@ -58,3 +58,7 @@ One of the following exit values will be returned:
1 (EXIT_FAILURE)::
The operation failed or the command syntax was not valid.
+== STATUS ==
+
+calc_tickadj has been updated to work in the NTPSec
+distribution, but is not actively maintained.
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/aa01ef7e1677c7bc9bd7a1a3b5f96c7730d219a8...a4257d83b15b79485f0f81c28fa4f18aa9bd3603
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160226/952e9069/attachment.html>
More information about the vc
mailing list