Using NTPQ to Monitor NTP Synchronization
Novell Cool Solutions: Trench
By Siddharth Jagtiani
Digg This -
Posted: 23 Jul 2003
I have configured NTPv3 for my NetWare 6.5 boxes, but I am unable to monitor the progress of synchronization.
SOLUTION: Here, you need to use the interactive utility "ntpq". This tool has three interesting commands.
(For easy use you can also use "pe" at the ntpq propmt) : This gives you the latest information of all your time providers. The interesting columns to look out for are:
a) 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:
- <sp> 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.
b) "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".
c) 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.
(For easy use you can also use "as" at the ntpq propmt) : Simple understanding, one association is one time provider. as command gives you a list of all associations and a summary about them.
(For easy use you can also use "rv" at the ntpq propmt) : This command will give you detailed information of your association. Usage is "rv <association id>". So you need to first run the as command and then run the "rv" with the association you want details from. This command gives out a lot of information. The ones that are interesting are the last three lines with eight columns.
Now, read carefully. The columns are the last eight values for delay, offset and error scrolling from left to right. So the left-most will have the latest information.
This is how you monitor the status. The aim of this exercise was to look for the last eight offsets and check how you have been doing.
4) rvi (NetWare 6.5 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 eight 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 = 2 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 the assocation id's.
3) rv <ass_id> or rvi <index> : Will give you the history of last 8 polls.
Simplest way to get regular updates:
Go to NetWare Remote Manager - Health Monitor - NTP Monitoring Service to get regular updates for "pe", "as", rv".
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com