ntpmon crashes on timeout

Eric S. Raymond esr at thyrsus.com
Thu Dec 15 02:29:04 UTC 2016


Eric S. Raymond <esr at thyrsus.com>:
> > I'm willing to hack the source code.
> 
> Urgh.  I could tell you how to start, but I think the back-end part
> is too messy for a Python newbie.  I need to change the ControlSession
> class class so its progress logging can be redirected.  I'll try to
> get to that tonight, then brief you on step 2.

All right, that's done.

The ControlSession class is how ntpmon and ntpq talk to ntpd. The different
possible transactions are just methods of that class calling a
sendrequest/getresponse pair.

That class now has a member named self.logfp. It defaults to sys.stdout,
and that does exactly what you think.

Your mission, should you choose to accept it: Tweak ntpmon so it can redirect
SessionControl's logging to a file or device.  Turn up debugging while you
watch tail -f of the logfile on another terminal.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list