Enable NTP Client on Solaris 11
Just some quick instructions for configuring and enabling NTP client on Solaris 11.
Backup the existing ntp.conf file, if it exists:
if [ -r /etc/inet/ntp.conf ] ; then /bin/mv /etc/inet/ntp.conf /etc/inet/ntp.conf_`date +'%Y-%m-%d_%H%M%S'`
Create a new ntp.conf:
cat << EOF > /etc/inet/ntp.conf server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org driftfile /var/ntp/ntp.drift statsdir /var/ntp/ntpstats/ filegen peerstats file peerstats type day enable filegen loopstats file loopstats type day enable EOF
Run time update once manually to verify connectivity:
# ntpdate 0.pool.ntp.org 7 Oct 20:02:34 ntpdate[25549]: step time server 63.245.214.135 offset 153.036870 sec
Enable ntp client service and verify it is working:
svcadm enable ntp root@solaris11:~# svcs | grep ntp online 20:02:41 svc:/network/ntp:default
See what NTP client is doing:
root@solaris11:~# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *tic.apt.cat 128.227.205.3 2 u 19 64 377 32.289 29.129 9.017 +ntp.awesomemari 216.66.0.142 3 u 21 64 377 22.788 18.035 15.603 xtime01.muskegon 204.9.54.119 2 u 13 64 377 33.524 -334.25 25.541 +sola-dal-09.ser 184.173.173.205 3 u 20 64 377 38.119 41.857 16.345
Good article, thanks for sharing. If any problem occurs, you can check: /var/svc/log/network-ntp:default.log