Quote:>Questions 1
>When reading the man page about xntpd, it mentions about /etc/ntp.conf.
>However, I can't find this conf file. Am I suppose to create this file
>manually?
Yes.
Quote:>Question 2
>I am just trying to setup my server as a ntp client. I am thinking that
>the only statment I need to put in conf file is...
> server a.a.a.a
>Am I correct? Any suggestions about public NTP server I could use in
>North California?
Correct again. If you have a dial-up connection to the Internet, you might
want to also include the 'fudge' command so xntpd doesn't complain when your
Internet connection isn't up.
As far as a good public NTP server, I've had good luck with time.nist.gov
from here in Reno.
Here's what my ntp.conf looks like:
server time.nist.gov prefer
server tick.usno.navy.mil
server tock.usno.navy.mil
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /etc/ntp.drift
Quote:>Question 3
>Also, would xntpd daemon by default would send log messages to
>/var/log/messages? I want to view the log messages to ensure it is
>working correctly. Do I need to specify any option or parameters to
>enable this logging function? Is "/var/log/messages" the default log
>file xntpd would use?
Wow, you're 3 for 3! Yup, messages go to /var/log/messages, and look like
this:
Jan 3 07:23:00 renata xntpd[127]: xntpd version=3.4e (beta multicast); Mon
Dec 27 17:20:04 PST 1999 (1)
Jan 3 07:23:00 renata xntpd[127]: tickadj = 5, tick = 10000, tvu_maxslew =
495
Jan 3 07:23:00 renata xntpd[127]: using xntpd phase-lock loop
Jan 3 07:43:15 renata xntpd[127]: time reset (step) -0.261166 s
Jan 3 08:41:20 renata xntpd[127]: time reset (step) 0.185935 s
Quote:>Question 4
>If I want xntpd running automatically, what shall I do?
Add these lines to your /etc/rc.conf file:
### Network Time Services options: ###
xntpd_enable="YES" # Run the Network Time Protocol daemon
xntpd_program="xntpd" # path to xntpd, if you want a different one.
xntpd_flags="-p /var/run/xntpd.pid" # Flags to xntpd (if enabled).
There are some caveats to xntpd:
First, it doesn't handle big time differences too well. If it complains and
tells you to set the time manually, use ntpdate to set your clock, then
start xntpd manually.
Second, if you have dialup Internet access, and you're not online a lot,
xntpd will give up. That's where the 'fudge' command comes in: xntpd will
use your system's clock and will thus be happy.
If you use User-PPP to connect to the net, use the following filters in
/etc/ppp/ppp.conf to prevent xntpd from dialling out or keeping the
connection alive:
# Prevent NTP (123) from keeping the connection alive:
set filter alive 0 deny udp src eq 123
set filter alive 1 deny udp dst eq 123
set filter alive 2 permit 0 0
# Prevent NTP (123) from causing a dialup:
set filter dial 0 deny udp src eq 123
set filter dial 1 deny udp dst eq 123
set filter dial 2 permit 0 0
Lastly, if you have a dial-up Internet connection, and really don't care
about making your computer a time server for other computer (over your LAN),
you may find it easier to use ntpdate to set your clock. If you use User-PPP
to connect, you can put your ntpdate command into your ppp.linkup file and
update your clock every time you log on to the Internet.
Have fun,
--
--Dan O'Connor