Generic doesn't log into clockstat

Gary E. Miller gem at rellim.com
Sun Feb 19 21:43:48 UTC 2017


Yo Achim!

On Sun, 19 Feb 2017 13:18:12 +0100
Achim Gratz <Stromeko at nexgo.de> wrote:

> It seems that the generic clock driver doesn't log into clockstats.
> The GPS NMEA driver on the other hand does.  If there's a flag or
> configuration option to enable that seperately, I've not found it.
> I'm not sure if that was ever working, however I think it should be
> fixed anyway.

Here is how refclock_nmes writes to logstats:
 
        /*
         * If extended logging is required, write the tally stats to the
         * clockstats file; otherwise just do a normal clock stats
         * record. Clear the tally stats anyway.
        */
        if (peer->ttl & NMEA_EXTLOG_MASK) {
                /* Log & reset counters with extended logging */
                const char *nmea = pp->a_lastcode;
                if (*nmea == '\0') nmea = "(none)";
                mprintf_clock_stats(
                  peer, "%s  %u %u %u %u %u %u",
                  nmea,
                  up->tally.total, up->tally.accepted,
                  up->tally.rejected, up->tally.malformed,
                  up->tally.filtered, up->tally.pps_used);
        } else {
                record_clock_stats(peer, pp->a_lastcode);
        }

The key funciton is mprintf_clock_stats(), which is nowhere to be
found in refclock_generic.c.  Looks like a flag bit would need to
be added, and a write to clockstats of what you find interesting.

Each refclock writes a different style clockstats.  So tell us what you
would like logged.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170219/8ede99bc/attachment.bin>


More information about the devel mailing list