2

Environment: NTP Clients (AIX 6.1 TL07) + P/S NTP Servers (ST1 GPS).

Symptom:

  1. the ntpq -pn command outputs both the primary and secondary (candidate) NTP server.
  2. the ntptrace command just outputs both the loopback and primary NTP server.

Questions:

  1. Why would the loopback appear in the ntptrace peers list even without this entry in the ntpq (ntp.conf)?
  2. Why would the secondary (candidate) NTP server entry not appear in the ntptrace peers list?
# grep -Ev "^(#|$)" /etc/ntp.conf
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
server 10.16.27.24
server 10.18.12.15
# ntpq -pn
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*10.16.27.24   .GPS.            1 -   42  128  377     0.98   -0.078    0.11
+10.18.12.15   .GPS.            1 -   20   16  377     1.89   -0.056    0.41
# ntptrace
loopback: stratum 2, offset -0.000290, synch distance 0.00131
10.16.27.24: stratum 1, offset -0.000308, synch distance 0.00000, refid 'GPS'
1
  • 2
    Why would ntptrace want to show servers that are not used for time synchronisation? Why should it skip showing the stats for the local machine (loopback)?
    – Kusalananda
    Commented Aug 5 at 9:24

2 Answers 2

5

It's possible you're misunderstanding what ntptrace does; it doesn't look at the list of peers, it follows the current active chain ("who is my active server"; "who is active for that"; "who is the next active server"...) until it reaches a primary source (eg a GPS server). It's tracing the primary active connections so you can see the chain of servers and how far you are from an authoritative source.

So, for example, let's say your machine was NTP sync'd to your router; your router was sync'd to your ISP; your ISP was sync'd to a GPS.

Then ntptrace would try and provide that detail; localhost -> router -> ISP

In your case, your machine is sync'd to a machine that is sync'd to GPS, so and ntptrace will just show your machine and the server it's sync'd to. Hence localhost -> 10.16.27.24

If you want to trace another machine's ntp server chain then you'd specify that on the command line, otherwise it starts with localhost

3
  • But I can indeed see a few other cases with multiple peers list in the ntptrace outputs ...
    – lylklb
    Commented Aug 5 at 13:09
  • @lylklb Then those peers are syncing with each other.
    – Kusalananda
    Commented Aug 5 at 14:42
  • Could I think that it would be suitable for the same stratum level NTP Servers to sync time with each other ?
    – lylklb
    Commented Aug 6 at 14:16
-1

I have just noticed the following descriptions from man ntptrace in the AIX:
"Traces a chain of Network Time Protocol (NTP) hosts back to their master time source."

So it by default only trace to the primary active NTP server ...


I have confirmed that the ntptrace by default does only trace the chain of the primary/master source time server.
The master NTP chain diagram: 10.30.23.28(local) ---> 10.30.23.26(peer ST2) ---> 10.16.27.24(peer ST1) ---> GPS

# 
# ntpq -p                           
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
+10.30.23.25    10.18.12.15     3 -   29  128  377     0.23    0.350    0.31
*10.30.23.26    10.16.27.24     2 -   24  128  377     0.27    0.453    0.26
 LOCAL(0)        LOCAL(0)         3 l   42   64  377     0.00    0.000   10.01
# 
# 
# ntptrace  
loopback: stratum 3, offset 0.000236, synch distance 0.00238
10.30.23.26: stratum 2, offset 0.000768, synch distance 0.00146
10.16.27.24: stratum 1, offset 0.000977, synch distance 0.00000, refid 'GPS'
# 
# 

Notes: the ntpq and the ntptrace are two different things, so themselves have no comparability between each other.
1
  • Am I wrong ... ? By default,, I means about without a given special NTP Server ......
    – lylklb
    Commented Aug 11 at 11:06

You must log in to answer this question.

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