Troubleshooting NTP in Linux (RHEL5/6)

When you want to troubleshoot the NTP service, there are a few commands that can help you out. First, if you want to update the time manually, you can use the ntpdate command.

Syntax: ntpdate <server>

Step 1. Stop the NTP service:

# service ntpd stop
Shutting down ntpd: [ OK ]

Step 2. Specify the upstream server that you want to sync against:

# ntpdate
23 Aug 16:29:15 ntpdate[7047]: adjust time server offset 0.031852 sec

Step 3. Start the service again:

# service ntpd start
Starting ntpd: [ OK ]

Step 4. Verify that the time is accurate with the date command:

# date
Mon Aug 23 16:29:34 GMT 2010

The next troubleshooting command is ntpq, which enables you to query for other NTP servers. Here, the only concern is the -p option, which polls for other NTP servers:

# ntpq -p
remote refid st t when poll reach delay offset jitter
pool-test.ntp.o .INIT. 16 u – 64 0 0.000 0.000 0.061
knowledge.globa .INIT. 16 u – 64 0 0.000 0.000 0.061
bindcat.fhsu.ed .INIT. 16 u – 64 0 0.000 0.000 0.061
LOCAL(0) .LOCL. 10 l – 64 0 0.000 0.000 0.061

Finally, you can also go really in depth by tracing where the NTP server is getting its time sync from. To do this, you can use the ntptrace command.

Syntax: ntptrace <server>

You can specify the public Internet server from before to determine how high in the stratum the server is on other various sync statistics:

# ntptrace stratum 2, offset -0.000210, synch distance 0.

November 16, 2015

1 responses on "Troubleshooting NTP in Linux (RHEL5/6)"

Leave a Message

Visit Us On TwitterVisit Us On FacebookVisit Us On Google PlusVisit Us On YoutubeVisit Us On Linkedin