Skip to content
Commits on Source (9)
......@@ -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.
......
#!/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 {
......
......@@ -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.