Thursday, July 17, 2008

Activate NTP Service in Solaris

In our particular case we just need that the machine has its time synchronized:

At /etc/inet directory we have two files:


Copy the /etc/inet/ntp.client file into /etc/inet/ntp.conf.

The content of that file is as follows:

# ident "@(#)ntp.client 1.3 00/07/17 SMI"
# /etc/inet/ntp.client
# An example file that could be copied over to /etc/inet/ntp.conf; it
# provides a configuration for a host that passively waits for a server
# to provide NTP packets on the ntp multicast net.


This should work but the routers generally drops this kind of multicast messages, so we must do some changes in the file.

driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/

Make sure the /var/ntp/ntp.drift file exists (touch /var/ntp/ntp.drift).

Make sure the directory /var/ntp/ntpstats/ exists.

Start the service with svcadm enable ntp.

You could check /var/adm/messages and /var/svc/log/network-ntp:default.log logs.

You could query the service with ntpq –p.

remote refid st t when poll reach delay offset disp
smtp.housefront enigma.wiredgoa 3 u 865 1024 377 105.15 10.086 0.43
* .ACTS. 1 u 75 1024 377 110.12 0.315 1.59
+dnscache1.izoom ntp2.twc.weathe 2 u 160 1024 377 68.21 -32.835 11.49

The ntpdate host command could be used for a one time updating of the system time.

No comments: