• 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. “su: Authentication failure” – in Docker
  2. Honeypot Tutorials – Modes and Working of Honeypot
  3. What causes iptables to load every time after a reboot even when it’s completely turned off
  4. Windows Active Directory Account Shows Inconsistent UID/GID In Different Linux SSSD Clients (CentOS/RHEL)
  5. How to disable FIPS mode on CentOS/RHEL 7
  6. How To Install Python 3 On CentOS 7 Using SCL
  7. How to Configure Network Teaming in CentOS/RHEL 7
  8. How to Control user access to Virtual Machine in RedHat Virtualization
  9. Beginners Guide to Udev in Linux
  10. How to Change or Rename a Mount Point in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qemu-system-x86_64: command not found
  • timedatectl: command not found
  • mpirun.openmpi: command not found
  • startkde: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright