• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

What is the refid in ntpq -p output?

by admin

Question

When executing an ntpq -p command, what is the refid?

$ ntpq -p
remote                refid            st t  when poll  reach   delay   offset   jitter
========================================================================================
*myntp.example.com   192.168.102.252   2  u  161  1024  377     0.841   -0.442   1.365

Answer

A stratum-0 is an actual time source. It is connected to a server which is a stratum-1 server. Systems that use a stratum-1 system as their time source are stratum-2. Systems that use stratum-2 servers as their time source are stratum-3, so on and so forth. The further from the source, the less accurate the devices become.

The refid is the ultimate time source used. For example:

$ ntpq -p
remote                refid       st t when poll reach   delay   offset   jitter
==============================================================================
*myntp.example.com 192.168.201.11 2 u  161 1024  377    0.841   -0.442   1.365

The system is using myntp.example.com as it’s time source. The server myntp.example.com is ultimately getting its time from 192.168.201.11.

The purpose is so that servers do not use each other as their time source. If nodeA has nodeB as it’s refid, then nodeB would not be able to use nodeA as its source.

Other fields in ntpq -p command output

To better understand the output of the ntpq -p command, I’ll go through each column. First, the remote column details the NTP servers we’re connected to. The refid column refers to the NTP servers that the remote servers are connected to. The st column refers to a server’s stratum, which refers to how close the server is from us (the lower the number, the closer, and typically, better). The t column refers to the type, specifically whether the server is using unicast, broadcast, multicast, or manycast.

Continuing, the when column refers to how long ago it was since the last time the server was polled. The poll column indicates how often the server will be polled, which is 64 seconds for most of the entries in the example screenshot. The reach column contains the results of the most recent eight NTP updates. If all eight are successful, this field will read 377. This number is in octal, so eight successes in octal will be represented by 377. When you first start the ntp daemon on your server, it may take some time for this number to reach 377.

Finally, we have the delay, offset, and jitter columns. The offset column refers to the delay in reaching the server, in milliseconds. Offset references the difference between the local clock and the server’s clock. Finally, the jitter column refers to the network latency between your server and theirs.

Filed Under: Linux

Some more articles you might also be interested in …

  1. gnome-terminal: command not found
  2. How to Verify a Lun is in Active/Optimized Mode when ALUA Is Configured on Storage
  3. RHEL/CentOS 6,7 : How to caculate the size of hugepage used by a specific process/application
  4. vncserver fails with “Starting VNC server: no displays configured”
  5. Unable to Start RDMA Services on CentOS/RHEL 7
  6. dbus-daemon: command not found
  7. What is umask in UNIX/Linux
  8. How to Trace Python Scripts using trace.py
  9. How to monitor the status of dm-multipathing and multipath devices (path groups) in Linux
  10. dmesg Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright