Finding out where ntpd gets its ntp.conf file - NTP

This is a discussion on Finding out where ntpd gets its ntp.conf file - NTP ; David Woolley writes: >James Cloos wrote: >> I read through most of the replies so far, but one thing I haven't seen >> noted is that this isn't an ntp issue at al >Did you mean service (8). >Treating it ...

+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4
Results 61 to 72 of 72

Thread: Finding out where ntpd gets its ntp.conf file

  1. Re: Finding out where ntpd gets its ntp.conf file

    David Woolley writes:

    >James Cloos wrote:


    >> I read through most of the replies so far, but one thing I haven't seen
    >> noted is that this isn't an ntp issue at al


    >Did you mean service (8).


    >Treating it as a black box is basically how Red Hat is marketed; it is
    >basically in the same market as Windows. People who want a white box
    >Linux are more likely to choose something like Slackware.


    service is a dead simple program. It runs its argument from the /etc/init.d
    directory.

    Anyway, long ago we suggested that he looked in /etc/init.d/ntpd to see if
    there was anything in there that suggested which config file was being
    used.
    Or insert an
    echo "...."
    where ... is the exact line that that script runs to start ntpd to see if
    there are any interesting arguments to ntpd.
    Or put in an "env" in there to see exactly what the environment is that
    ntpd sees.

    It is just a damn shell script. It is not a black box.



    >I think the OP has gone far beyond what the average RHEL administrator
    >is expected to do in terms of looking inside the box.


    I find it extremely unlikely that RHEL uses anything but /etc/ntpd.conf but
    if it does then it is up to Redhat to document it. I suspect either user
    error or some admin in th epast of this organization has changed things and
    never documented it. We have not had a report back from him as to what the
    results were of all the suggestions we made.



  2. Re: Finding out where ntpd gets its ntp.conf file

    In article ,
    Unruh wrote:

    > David Woolley writes:
    >
    > >James Cloos wrote:

    >
    > >> I read through most of the replies so far, but one thing I haven't seen
    > >> noted is that this isn't an ntp issue at al

    >
    > >Did you mean service (8).

    >
    > >Treating it as a black box is basically how Red Hat is marketed; it is
    > >basically in the same market as Windows. People who want a white box
    > >Linux are more likely to choose something like Slackware.


    Agree.


    > service is a dead simple program. It runs its argument from the /etc/init.d
    > directory.
    >
    > Anyway, long ago we suggested that he looked in /etc/init.d/ntpd to see if
    > there was anything in there that suggested which config file was being
    > used.


    I found the script, and started reading it, and will return to it.


    > Or insert an echo "...."
    > where ... is the exact line that that script runs to start ntpd to see if
    > there are any interesting arguments to ntpd.
    >
    > Or put in an "env" in there to see exactly what the environment is that
    > ntpd sees.


    All good ideas. Direct, and free of excess assumptions that things are
    as things should be.


    > It is just a damn shell script. It is not a black box.


    I've been reading it, and it does seem simple, but haven't really
    studied it yet.


    > >I think the OP has gone far beyond what the average RHEL administrator
    > >is expected to do in terms of looking inside the box.


    That's for sure, and is why I'm doing the debugging, even though I'm not
    a sysadmin. The sysadmins really don't understand NTP.


    > I find it extremely unlikely that RHEL uses anything but /etc/ntpd.conf but
    > if it does then it is up to Redhat to document it. I suspect either user
    > error or some admin in the past of this organization has changed things and
    > never documented it.


    Judging by the cruft accumulation in the trojan ntp.conf file, this is
    not a virgin install, so I'd bet on confused sysadmins. They may have
    been trying to get it to work, not realizing that this ntp.conf file is
    only a placebo.


    > We have not had a report back from him as to what the
    > results were of all the suggestions we made.


    Because there is nothing to report yet, due to the press of other
    business.

    Joe Gwinn

  3. Re: Finding out where ntpd gets its ntp.conf file


    >I'm not a sysadmin, but am digging into service. I don't recall that
    >the service man page was that helpful, but will look again.


    service is mostly a shortcut to save typing. If you think it is getting
    in your way, run /etc/init.d/ntpd by hand. (It also
    fixes up environment and cd-ed directory and whatever.)

    The -x command to bash will print each line as it gets expanded
    and executed. So you might try something like:
    bash -x /etc/init.d/ntpd start
    to see what is really going on.

    --
    These are my opinions, not necessarily my employer's. I hate spam.


  4. Re: Finding out where ntpd gets its ntp.conf file

    In article ,
    hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) wrote:

    > >I'm not a sysadmin, but am digging into service. I don't recall that
    > >the service man page was that helpful, but will look again.

    >
    > service is mostly a shortcut to save typing. If you think it is getting
    > in your way, run /etc/init.d/ntpd by hand. (It also
    > fixes up environment and cd-ed directory and whatever.)


    Yes. This is what we did to prove that NTP really could generate
    loopstats and peerstats.


    > The -x command to bash will print each line as it gets expanded
    > and executed. So you might try something like:
    > bash -x /etc/init.d/ntpd start
    > to see what is really going on.


    Another good idea to try.

    Thanks,

    Joe

  5. Re: Finding out where ntpd gets its ntp.conf file

    Joseph Gwinn writes:

    >In article ,
    > hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) wrote:


    >> >I'm not a sysadmin, but am digging into service. I don't recall that
    >> >the service man page was that helpful, but will look again.

    >>
    >> service is mostly a shortcut to save typing. If you think it is getting
    >> in your way, run /etc/init.d/ntpd by hand. (It also
    >> fixes up environment and cd-ed directory and whatever.)


    >Yes. This is what we did to prove that NTP really could generate
    >loopstats and peerstats.


    No I suspect you ran /usr/sbin/ntpd, not /etc/init.d/ntpd
    /etc/init.d/ntpd start should do EXACTLY the same thing as when the system
    runs it on bootup.



    >> The -x command to bash will print each line as it gets expanded
    >> and executed. So you might try something like:
    >> bash -x /etc/init.d/ntpd start
    >> to see what is really going on.


    >Another good idea to try.


    It of course produces far more output but obviates the need to insert echo
    lines into /etc/init.d/ntpd

    Note, I am wondering what has happened to all these suggestions? Have
    youtried any of them yet? Have you discovered what it is actually using as
    its configuration file?

    You might want to post the config file here ( ntp.conf) here in case it is
    some error in that file which is causing your problems rather than that
    ntpd is using some other config file.



    >Thanks,


    >Joe


  6. Re: Finding out where ntpd gets its ntp.conf file

    In article ,
    Bill Unruh wrote:

    > Joseph Gwinn writes:
    >
    > >In article ,
    > > hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) wrote:

    >
    > >> >I'm not a sysadmin, but am digging into service. I don't recall that
    > >> >the service man page was that helpful, but will look again.
    > >>
    > >> service is mostly a shortcut to save typing. If you think it is getting
    > >> in your way, run /etc/init.d/ntpd by hand. (It also
    > >> fixes up environment and cd-ed directory and whatever.)

    >
    > >Yes. This is what we did to prove that NTP really could generate
    > >loopstats and peerstats.

    >
    > No I suspect you ran /usr/sbin/ntpd, not /etc/init.d/ntpd
    > /etc/init.d/ntpd start should do EXACTLY the same thing as when the system
    > runs it on bootup.


    If I recall, the line that worked was "/etc/init.d/ntpd -c our ntp.conf file>". I don't recall that sbin was involved.


    > >> The -x command to bash will print each line as it gets expanded
    > >> and executed. So you might try something like:
    > >> bash -x /etc/init.d/ntpd start
    > >> to see what is really going on.

    >
    > >Another good idea to try.

    >
    > It of course produces far more output but obviates the need to insert echo
    > lines into /etc/init.d/ntpd


    Yep. But if it solves the problem, I won't mind the blather.


    > Note, I am wondering what has happened to all these suggestions? Have
    > you tried any of them yet? Have you discovered what it is actually using as
    > its configuration file?


    I have been collecting all the suggestions I have heard here, and will
    try them when the relevant sysadmin is able to spare the time. This may
    be today (Friday). Unless he is somehow deflected.


    > You might want to post the config file here (ntp.conf) here in case it is
    > some error in that file which is causing your problems rather than that
    > ntpd is using some other config file.


    We are happily collecting loopstats and peerstats data on RHEL using
    that ntp.conf file, once we started the daemon manually with an explicit
    filepath argument (as described above), so the ntp.conf file itself does
    not appear to be the problem. I was suspicious of that file too, and so
    had cleaned it down to something like three lines, basically following
    the minimum ntp.conf example given in the online NTP documentation.


    By the way, I doubt that it matters here, but this RHEL is running NTPv4.


    Joe Gwinn

  7. Re: Finding out where ntpd gets its ntp.conf file


    >> No I suspect you ran /usr/sbin/ntpd, not /etc/init.d/ntpd
    >> /etc/init.d/ntpd start should do EXACTLY the same thing as when the system
    >> runs it on bootup.

    >
    >If I recall, the line that worked was "/etc/init.d/ntpd -c >our ntp.conf file>". I don't recall that sbin was involved.


    Running the init script with arguments that you want passed to ntpd
    is not likely to work. It checks it's first argument for things
    like start, stop, restart...

    --
    These are my opinions, not necessarily my employer's. I hate spam.


  8. Re: Finding out where ntpd gets its ntp.conf file

    In article ,
    hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) wrote:

    > >> No I suspect you ran /usr/sbin/ntpd, not /etc/init.d/ntpd
    > >> /etc/init.d/ntpd start should do EXACTLY the same thing as when the system
    > >> runs it on bootup.

    > >
    > >If I recall, the line that worked was "/etc/init.d/ntpd -c > >our ntp.conf file>". I don't recall that sbin was involved.

    >
    > Running the init script with arguments that you want passed to ntpd
    > is not likely to work. It checks it's first argument for things
    > like start, stop, restart...


    Right. Bad memory. Wrong directory path. It was the path to the
    executable that worked, not the script.


    I did get a look at the ntpd script today. Turns out the answer on
    where it gets the ntp.conf file is right there, near the top, in the
    line "ntpconf=/etc/ntp.conf", even though the ntp man page points us
    deeper in the /etc hierarchy.

    The sysadmin I was working with was real annoyed, as the misinformation
    in the man page had sent him into circles. We will add pointer comments
    to all placebo ntp.conf files, to save future generations of sysadmins
    from this fate.

    How does one go about filing a bug report against the ntp man file in
    RHEL?

    Joe Gwinn

  9. Re: Finding out where ntpd gets its ntp.conf file


    >I did get a look at the ntpd script today. Turns out the answer on
    >where it gets the ntp.conf file is right there, near the top, in the
    >line "ntpconf=/etc/ntp.conf", even though the ntp man page points us
    >deeper in the /etc hierarchy.


    >The sysadmin I was working with was real annoyed, as the misinformation
    >in the man page had sent him into circles. We will add pointer comments
    >to all placebo ntp.conf files, to save future generations of sysadmins
    >from this fate.


    I still don't know which ntp.conf you are really using.

    I'm looking at a Fedora 6 box.

    If you look in /etc/init.d/ntpd, you will see that it mucks about
    with ntpconf (the one above) to find the servers. Those servers
    get passed to ntpdate. Mumble. That's old crap. There is now
    a command line switch that does the right thing. I don't see
    where ntpconf gets passed to ntpd as a command line argument.

    If the man page says ntpd uses some other config file, it
    is probably right, or at it seems to me that it would be
    more likely that the guy who changed the code also changed
    the man page but didn't fixup the init script.

    --
    These are my opinions, not necessarily my employer's. I hate spam.


  10. Re: Finding out where ntpd gets its ntp.conf file

    Hal Murray wrote:
    >>I did get a look at the ntpd script today. Turns out the answer on
    >>where it gets the ntp.conf file is right there, near the top, in the
    >>line "ntpconf=/etc/ntp.conf", even though the ntp man page points us
    >>deeper in the /etc hierarchy.

    >
    >
    >>The sysadmin I was working with was real annoyed, as the misinformation
    >>in the man page had sent him into circles. We will add pointer comments
    >>to all placebo ntp.conf files, to save future generations of sysadmins

    >
    >>from this fate.

    >
    > I still don't know which ntp.conf you are really using.
    >
    > I'm looking at a Fedora 6 box.
    >
    > If you look in /etc/init.d/ntpd, you will see that it mucks about
    > with ntpconf (the one above) to find the servers. Those servers
    > get passed to ntpdate. Mumble. That's old crap. There is now
    > a command line switch that does the right thing. I don't see
    > where ntpconf gets passed to ntpd as a command line argument.
    >
    > If the man page says ntpd uses some other config file, it
    > is probably right, or at it seems to me that it would be
    > more likely that the guy who changed the code also changed
    > the man page but didn't fixup the init script.
    >

    Does Red Hat write distribution specific manpages? I would be surprised if.

    uwe

    This is the recent SuSE Linux Manpage that all ntp related keywords point to:
    NTP(1) NTP(1)



    NAME
    NTP - Network Time Protocol

    SEE ALSO
    The NTP distribution does not include man pages. To learn more about the NTP protocol
    and this software, please install the xntp-doc package included in you SuSE Linux dis-
    tribution.

    In /usr/share/doc/packages/xntp-doc you will find the complete set of documentation on
    building and configuring a NTP server or client. The documentation is in the form of
    HTML files suitable for browsing and contains links to additional documentation at var-
    ious web sites.

    Also included: What about NTP? Understanding and using the Network Time Protocol. A
    first try on a non-technical Mini-HOWTO and FAQ on NTP. Edited by Ulrich Windl and
    David Dalton.

    Further information on NTP in the Internet can be found in the NTP web page at
    http://www.eecis.udel.edu/~ntp/




  11. Re: Finding out where ntpd gets its ntp.conf file

    In article ,
    Uwe Klein wrote:

    > Hal Murray wrote:
    > >>I did get a look at the ntpd script today. Turns out the answer on
    > >>where it gets the ntp.conf file is right there, near the top, in the
    > >>line "ntpconf=/etc/ntp.conf", even though the ntp man page points us
    > >>deeper in the /etc hierarchy.

    > >
    > >
    > >>The sysadmin I was working with was real annoyed, as the misinformation
    > >>in the man page had sent him into circles. We will add pointer comments
    > >>to all placebo ntp.conf files, to save future generations of sysadmins
    > >>from this fate.

    > >
    > > I still don't know which ntp.conf you are really using.
    > >
    > > I'm looking at a Fedora 6 box.
    > >
    > > If you look in /etc/init.d/ntpd, you will see that it mucks about
    > > with ntpconf (the one above) to find the servers. Those servers
    > > get passed to ntpdate. Mumble. That's old crap. There is now
    > > a command line switch that does the right thing. I don't see
    > > where ntpconf gets passed to ntpd as a command line argument.
    > >
    > > If the man page says ntpd uses some other config file, it
    > > is probably right, or at it seems to me that it would be
    > > more likely that the guy who changed the code also changed
    > > the man page but didn't fixup the init script.
    > >

    > Does Red Hat write distribution specific manpages? I would be surprised if.


    Well, there was a full man page for ntp on RHEL, one that's far longer
    than your example below, and someone wrote it. Don't know who, but the
    RHEL box was bought from IBM, who are famous for their documentation, so
    I would venture that IBM augmented the man page over what Red Hat
    provides. And the E in RHEL is Enterprise, and enterprises want full
    documentation delivered with the product.

    Joe Gwinn


    >
    > uwe
    >
    > This is the recent SuSE Linux Manpage that all ntp related keywords point to:
    > NTP(1)
    > NTP(1)
    >
    >
    >
    > NAME
    > NTP - Network Time Protocol
    >
    > SEE ALSO
    > The NTP distribution does not include man pages. To learn more
    > about the NTP protocol
    > and this software, please install the xntp-doc package included in
    > you SuSE Linux dis-
    > tribution.
    >
    > In /usr/share/doc/packages/xntp-doc you will find the complete set
    > of documentation on
    > building and configuring a NTP server or client. The documentation is
    > in the form of
    > HTML files suitable for browsing and contains links to additional
    > documentation at var-
    > ious web sites.
    >
    > Also included: What about NTP? Understanding and using the Network
    > Time Protocol. A
    > first try on a non-technical Mini-HOWTO and FAQ on NTP. Edited
    > by Ulrich Windl and
    > David Dalton.
    >
    > Further information on NTP in the Internet can be found in the
    > NTP web page at
    > http://www.eecis.udel.edu/~ntp/


  12. Re: Finding out where ntpd gets its ntp.conf file

    hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) writes:


    >>I did get a look at the ntpd script today. Turns out the answer on
    >>where it gets the ntp.conf file is right there, near the top, in the
    >>line "ntpconf=/etc/ntp.conf", even though the ntp man page points us
    >>deeper in the /etc hierarchy.


    I really do not understand this. /etc/ntp.conf is the standard location. I
    thought that was the one you said was NOT being used.


    >>The sysadmin I was working with was real annoyed, as the misinformation
    >>in the man page had sent him into circles. We will add pointer comments
    >>to all placebo ntp.conf files, to save future generations of sysadmins
    >>from this fate.


    >I still don't know which ntp.conf you are really using.


    >I'm looking at a Fedora 6 box.


    >If you look in /etc/init.d/ntpd, you will see that it mucks about
    >with ntpconf (the one above) to find the servers. Those servers
    >get passed to ntpdate. Mumble. That's old crap. There is now
    >a command line switch that does the right thing. I don't see
    >where ntpconf gets passed to ntpd as a command line argument.


    >If the man page says ntpd uses some other config file, it
    >is probably right, or at it seems to me that it would be
    >more likely that the guy who changed the code also changed
    >the man page but didn't fixup the init script.


    They still have not done what was suggested, namely find out exactly what
    command is being run by the script-- with all its arguments.


    It seems they have a habit of jumping off half ****ed at any hint that
    comes their way.





+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4