[ntp:questions] Finding out where ntpd gets its ntp.conf file (Joseph Gwinn)

Joseph Gwinn joegwinn at comcast.net
Fri Sep 5 16:53:58 UTC 2008


In article 
<E8FCF6A615F8334CBD7F2F792C2DF128DE4B4D at sjmail2.symmetricom.com>,
 bbeatie at symmetricom.com (Breck Beatie) wrote:

> This isn't quite what you're asking for and it's certainly not ntp
> specific, but one technique that I have used in the past is to replace
> the binary I'm trying to "debug" with a script which dumps useful
> information and then forwards the exec to the real binary.

This should work, but is a bit of work.  I'll keep it in reserve.

 
> I usually have it dump its environment and the full set of command line
> arguments someplace safe and then exec the original binary.  You could
> certainly have it run the original binary with strace.

I'm going to grind through the strace output next week.

 
> I have friends who'll run the binary with gdbserver and then they
> connect with gdb have their way with the binary.  I've never done that
> so I have no idea how you'd invoke gdbserver.

I don't know if we even have gdbserver.

Joe Gwinn


> Joe Gwinn writes:
> > Which brings me to a question:  How does one get NTP to tell you
> exactly 
> > where it is getting such things as the ntp.conf file from, all without
> 
> > being able to find or see the actual command line or lines that
> launched 
> > the daemon?  I did not see a ntpq command that sounded plausible, 
> > although ntpq would be an obvious choice.
> >
> > This would be very useful for debugging, as each and every platform
> type 
> > seems to have a different approach to handling NTP.




More information about the questions mailing list