Re: Finding out where ntpd gets its ntp.conf file
David Woolley <david@ex.djwhome.demon.co.uk.invalid> writes:
[color=blue]
>James Cloos wrote:[/color]
[color=blue][color=green]
>> 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[/color][/color]
[color=blue]
>Did you mean service (8).[/color]
[color=blue]
>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.[/color]
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.
[color=blue]
>I think the OP has gone far beyond what the average RHEL administrator
>is expected to do in terms of looking inside the box.[/color]
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.
Re: Finding out where ntpd gets its ntp.conf file
In article <hmzxk.1841$yS5.1658@edtnps83>,
Unruh <unruh-spam@physics.ubc.ca> wrote:
[color=blue]
> David Woolley <david@ex.djwhome.demon.co.uk.invalid> writes:
>[color=green]
> >James Cloos wrote:[/color]
>[color=green][color=darkred]
> >> 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[/color][/color]
>[color=green]
> >Did you mean service (8).[/color]
>[color=green]
> >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.[/color][/color]
Agree.
[color=blue]
> 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.[/color]
I found the script, and started reading it, and will return to it.
[color=blue]
> 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.[/color]
All good ideas. Direct, and free of excess assumptions that things are
as things should be.
[color=blue]
> It is just a damn shell script. It is not a black box.[/color]
I've been reading it, and it does seem simple, but haven't really
studied it yet.
[color=blue][color=green]
> >I think the OP has gone far beyond what the average RHEL administrator
> >is expected to do in terms of looking inside the box.[/color][/color]
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.
[color=blue]
> 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.[/color]
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.
[color=blue]
> We have not had a report back from him as to what the
> results were of all the suggestions we made.[/color]
Because there is nothing to report yet, due to the press of other
business.
Joe Gwinn
Re: Finding out where ntpd gets its ntp.conf file
[color=blue]
>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.[/color]
service is mostly a shortcut to save typing. If you think it is getting
in your way, run /etc/init.d/ntpd <whatever> 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.
Re: Finding out where ntpd gets its ntp.conf file
In article <a6WdnXY1gfe4FVXVnZ2dnUVZ_gudnZ2d@megapath.net>,
[email]hal-usenet@ip-64-139-1-69.sjc.megapath.net[/email] (Hal Murray) wrote:
[color=blue][color=green]
> >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.[/color]
>
> service is mostly a shortcut to save typing. If you think it is getting
> in your way, run /etc/init.d/ntpd <whatever> by hand. (It also
> fixes up environment and cd-ed directory and whatever.)[/color]
Yes. This is what we did to prove that NTP really could generate
loopstats and peerstats.
[color=blue]
> 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.[/color]
Another good idea to try.
Thanks,
Joe
Re: Finding out where ntpd gets its ntp.conf file
Joseph Gwinn <joegwinn@comcast.net> writes:
[color=blue]
>In article <a6WdnXY1gfe4FVXVnZ2dnUVZ_gudnZ2d@megapath.net>,
> [email]hal-usenet@ip-64-139-1-69.sjc.megapath.net[/email] (Hal Murray) wrote:[/color]
[color=blue][color=green][color=darkred]
>> >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.[/color]
>>
>> service is mostly a shortcut to save typing. If you think it is getting
>> in your way, run /etc/init.d/ntpd <whatever> by hand. (It also
>> fixes up environment and cd-ed directory and whatever.)[/color][/color]
[color=blue]
>Yes. This is what we did to prove that NTP really could generate
>loopstats and peerstats.[/color]
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.
[color=blue][color=green]
>> 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.[/color][/color]
[color=blue]
>Another good idea to try.[/color]
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.
[color=blue]
>Thanks,[/color]
[color=blue]
>Joe[/color]
Re: Finding out where ntpd gets its ntp.conf file
In article <cudyk.1771$1x6.1012@edtnps82>,
Bill Unruh <unruh@physics.ubc.ca> wrote:
[color=blue]
> Joseph Gwinn <joegwinn@comcast.net> writes:
>[color=green]
> >In article <a6WdnXY1gfe4FVXVnZ2dnUVZ_gudnZ2d@megapath.net>,
> > [email]hal-usenet@ip-64-139-1-69.sjc.megapath.net[/email] (Hal Murray) wrote:[/color]
>[color=green][color=darkred]
> >> >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 <whatever> by hand. (It also
> >> fixes up environment and cd-ed directory and whatever.)[/color][/color]
>[color=green]
> >Yes. This is what we did to prove that NTP really could generate
> >loopstats and peerstats.[/color]
>
> 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.[/color]
If I recall, the line that worked was "/etc/init.d/ntpd -c <filename of
our ntp.conf file>". I don't recall that sbin was involved.
[color=blue][color=green][color=darkred]
> >> 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.[/color][/color]
>[color=green]
> >Another good idea to try.[/color]
>
> It of course produces far more output but obviates the need to insert echo
> lines into /etc/init.d/ntpd[/color]
Yep. But if it solves the problem, I won't mind the blather.
[color=blue]
> 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?[/color]
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.
[color=blue]
> 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.[/color]
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
Re: Finding out where ntpd gets its ntp.conf file
[color=blue][color=green]
>> 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.[/color]
>
>If I recall, the line that worked was "/etc/init.d/ntpd -c <filename of
>our ntp.conf file>". I don't recall that sbin was involved.[/color]
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.
Re: Finding out where ntpd gets its ntp.conf file
In article <zuydnRiVNI_EKFfVnZ2dnUVZ_u-dnZ2d@megapath.net>,
[email]hal-usenet@ip-64-139-1-69.sjc.megapath.net[/email] (Hal Murray) wrote:
[color=blue][color=green][color=darkred]
> >> 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.[/color]
> >
> >If I recall, the line that worked was "/etc/init.d/ntpd -c <filename of
> >our ntp.conf file>". I don't recall that sbin was involved.[/color]
>
> 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...[/color]
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
Re: Finding out where ntpd gets its ntp.conf file
[color=blue]
>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.[/color]
[color=blue]
>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.[/color]
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.
Re: Finding out where ntpd gets its ntp.conf file
Hal Murray wrote:[color=blue][color=green]
>>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.[/color]
>
>[color=green]
>>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[/color]
>[color=green]
>>from this fate.[/color]
>
> 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.
>[/color]
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
[url]http://www.eecis.udel.edu/~ntp/[/url]
Re: Finding out where ntpd gets its ntp.conf file
In article <t0bsp5-1ph.ln1@klein-habertwedt.de>,
Uwe Klein <uwe_klein_habertwedt@t-online.de> wrote:
[color=blue]
> Hal Murray wrote:[color=green][color=darkred]
> >>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.[/color]
> >
> >[color=darkred]
> >>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.[/color]
> >
> > 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.
> >[/color]
> Does Red Hat write distribution specific manpages? I would be surprised if.[/color]
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
[color=blue]
>
> 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
> [url]http://www.eecis.udel.edu/~ntp/[/url][/color]
Re: Finding out where ntpd gets its ntp.conf file
[email]hal-usenet@ip-64-139-1-69.sjc.megapath.net[/email] (Hal Murray) writes:
[color=blue][color=green]
>>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.[/color][/color]
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.
[color=blue][color=green]
>>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.[/color][/color]
[color=blue]
>I still don't know which ntp.conf you are really using.[/color]
[color=blue]
>I'm looking at a Fedora 6 box.[/color]
[color=blue]
>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.[/color]
[color=blue]
>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.[/color]
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.