[ntp:questions] Finding out where ntpd gets its ntp.conf file

Steve Kostecke kostecke at ntp.org
Thu Sep 4 14:24:17 UTC 2008


On 2008-09-03, Joseph Gwinn <joegwinn at comcast.net> wrote:

> Read the "service" shell script.  It appears to get its file paths from 
> environment variables named after the thing being started and stopped 
> and accessible only in the root environment; this bit of RHEL-specific 
> structure is being chased down.  (Does anyone know where this is 
> documented?)

On Linux OSes init scripts are typically found in /etc/init.d/ or
/etc/rc.d/init.d/ Look for one named ntp (or something containing ntp).

> 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.  

Why not use the file location features built in to your OS to find all
possible instances of ntp.conf?

$ locate ntp.conf

or 

$ find / -name ntp.conf

Pipe the output of either of those commands to 'xargs ls -l' to see the
datestamps of the files.

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project - http://support.ntp.org/




More information about the questions mailing list