Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar 1" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /usr/share/wordpress/wp-includes/functions.php on line 4139 Tech Notes » 2011 » March

Quick NTP Healthcheck

howto No Comments »

In looking for a quick Red-Amber-Green check for NTP, I’ve found that “ntpdc -c sysinfo” gives about as much as needed in a first-pass:

  • system peer: 0.0.0.0 ; (less than 15 min): AMBER: service starting
  • system peer: LOCAL(0) : RED: server is self-drifting
  • system peer: example.com ; stratum: [less than 10]: GREEN: peers reached, clock converging

RED

A Failed/Unreliable state for NTP would be when no peers are reached, and either NTP has no peer, or is using LOCAL(0) (127.127.10.0)

system peer: LOCAL(0)
system peer mode: client
stratum: 11
reference ID: [127.127.1.0]

An AMBER state that persists longer than 15 minutes should be considered a “cannot reach any peer” state, a RED state.

AMBER
When NTP has gone temporarily unusable, but should return to service, I would post an AMBER. Since there’s no state-tracking (unless monitoring with Nagios or Icinga) we cannot check whether “it was just OK, now it’s bad”, so all we can do is track the startup condition.

When starting, until (8 *64=512s) 8.5 min later, NTP will show:
system peer: 0.0.0.0
system peer mode: unspec
stratum: 16

Unfortunately, there’s no clear indication that 8 cycles of 64 seconds have gone past, meaning that no pears are reachable beyond this infancy/restart period.

Unfortunately, stratum==16 seems to persist past associating (at least on Win2008r2 Enterprise on a VM)

GREEN
Clearly, “green” status is when NTP has reached peers, is associated to one, and is gradually converging the clock:

system peer: time7.apple.com
system peer mode: client
stratum: 3
reference ID: [17.151.16.23]

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in