July 23, 2019

Old Suns and NTP

It has been noticed for some time, by some people, that our old suns are not keeping proper time. They should be running NTP. At the time of this writing Crater is about 9 minutes behind the real world. In other words Crater thinks it is 11:51 when it is actually 12:00.

The on board oven computers obtain their time from Crater. Certainly when they boot, and it is unknown (to me anyway) if they update their time subsequently). This has interesting implications for the oven data staleness checking. When I ran the new oven software on a linux machine with the proper time, the data appeared to be 9 minutes old and was all invalidated by the staleness check. This check was "opened up" to allow testing the new software without rebooting the on board computers.

Notice thought that when Crater's time is fixed, the data from the oven will all be marked invalid until either the on-board computers are rebooted, or the old oven software has the check opened up (which will never happen).

Fixing NTP

On Solaris, the relevant file is /etc/inet/ntp.conf. The problem is that the NTP servers listed in this file no longer exist. The fix is to comment out these old servers and add a server that actually exists. This is the sort of thing that happens with machines that nobody has been looking after for over 10 years. The new file now looks like this:
server ntp.arizona.edu
#server ntp1.arizona.edu
#server ntp2.arizona.edu
#server ntp3.arizona.edu
Note that the ability to access an NTP server can be tested via the following command. Note that it may not be possible to access off-campus NTP servers due to firewall policies established by CCIT, so this is worth checking.
ntpdate -q ntp.arizona.edu
server 128.196.128.233, stratum 2, offset 520.982519, delay 0.02655
23 Jul 12:01:39 ntpdate[6706]: step time server 128.196.128.233 offset 520.982519 sec
After making the above edits the ntp server needs to be restarted via:
cd /etc/init.d
./xntpd stop
./xntpd start
After a few minutes, the time will be correct. The state of NTP can be checked via the following command:
bash-2.03# ntpq -p
remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
128.196.128.233 10.140.34.16     2 u   53   64    1     1.21   -4.629 15875.0
A non-zero "reach" value is a good thing, along with non-zero values for offset and disp.
Have any comments? Questions? Drop me a line!

Tom's home page / [email protected]