(originally published on 03.04.2012, reviewed/rewritten on 24.04.2025, tested on Oracle Solaris 11.4 SRU 80)
 

It’s really easy to configure time synchronization with Solaris 11 1. I want to give you a very short walkthrough.

The SMF service svc:/network/ntp:default for NTP uses the config file /etc/inet/ntp.conf for the NTP client. This file doesn’t exist on a newly installed Solaris system. You can either take /etc/inet/ntp.client, copy it to /etc/inet/ntp.conf and modify it according to your needs. Or you create a new one. For this walkthrough it’s easier to create a new one.

Okay, at first i will configure the NTP servers my system will use. In my opinion you should one or four NTP services. Never use two. And using three may not be advisable, too. Why? You never know how late it is with two clocks. Either one could be correct. But which one? And I wouldn’t use three, because when one NTP server fails, you have only two NTP servers and thus the same problem mentioned before. With four NTP servers you have at least three NTP servers when one fails.

Furthermore you should choose NTP servers close to you. My colleague Brian Utterback wrote once this impacts the precision of your clock significantly. So for example when you are living in Germany, you should use *.de.pool.ntp.org for example, when you are living in the United states you should use *.us.pool.ntp.org. Further information about this pools is available at ntppool.org.

root@testbed:/etc/inet# echo "server 0.de.pool.ntp.org" > /etc/inet/ntp.conf
root@testbed:/etc/inet# echo "server 2.de.pool.ntp.org" >> /etc/inet/ntp.conf
root@testbed:/etc/inet# echo "server 3.de.pool.ntp.org" >> /etc/inet/ntp.conf
root@testbed:/etc/inet# echo "server 4.de.pool.ntp.org" >> /etc/inet/ntp.conf

The next few additions are the lines from the default /etc/inet/ntp.client that hadn’t a leading #

root@testbed:/etc/inet# echo "driftfile /var/ntp/ntp.drift" >> /etc/inet/ntp.conf
root@testbed:/etc/inet# echo "statsdir /var/ntp/ntpstats/" >> /etc/inet/ntp.conf
root@testbed:/etc/inet# echo "filegen peerstats file peerstats type day enable" >> /etc/inet/ntp.conf
root@testbed:/etc/inet# echo "filegen loopstats file loopstats type day enable" >> /etc/inet/ntp.conf

Due to the default configuration allowing large steps in time, an initial correction of the time with ntpdate isn’t necessary.

root@testbed:~# svccfg -s ntp listprop  | grep "config/" | grep "allow"
config/allow_step_at_boot                                          boolean     true
config/always_allow_large_step                                     boolean     true

It till take a few minutes, but soon after you have enabled the ntp service, the time should be corrected.

root@testbed:~# date 1234.56
root@testbed:~# date
Thu Apr 24 16:46:15 CEST 2025
root@testbed:~# svcadm enable svc:/network/ntp:default
root@testbed:~# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 mx02.fischl-onl 205.46.178.169   2 u   55   64    1   38.241  +110280   0.000
 x.ns.gin.ntt.ne 129.250.35.222   2 u   55   64    1   28.986  +110280   0.000
 time.intrabit.s 193.190.230.65   2 u   53   64    1   39.613  +110280   0.000
 192.248.187.154 91.135.4.191     2 u   52   64    1   40.234  +110280   0.000

A few minutes later, the correct time should be set by NTP.

 root@testbed:/var/ntp# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 mx02.fischl-onl 205.46.178.169   2 u   37   64    1   42.069  -156.18   0.000
 x.ns.gin.ntt.ne 129.250.35.222   2 u   53   64    1   31.130  -133.10   0.000
 time.intrabit.s 193.190.230.65   2 u   26   64    3   30.193  -174.93  84.186
 192.248.187.154 91.135.4.191     2 u   57   64    1   34.460  -132.44   0.000
root@testbed:/var/ntp# date
Thu Apr 24 19:46:15 CEST 2025

  1. Well … it’s as easy as with Solaris 10, because it’s the same procedure. 

Written by

Joerg Moellenkamp

Grey-haired, sometimes grey-bearded Windows dismissing Unix guy.