2

Can you please guide, where on solaris i can check NTP related logs? If there is any issue related to NTP on solaris, which is the right place to check for the root cause? Thanks

3 Answers 3

2

There are several logs to analyze, the system log in /var/adm/messages but also the service management logs.

The recommended way to check service health in Solaris 10 and up is to use the SMF (Service management facility).

Check for the service state using:

$ svcs -xv ntp
svc:/network/ntp:default (Network Time Protocol (NTP) Version 4)
 State: disabled since December 28, 2015 12:00:10 PM CET
Reason: Disabled by an administrator.
   See: http://support.oracle.com/msg/SMF-8000-05
   See: man -M /usr/share/man -s 1M ntpd
   See: man -M /usr/share/man -s 4 ntp.conf
   See: man -M /usr/share/man -s 1M ntpq
   See: /var/svc/log/network-ntp:default.log
Impact: This service is not running.

From the above output you can see there is a specific log called /var/svc/log/network-ntp:default.log

It is also possible to configure the ntp service to enable debug/verbose logging. See the properties below:

# default values
$ svccfg -s svc:/network/ntp:default listprop config
config                          application        
config/allow_step_at_boot      boolean     true
config/always_allow_large_step boolean     true
config/debuglevel              integer     0
config/logfile                 astring     /var/ntp/ntp.log
config/mdnsregister            boolean     false
config/no_auth_required        boolean     false
config/slew_always             boolean     false
config/value_authorization     astring     solaris.smf.value.ntp
config/verbose_logging         boolean     false
config/wait_for_sync           boolean     false

Look at the properties config/debuglevel, config/logfile and config/verbose_logging

For documentation see man -s 1M ntpd and look at section AUTOMATIC SERVICE MANAGEMENT (SMF). You will find a brief explanation about the service configuration properties.

1

Try to Enable logging if not enabled.

svccfg -s svc:/network/ntp:default setprop config/verbose_logging = true

Solaris ntpd write messages to syslog /var/adm/messages

0

1) Check that ntpd daemon is up and working:

 # pgrep -lf ntp
 4000 /usr/lib/inet/ntpd -p /var/run/ntp.pid -g

2) Look for warnings and/or errors from ntpd daemon on system log:

      # tail -f /var/adm/messages

link:

https://lucamerello.wordpress.com/2014/05/03/solaris-10-configure-and-enable-ntp-client-service/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .