output of ntpq -p

Howdy guys,

I have 2 sun solaris server(T200) in cluster mode.

I put the command below ntpq -p.

I need your help to understand the output. I plan to change the date and time in both server.

[solaris1] node1:/home/mydir> ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        LOCAL(0)         3 l   20   64  377     0.00    0.000   10.01
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*clusternode2-pr LOCAL(0)         4 u  528 1024  377     0.66    0.029    0.60


[solris2] node2:/home/mydir> ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*LOCAL(0)        LOCAL(0)         3 l    5   64  377     0.00    0.000   10.01
 clusternode1-pr clusternode2-pr  5 u  608 1024  376     0.64   -0.038   15.12
 clusternode2-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0

Thnks,
purple

What exactly do you not understand about the output?

what is *clusternode2-pr *LOCAL(0) means?

If i enter the date command and change the date in NODE 1; Will NODE 2 automitically syncronize the time from Node1?

#date mmddhhmmyy

$ ps -ef | grep ntp
root 541 528 0 Mar 02 ? 1:27 /usr/lib/inet/xntpd
root 528 1 0 Mar 02 ? 2:38 /usr/lib/inet/xntpd

$cat /etc/inet/ntp.conf
#...
server 127.127.1.0
peer clusternode1-priv prefer
peer clusternode2-priv
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv
peer clusternode9-priv
peer clusternode10-priv
peer clusternode11-priv
peer clusternode12-priv
peer clusternode13-priv
peer clusternode14-priv
peer clusternode15-priv
peer clusternode16-priv

# Drift file (optional)
driftfile /var/ntp/ntp.drift
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

-----------------------------

Allow me to use your first post as reference

     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        LOCAL(0)         3 l   20   64  377     0.00    0.000   10.01
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*clusternode2-pr LOCAL(0)         4 u  528 1024  377     0.66    0.029    0.60
  • The asterisk indicates the prefered update node (where first to try to get the time).
  • remote is the address of the time server, with LOCAL(0) indicating the local clock.
  • refid indicated the type of the time server. LOCAL or .LCL. means local, .DCFa. is a DCF77 receiver, .PPS. is a hardware device generating a pulse every second.
  • st is the Stratum, which indicates the accuracy to be expected. Stratum 0 are usually atomic clocks, Stratum 1 might be radio controlled clocks.
  • when is the time to the next update.
  • poll is the count that when has to reach before an update is attempted
  • reach is an octal number that is left-shifted on each update. On a successful update an 1 is shifted in, 0 otherwise.
  • delay is the RTT to the time server
  • offset is the difference between the remote and the local clock

The way it's setup currently, your two servers only synchronise themselves locally and not to each other (which wouldn't be that good of an idea anyways without an additional good external source). Go to pool.ntp.org, pick a pool geographically close to you, and add it to your ntp.conf.

1 Like

million thanks pudi to explain it.

for some reason i will not go to synchronize the time with external NTP server.

now need a advise. As you said- two servers only synchronise themselves locally and not to each other.

I have two server are cluster mode and Oracle RAC is running

To change the time and date can I change it one after another in node 1 and Node2 (with date command)?? I don't want to restart the cluster and Oracle RAC.

will it be effect anything in cluster environment.

-purple

I'll take the same output as reference again:

     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 LOCAL(0)        LOCAL(0)         3 l   20   64  377     0.00    0.000   10.01
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*clusternode2-pr LOCAL(0)         4 u  528 1024  377     0.66    0.029    0.60

Your problem is that "clusternode2-priv" cannot synchronise with "clusternode1-priv", as indicated by a reach of 0 (means no successful update during the last 8 attempts, each attempt 1024 seconds apart = about 2 hours 15 minutes). This can have several causes

  • No NTP server on the other node
  • No route to the other host
  • Unable to resolve the hostname to an IP address

I'd suggest changing the ntp.conf on node 1 to be the primary time source (no sync to node 2), and on node 2 to sync from node 1, synching every minute. That way you'll only have to change the time on node 1, and node 2 will catch up a minute later.

Okay. What entry i should change in the ntp.conf for both node1 and node2?

$cat /etc/inet/ntp.conf
#...
server 127.127.1.0
peer clusternode1-priv prefer
peer clusternode2-priv
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv
peer clusternode9-priv
peer clusternode10-priv
peer clusternode11-priv
peer clusternode12-priv
peer clusternode13-priv
peer clusternode14-priv
peer clusternode15-priv
peer clusternode16-priv

# Drift file (optional)
driftfile /var/ntp/ntp.drift
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable