[ntp:questions] Falseticker determination

Dave Hart hart at ntp.org
Wed Apr 4 19:39:59 UTC 2012


On Wed, Apr 4, 2012 at 16:37, A C <agcarver+ntp at acarver.net> wrote:
> Where in the code of 4.2.7p270 is the determination that a peer is a
> falseticker?  I'm looking through ntp_proto.c but I don't think I'm fully
> grasping how the determination is made and the peer marked.
>
> I want to put some debug lines in the area of the code where the falseticker
> is determined so I can figure out what conditions are causing the PPS to be
> marked as a false ticker.

hackers at lists.ntp.org would be the more natural forum for this
question.  Keep at hand this snippet of ntp_control.h:

#define	CTL_PST_SEL_REJECT	0	/*   reject */
#define	CTL_PST_SEL_SANE	1	/* x falsetick */
#define	CTL_PST_SEL_CORRECT	2	/* . excess */
#define	CTL_PST_SEL_SELCAND	3	/* - outlyer */
#define	CTL_PST_SEL_SYNCCAND	4	/* + candidate */
#define	CTL_PST_SEL_EXCESS	5	/* # backup */
#define	CTL_PST_SEL_SYSPEER	6	/* * sys.peer */
#define	CTL_PST_SEL_PPS		7	/* o pps.peer */

Line 2519 of ntp_proto.c (in clock_select):

		peer->new_status = CTL_PST_SEL_SANE;

All survivors to that point in the code get the x, fleetingly.  Those
that keep it fail to survive to line 2688:

		peers[i].peer->new_status = CTL_PST_SEL_SELCAND;

The logic in question is covered in the documentation, particularly:

http://www.eecis.udel.edu/~mills/ntp/html/cluster.html

Happy spelunking,
Dave Hart


More information about the questions mailing list