Time Services
Computing Services Technote #504 v9
Title: Time Services
Applies to: Campus users requiring accurate computer time
Section: Network Services
Owner: Manager of Network Services
Last updated: 5 November 2015
Introduction
Many computers require accurate time for proper operation and coordination with other computers and users. This technical note describes the University of Regina time service and its use.
All computer files are time stamped in some form and all users expect, as a minimum, time to be accurate within at least 60 seconds so that they know that the minute portion of a timestamp is reasonably accurate. Upon further analysis it turns out that users actually expect much higher accuracy as they often make important decisions based on which file is newer. If time is loosely synchronized and periodically adjusted a user might create a file, the system might move the time back 90 seconds due to a normal time synchronization check, and then the user might create a 2nd file which appears to be created before the 1st file! In a distributed network computer there are a number of other reasons for wanting accurate time:
- programs, like make under Unix, compare the timestamps of source files against object files to see if the object file needs to be recreated.
- system logs contain time stamps and it is often important that events be entered in the proper order.
- users conducting scientific experiments often timestamp data.
- some security software requires that the system time be close to Universal Coordinated Time.
How Accurate Time is Achieved
On the internet there are a number of computers synchronized directly to highly accurate time provided through radio broadcast services like WWV or satellite service like the Global Positioning Satellite time service. These servers run the ntp(network time protocol) code so that other computers can synchronize to them. An on-site stratum 1 server is usually provided as well so that accurate time is maintained even over the day or two it may take to repair a failed internet connection. An onsite server also reduces the network load and the load placed on heavily used internet stratum 1 servers.
Time service at the University of Regina will be provided by synchronizing to a local stratum 1 server and stratum 1 servers on the internet. See Appendix A for a description of the server configuration.
Synchronizing client computers
UNIX clientsUnix machines should randomly pick one of the timeserver machines, timelord1.uregina.ca or timelord2.uregina.ca, and synchronize to them. This will ensure that the load is distributed across two machines. For highly accurate synchronization Unix users can install the ntp software which is included with most Linux distributions. Users wishing to do so should contact their support staff for assistance with the configuration.
Some UNIX users do not need highly accurate time and can use one of the following methods to synchronize to one of the two main time servers.
LINUX
The program ntpdate can be used( ntpdate timelord1.uregina.ca) or the newer sntp( sntp -P no -r timelord1.uregina.ca ). Just set these up to run out of cron daily.
IRIX
The timeslave command can be used to sync to one of timelord1 or 2. Edit the file /etc/config/timeslave.options so that it contains -H timelord1.uregina.ca -P/usr/tmp/.timetrim, and enable the timeslave program with the command chkconfig timeslave on. Timeslave will be automatically started after a reboot.
Macintosh Users
The Date & Time preference panel of OS X and later allows you to synchronize to an internet time server.
Windows XP, Vista, 7, 10, 2003, 2008, 2012 Users
The service w32time included in Windows XP etc. can be used to synchronize time. Check the administrative tools|Services control panel to make sure the Windows Time service(w32time) is set to automatically start at system boot as by default it isn't. Then open up a command prompt and enter "w32tm /config /manualpeerlist:"timelord.uregina.ca,0x8 timelord2.uregina.ca,0x8 timelord.cs.uregina.ca,0x8" /syncfromflags:manual /update".These changes require administrator privileges.
Conclusion
Accurate time service is available to University of Regina users.Client software is available to allow UNIX, DOS/Windows, and Macintosh clients to synchronize to time servers.
References
David Mills et. al., "Network Time Protocol Version 4: Protocol and Algorithms Specification", published as internet RFC5905
___________,Configuring Windows 2000 and Windows XP to use NIST Time, http://tf.nist.gov/service/pdf/win2000xp.pdf
Appendix A - Server Configuration
The ntp software daemon, ntpd, runs primarily on Unix machines so it is installed on sue.cc.uregina.ca, atlas.cc.uregina.ca, mercury.cs.uregina.ca and clock.uregina.ca. Clock.uregina.ca provides stratum 1 time service via a GPS clock to the other servers and shouldn't be used directly.This provides redundancy in the case that one of the three machines is down for servicing or the network segment that one of them is on s down. Each of these is synchronized with two stratum 1 servers and one stratum 2 server.This will provide stratum 2 service to the U of R derived from six independent stratum 1 servers for reliability.To allow flexibility in changing machines the following CNAMES are used:
CNAME | Host Name |
---|---|
timelord1.uregina.ca/timelord.uregina.ca | sue.cc.uregina.ca |
timelord2.uregina.ca | atlas.cc.uregina.ca |
timelord.cs.uregina.ca | mercury.cs.uregina.ca |
Access to on campus users is unrestricted. CA*net users may also sync to timelord.uregina.ca as long as only 1 or 2 hosts per site synchronize.
Users should always use the timelord aliases as the names of the UNIX machines providing the service are subject to change without notice.
Revision History
v0, 1996-07-22, Initial version
v1, 1996-07-22, updated winsntp link
v2, 1998-03-22, added ntpdate for Solaris, removed Banyan ref, replaced wsntp with d4time, timelord2 changed to atlas
v3, 2001-04-16, updated to reflect local stratum 1(clock.uregina.ca), added section for Netware 4/5 servers, changed Macintosh users to use the built-in apple client instead of tardis
v4, 2002-04-21, updated ntp software link, remove MSDOS/Ultrix/OSF1 section,removed reference to CS providing tardis time services.
v5, 2003-10-01, added section for WinXP using w32time.
v6, 2008-09-02, updated WinXP section for w32tm instead of w32time.
v8, 2010-02-10, updated WinXP section to include three servers in client mode as suggested by Ryan Goolevitch
v9, 2015-11-05, updated Unix section to remove SunOS and add reference to ntpdate/sntp. Update macintosh section. Remove Netware/Windows 98.