[plug] NTP update problems - dialup
Timothy White
weirdo at tigris.org
Tue Mar 29 10:25:05 WST 2005
Once again I'm having problems getting synchronisation with a time
server. What I have down is right a small script and put it in
/etc/ppp/ip-up.d/ so that it is run last (so all the routing stuff is done.)
The script is as follows.
#!/bin/sh
((echo "Updating Time";date; sleep 1; /usr/sbin/ntpdate -u -d -v
pool.ntp.org 2>&1; echo $?;date) | mail -s "Updating Time" webmaster) &
---
You can see from the output that it sleeps for 1 second before starting
to allow all other startup scripts to finish even though this script is
zzzntpdate so it runs last. For some reason it doesn't appear to go to
the background and looking at 'ps aux' I can see for each dialup
connection I make it runs two scripts but only one instance of ntpdate?
root 3205 0.0 1.4 2432 884 ? S Mar28 0:00 /bin/sh
/etc/ppp/ip-up.d/zzzntpdate ppp0 /dev/ttyS0 115200 203.213.143.156
203.213.142.254 Optus
root 3206 0.0 1.4 2432 896 ? S Mar28 0:00 /bin/sh
/etc/ppp/ip-up.d/zzzntpdate ppp0 /dev/ttyS0 115200 203.213.143.156
203.213.142.254 Optus
root 3212 0.0 1.0 1652 624 ? S< Mar28 0:00
/usr/sbin/ntpdate -u -d -v pool.ntp.org
Upon killing ntpdate I finally get the email which shows that ntpdate is
failing and retrying once a minute until I kill it.
Updating Time
Tue Mar 29 10:12:23 WST 2005
29 Mar 10:12:24 ntpdate[11260]: ntpdate 4.2.0a at 1:4.2.0a+stable-2-r Sun Jan 9 16:13:28 CET 2005 (1)
29 Mar 10:13:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:14:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:15:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:16:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:17:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:18:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:19:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
29 Mar 10:20:26 ntpdate[11260]: poll(): nfound = 0, error: Address family not supported by protocol
143
Tue Mar 29 10:21:16 WST 2005
....
This appears to show that it is failing for some unknown reason and
retries once a minute
Once in a blue moon it works and I get an email that looks like this
showing that we had ether disconnected to quickly or the connection had
dropped immediately like it sometimes does.
Updating Time
Tue Mar 29 09:54:01 WST 2005
29 Mar 09:55:01 ntpdate[10920]: ntpdate 4.2.0a at 1:4.2.0a+stable-2-r Sun Jan 9 16:13:28 CET 2005 (1)
Error : Temporary failure in name resolution
29 Mar 09:55:41 ntpdate[10920]: can't find host pool.ntp.org
29 Mar 09:55:41 ntpdate[10920]: no servers can be used, exiting
1
Tue Mar 29 09:55:41 WST 2005
This shows that it started at 6:53, started updating the time 1minute
later and exited with code 1 (And couldn't update the time) and finished
at 6:55.
Any ideas?
Tim
--
Tim White - Use the Fox, Luke!
PGP/GPG id: 602E944D, Pub Key Serv: subkeys.pgp.net
Fingerprint: 04C2 9682 B7B2 3006 009D A9F3 067E EDCD 602E 944D
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
--
Linux linmedia 2.6.10linmedia #4 Mon Feb 21 21:19:38 WST 2005 i686 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20050329/270eeaca/attachment.pgp>
More information about the plug
mailing list