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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ntpq Command Examples in Linux

by Deepika

ntpq is a Linux utility that is used to query the Network Time Protocol (NTP) daemon and to display information about the NTP associations and the state of the NTP clock. NTP is a protocol used to synchronize the clocks of networked systems to within a few milliseconds of each other.

ntpq is used to query the NTP daemon and display information about the NTP associations that the daemon has established with remote NTP servers. This information includes the status of each association, the address and stratum of each remote server, and the current time offset between the local clock and each remote server.

ntpq can also be used to display information about the state of the NTP clock, including the estimated accuracy of the clock, the current time, and the status of the clock discipline algorithm.

ntpq Command Examples

1. Start `ntpq` in interactive mode:

# ntpq --interactive

2. Print a list of NTP peers:

# ntpq --peers

3. Print a list of NTP peers without resolving hostnames from IP addresses:

# ntpq --numeric --peers

4. Use `ntpq` in debugging mode:

# ntpq --debug-level

5. Print NTP system variables values:

# ntpq --command=rv

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 5 : How to configure Interface bonding (NIC teaming)
  2. How to Enable Password Aging in Linux with NIS
  3. Inconsistent Device Names Across Reboot Cause Mount Failure Or Incorrect Mount in Linux
  4. chattr Command Examples to Change File Attributes (Make files immutable)
  5. fakedata: Generate fake data using a large variety of generators
  6. Linux OS Service ‘ntpd’
  7. blackfire: A command-line profiling tool for PHP (Command Examples)
  8. lslocks Command Examples in Linux
  9. timedatectl: command not found
  10. screenkey Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • “glab pipeline” Command Examples
  • “glab mr” Command Examples
  • “glab mr merge” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright