CLKMGR -- COMMAND REFERENCE     19-feb-2002
-------------------------------------------

This list applies to ClkMgr Beta 7.3


CLIENT          Show the currently selected client protocol.
CLIENT  D       Select NIST Daytime protocol (TCP port 13).
CLIENT  N       Select SNTP protocol (UDP port 123), specify NTP version 2.
CLIENT  Nn      Select SNTP protocol, specify NTP version n.

    The choices D and N are mutually exclusive; you can have only one client
    protocol active at a time.  The SNTP protocol is preferred and is the 
    startup default.

CONVERGE        Set the OS/2 system clock from ClkMgr's internal clock.

    This will read the current value of ClkMgr's precision clock, apply the
    timezone+DST offset, and set the OS/2 system clock accordingly. Use this
    command after the OS/2 system clock has been modified from the command
    line or by other software. You can then use the OFFSET command to see the
    residual difference between the ClkMgr clock and the OS/2 system clock.

EXIT            Terminate the ClkMgr program. Same as QUIT or Control-C.

HELP            Display a short summary of available commands. Same as ?.

INFO            Display program version number and run-time information.

INTERVAL nnn    Set polling interval to nnn hours.

    The minimum value is 0.1 hours (6 minutes).  There is no maximum.
    Warning: you poll an NTP server too aggressively, you may get blocked!
    The default value is 2.0 hours; this should be plenty enough to keep the
    OS/2 clock accurate to +/- 0.01 second.            

LEAPSEC         Show current leapsecond status.
LEAPSEC  0      Cancel any pending leapsecond.
LEAPSEC  1      Schedule positive leapsecond at end of current UTC month.
LEAPSEC  2      Schedule negative leapsecond at end of current UTC month.

LIST            Show current list of servers known to ClkMgr.

LOG             Show logging status.
LOG  0          Disable logging.
LOG  1          Enable logging.

    The logfile is named CLKMGR.LOG and will grow without bound. It may be
    deleted while ClkMgr is running, in which case a new CLKMGR.LOG file will
    be created the next time that something is written to the log.
    Format for logfile entries is:

    operation date time, time_t, IP address, delay, offset, I/M, daily, period

    operation    START, RECAL, SYNC
    date time    UTC date/time in ISO 8601 format
    time_t       Unix date/time (seconds elapsed since 1970-01-01 00:00:00)
    IP address   IP address of the remote server
    delay        round-trip delay, msec
    offset       local clock error, msec: local clock - remote server clock
    I/M          M if harware daily error is measured, I if initial value
    daily        hardware daily error, msec
    period       measurement period (seconds) for hardware daily error

NEWLIST [file]  Update ClkMgr's server list from a file.

    This works just like at startup.  If no filename is given, then ClkMgr
    searches for a file named MY-NIST-SRV.LST and failing that, it looks for
    a file named NIST-SRV.LST.  If an error occurs reading the file, then
    the prior server list remains in force.

OFFSET          Display time difference: OS/2 system clock - ClkMgr clock.

    Because the OS/2 clock is advanced in 0.01-second steps and the CLkMgr
    internal clock gives "instantaneous" high-resolution readings, successive
    calls to the OFFSET command will give results fluctuating in a range
    of +/- 0.010 seconds. NOTE: the offset value may be displayed incorrectly
    during a negative DST transition period.

POLL            Poll the remote time server now.

    If you want to poll more often than once every 10 minutes, this is the
    only way to do it.  See also the comments about too-frequent polling
    under the INTERVAL and QUERY commands.
   
QUERY n         When polling a time server, get n time samples.

    This can be useful for eliminating some of the network-delay-induced
    jitter from the received timestamps.  Selection proceeds as follows:
    1. Read one sample and use that.  This is the startup default.
    2. Read two samples and use the one with the lower round-trip delay.
    3. Read three samples and use the median offset.
    4. Read four samples, discard the first, and use the median offset from
       samples 2, 3, and 4.
    Note: use choices (3) and (4) with discretion.  It is not considered
    polite to bombard a busy server, and such action may get your IP address
    placed on the server's block list!

QUIT            See EXIT command.

RECAL           Restart the calibration process.

    This does an implicit CONVERGE operation, that is, it also resynchronizes
    the OS/2 clock with the ClkMgr clock.  Note that at startup the ClkMgr
    program initializes both clocks by performing a RECAL operation.

RO              Show OS/2 clock mode (read-only or read-write).
RO  0           Set OS/2 clock mode to read-write.
RO  1           Set OS/2 clock mode to read-only.

    Placing the OS/2 clock in read-only mode prevents other software from
    modifying the system time and/or date.

SERVER          Display active/inactive status of server threads.
SERVER  D       Start the NIST Daytime server thread.
SERVER -D       Stop the NIST Daytime server thread.
SERVER  N       Start the SNTP server thread.
SERVER -N       Stop the SNTP server thread.

    Both servers can be running at the same time.  The startup default is
    to have both servers stopped.  Servers can be stopped and restarted as
    often as desired.

TIMEOUT nn      Set initial receive timeout to nn seconds.

    Whenever ClkMgr polls a server the first attempt will time out after a
    user-definable interval; the default is 10 seconds. If the first attempt
    to reach the server fails and retries are needed, then ClkMgr uses a fixed
    retry timeout of 5 seconds.  The initial timeout may be specified to be
    long enough to allow a dial-on-demand modem connection to be set up, for
    instance.  Minimum value for nn is 5 seconds, maximum is 60 seconds.

TZ              Display TZ specification currently in use by ClkMgr.
TZ string       Define <string> as new TZ specification for ClkMgr.

    The local clock will be updated to reflect a new timezone or DST setting.

<eof>
