Clock synchronization software synchronizes time across multiple systems in a network. Oracle Solaris uses the Network Time Protocol (NTP) and the Precision Time Protocol (PTP) to synchronize the system clock. You can also use the rdate command while using the cron utility to synchronize system clocks.
You must not run NTP and PTP on the same system simultaneously. Also, you must configure only a single instance of the NTP or PTP service on a system.
NTP is open source software from the University of Delaware that is included in the Oracle Solaris software. The ntpd daemon sets and maintains the system time of day. The ntpd daemon is a complete implementation of the version 4 standard as defined by RFC 5905. You can use the svc:/network/ntp:default service to start the ntpd daemon.
The ntpd daemon reads the /etc/inet/ntp.conf file at system startup. See the ntp.conf (5) man page for information about configuration options. Sample ntp.conf files are available at /etc/inet/ntp.server and /etc/inet/ntp.client on a system.
Note the following when using NTP in your network:
The ntpd daemon uses minimal system resources.
An NTP client synchronizes automatically with an NTP server when it boots. If the client becomes unsynchronized, the client resynchronizes again when the client contacts a time server.
If you use the NTP service on a virtualized SPARC system, you must run the NTP service in the global zone, logical domain, control domain, and kernel zone.
You cannot run the NTP service on both global zone and non-global zone at the same time.
By default, you cannot run the NTP service on a non-global zone because a non-global zone does not have sufficient privileges. However, if the NTP service is not running on the global zone, you can configure a non-global zone with the privileges required to run the NTP service.
Avoid configuring exactly two NTP servers as this might lead to clock hopping.
You must use only one NTP server to set the system time and keep it correct. However, for setting system time accurately, you can use a minimum of four NTP servers.
Use local reference clock only when necessary.
Additional documentation for the NTP service is available at /usr/share/doc/ntp/index.html on a system running the Oracle Solaris 11 release.
For information about procedures for administering NTP, see Managing the Network Time Protocol.
The NTP service requires the following files:
Contains the NTP authentication keys.
Leap seconds configuration file. This is an optional file and is not delivered by the NTP package.
Contains additional configuration instructions for some NTP servers.
NTP daemon. For more information, see the ntpd(8) man page.
Utility to set the local date and time, based on NTP. For more information, see the ntpdate(8) man page.
NTP query program. For more information, see the ntpq(8) man page.
Program to display or set the kernel time variables. For more information, see the ntptime(8) man page.
Program to trace NTP hosts back to the master NTP server. For more information, see the ntptrace(8) man page.
Program used to generate public and private keys for NTP. For more information, see the ntp-keygen(8) man page.
The PTP software synchronizes system time across multiple systems in a broadcast domain, such as a local area network (LAN). Oracle Solaris 11.4 PTP software is implemented as the ptpd daemon, which is based on the public domain software available at https://github.com/ptpd/ptpd. It implements PTP Version 2 as defined in the IEEE standard 1588-2008.
The ptpd daemon can use the hardware assistance capability provided by any compatible Network Interface Card (NIC) and its driver to timestamp the PTP packets.
You can use the svc:/network/ptp:default service to start the ptpd daemon. You can configure a system as a PTP slave or a PTP master.
PTP slave – Runs the ptpd daemon in slave mode. A PTP slave synchronizes the system clock to a master clock present in the subnet.
PTP master – Runs the ptpd daemon in master mode. Other systems in the slave mode can synchronize their clock to the PTP master.
The state of the ptpd daemon can be slave, master, or initializing.
By default, the service management facility starts the PTP service as a slave and binds the PTP service to the first interface that is up and running. For more information about the Service Management Facility, see the smf(7) man page.
The ptpd daemon uses the /var/log/ptp.log file to record the following information:
Timestamp of the PTP log entry
State of the ptpd daemon
Clock ID
For task information, refer to Managing the Precision Time Protocol.