John D. Alleyn-Day wrote:
>
> Some time ago I wrote a routine for a client to sync a PC to the HP3000.
> The PC was being used as a sort of backup to the HP3000 (!) and it was
> important for them to be reasonably synchronized and more important that
> the synchronization happened automatically. It was done using a simple
> Reflection script that captured the output from the "TIME" command, edited
> it and created a batch file that was then executed.
Well, "time" is a relative thing :-)
Network-wise, there are three distinct sources of "time" on the network
you can sync with to varying degrees of accuracy. These are:
* daytime - on port 13 udp/tcp returns an ascii string of the date and
time such as "Sat Apr 12 12:28:29 1997".
* time - on port 37 udp/tcp returns a 4-byte binary ctime()-like value
corresponding to the GMT/UT clock.
* ntp - on port 123 udp/tcp, Network Time Protocol, returns a "whole
bunch of stuff" used to synchronize machines with considerable
accuracy (milliseconds, if not better). Very important to
kerberos, DCE, and other time-relative certificate security
systems.
There is a "NETTIME" utility for the 3000 which will query "daytime"
and synthesize a :setclock from it. Note that daytime returns a local
timestamp, timezone adjusted, for the host machine.
TARDIS and other programs for DOS/Win/NT set clocks based on "time" and
a locally defined timezone.
NTP I'll leave for a more learned reader to expound upon; I've only used
it in setting up our routers to sync to an external trusted source. I'm
not aware of any 3000 or PC software that syncs to an ntp server.
There are various servers available for public access for time sync
purposes such as tycho.usno.navy.mil, the US Naval Observatory, which
is a stratum 2 ntp source ('stratum' is a degree of accuracy; stratum 1
servers have a built-in atomic clock, stratum 2 servers are set via ntp
from a stratum 1, stratum 'n' servers are set via ntp from stratum 'n-1'
servers, etc.)
Of course, if you're a good network citizen, you only sync one or two
sources to the external servers, and sync your remaining machines to
the local sources, else the Navy may send a cruise missile your way :)
Jeff Kell <[log in to unmask]>
|