[ntp:hackers] State and Status

Steve Kostecke kostecke at ntp.org
Wed May 7 20:43:31 UTC 2008


I've been testing 4.2.5p54 to see what the ntpq -crv status bit tells
me.

The stats are collected with 'ntpq -c"rv 0 clock,state"' in a shell
script loop with a 1 second sleep.

Here's what I see ...

After a start-up with no drift file:

| assID=0 status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
| state=0, clock=cbcc8af3.4a93d5fa  Wed, May  7 2008 16:09:23.291

Then, when ntpd syncs to a server on our LAN, the status changes to:

| assID=0 status=0634 leap_none, sync_ntp, 3 events, event_peer/strat_chg,
| state=3, clock=cbcc8b23.1eb26ffe  Wed, May  7 2008 16:10:11.119

At this point the peer billboard will show the '*' talley code. And,
presumably, this is when ntpd starts training the clock.

A few minutes later the status changes to:

| assID=0 status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
| state=3, clock=cbcc8bd2.8d0edc7f  Wed, May  7 2008 16:13:06.551

Twelve minutes later the next status change is:

| assID=0 status=0654 leap_none, sync_ntp, 5 events, event_peer/strat_chg,
| state=4, clock=cbcc8ea6.606b6fff  Wed, May  7 2008 16:25:10.376

Presumably at this point ntpd has completed training the clock. However
the drift.file has not been written yet.

So...

Can the event bit be used to indicate that ntpd has arrived at this
state/condition/something?

Is there something else I should be looking for?

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project http://support.ntp.org/
Public Key at http://support.ntp.org/Users/SteveKostecke


More information about the hackers mailing list