[ntp:questions] Finding out where ntpd gets its ntp.conf file
martin.burnicki at meinberg.de
Fri Sep 5 07:52:36 UTC 2008
Richard B. Gilbert wrote:
> ISTR that ntpd looks in /etc/inet if it is not told to look elsewhere by
> the command that starts ntpd. This should take care of Unix and
> Unix-like systems. Windoze?? Ask someone who knows.
AFAIK this is the default location under Solaris, but e.g. under Linux the
location is just /etc.
Anyway, this is configured at compile time and maybe overridden by a command
line parameter, in which case it does not help to know the default.
On some systems the command line parameters are displayed in the process
list, so you can:
1.) Look at the process list to see if a configuration file has been
2.) If it has not, grep through the ntp binary to find the path of the
default config file
3.) see if that file exists
Please note that especially under Windows things may look different. The NTP
service first tries to open %windir%\ntp.conf, and, if that file does not
The GUI installers provided by Meinberg override these settings with an etc\
directory below the program installation path, by default \program
files\ntp\etc. The configured setting can be retrieved from the ImagePath
registry key of the NTP service registry entry.
If you are upgrading an installation of NTP under Windows then there may
still be old config files under the older paths, so you have to look
explicitely which of the file has being read by the running NTP service.
If ntpd would write a log message at startup then you could easily find out
on every platform which config file has been read.
More information about the questions