[ntp:questions] sntp output for bootstrapping system time
cnelson at nycap.rr.com
Mon Nov 21 21:30:02 UTC 2005
The SNTP README says:
WARNING: adjtime is more than a bit sick on many systems, and will
ignore large corrections, usually without any form of hint that it
has done so. It is often (even usually) necessary to reset the
clock to approximately the right time using the -r option before
using the -a and -x options to keep it correct.
sntp -r ntp.mydomain.com
and it prompted me about the big difference then ignored me when I said
Y to the prompt.
So I tried to do something like:
# Get the approximate date
date -s `sntp ntp.mydomain.com | somefilter`
# Fix it up with NTP
but I'm having trouble coming up with filter that massages sntp output
to date input without what seems to be undue complexity. Is there
something I'm missing? Is there an SNTP option to generate output
compatible with date?
More information about the questions