Monitoring Synchronization with NTPQ

Novell Cool Solutions: Trench
By Siddharth Jagtiani

Digg This - Slashdot This

Posted: 24 Jun 2003

The Problem

If you've configured NTPv3 (Network Time Protocol) for your NetWare 6.5 boxes, but you wish you were able to monitor the progress of the synchronization process, here's a tip for you.

The Solution

Use the interactive NTP query utility: "NTPQ". This tool has several useful commands.

  1. peers (you can also use "pe" at the ntpq prompt): This gives you the latest information of all your time providers. The columns to look out for are:

    1. The very first column has a particular character. This you should look/notice before anything else. This can represent many things.

      Here is a extract from NTPv3 help page at http://www.novell.com/documentation/lg/nw65/

      The character in the left margin indicates the fate of this peer in the clock selection process. The codes mean: discarded due to high stratum and/or failed sanity checks; "x" designated falsticker by the intersection algorithm; "." culled from the end of the candidate list; "-" discarded by the clustering algorithm; "+" included in the final selection set; "#" selected for synchronization but distance exceeds maximum; "*" selected for synchronization; and "o" selected for synchronization, PPS signal in use.

    2. "st" for stratum. 16 is a invalid stratum value representing "this server is not considered as a time provider". This can be for various reasons, the most common reasons are "time provider not synchronized", "configured source does not exist" or "ntp server not running".
    3. offset: Difference between "this server" and the time provider. This is in milliseconds

      Summary: st should be between 0 and 16. Offset should be less than 150 ms.

  2. "associations" (you can also use "as" at the ntpq prompt): One association is one time provider. The as command gives you a list of all associations and a summary about them.

  3. "readvar" (you can also use "rv" at the ntpqpromptt): This command gives you detailed information about your association. Usage is "rv ". So you need to first run the "as" command and then run the "rv" with the association you want details from. This command generates lot of information. The items of interest are the last 3 lines with 8 columns. Now, read carefully. The columns are the last 8 values for delay, offset and error scrolling from left to right. So the left most will have thelatestt information.

  4. "rvi" (NetWare 65 only): It's difficult to use the "rv" command since you have to remember the association id all the time. So, this command uses the index instead of the association id. Example: rvi 1 will give you the "rv" summary of the first association.

For the experts:
Q: I have seen the last 8 offsets, but what is the duration between each offset?
A: Simple, there is parameter "ppoll" (rv command), use this to calculate the duration between each poll.
Duration of poll = 2nd power ppoll. So if ppoll is 4, Duration will be 16 seconds.

  1. "pe" command will give you summary to check which time provider was selected for sync and who was rejected.
  2. "as" gives you theassociationn id's.
  3. "rv" or "rvi" : Will give you the history of last 8 poll's.

Simplest way to get regular updates.
Go too NetWare Remote Manager - Health Monitor - NTP Monitoring Service to get regular updates for "pe", "as", rv".

Editor's Note: for more information on NTPQ, see http://www.novell.com/documentation/lg/nw65/ntp/data/ajhtwhb.html

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© Micro Focus