Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to install network time protocol 3

Status
Not open for further replies.

syjl

Technical User
Jan 17, 2001
102
US
I am installing ntp under AIX 433. I ran configure and it seemed fine but when I try "make" it gives the following error. Can you help?

make
cd . && CONFIG_FILES= CONFIG_HEADERS=config.h /bin/sh ./config.status
config.status: creating config.h
config.status: config.h is unchanged
make all-recursive
Making all in scripts
Target "all" is up to date.
Making all in include
Target "all" is up to date.
Making all in ElectricFence
Target "all" is up to date.
Making all in librsaref
make all-am
Target "all-am" is up to date.
Making all in libntp
make: 1254-002 Cannot find a rule to create target : from dependencies.
Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.
Stop
 
I'm wondering why you are compiling ntp? AIX has xntpd in /usr/sbin.
 
How do I know if it is working?
 
When I try ntpdate it gives me the following.

utilityaixs70# ntpdate 207.126.103.204
11 Sep 15:26:31 ntpdate[60874]: no server suitable for synchronization found
 
the daemon for xntpd won't stay running. Is there an error log to check?
 
Is you xntpd daemon running? if not, start it with the following command: /usr/bin/startsrc -s xntp. You can add this to your /etc/inittab to have it start at boot.

Decide which system is going to be your time server. This can be a server within your own network, or a server at the Naval Observatory or a server at, for example, a univerity. You can get lists of public time servers that you can use. I think I did a search in google on ntp and got a large list to choose from.

Following are the steps I used to set up xntp on my AIX system. The AIX system (the "H80" in my example) is the client. It gets its time from my HP server, named mercury in my example.

Here's how I documented it:

The H80 is set up to receive broadcasts of the correct time from mercury. Mercury has been set up to obtain the correct time from <time server name fully qualified domain name>.

The xntpd daemon is automatically started at system boot by /etc/inittab (xntp:2:eek:nce:/usr/bin/startsrc –s xntp > /dev/console 2>&1). The daemon is stopped when the system boots by the following line in the /etc/rc.shutdown file: /usr/bin/stopsrc –s xntpd > /dev/console 2>&1. (NOTE: It is not really necessary to stop the daemon when you boot.)

Following are the contents of the H80 systems /etc/ntp.conf file, which specifies parameters for the xntpd daemon. The procedure for setting up NTP were devised from the ntp.conf file on mercury.

broadcastclient yes [specifies that the system waits to receive correct time broadcast by another server]
driftfile /etc/ntp.drift [specifies the name and location of the driftfile for the system]
server mercury.<name>.com [specifies which server is expected to broadcast the time]

Following are the contents of mercury’s /etc/ntp.conf file, which specifies the parameters for this broadcast server:

server timex.<hostname>.edu version 3 prefer
fudge 127.127.1.0 stratum 1
logfile /etc/ntp.log
driftfile /var/adm/ntp.drift
broadcast 224.0.1.1 version 3
broadcastclient no

Once the configuration file is set up on both the client and the server, test that ntp is running by using the following procedure:

1. At the command line, type ntpq.
2. At the ntpq> prompt, type peer.
You should receive information similar to the following:
mercury.e3.com renaissance.Ser 3 u 44 64 377 0.40 0.179 0.03.

You can look at aixqueen's referenced documents for complete definitions of some of the terms you may have a hard time with here.
 
Forgot to add, you could probably specify where you want your logfile to go in the ntp.conf file on the client. As you can see, I do have a log file set up on the server.
 
bi,

Thank you for the help, however, ntpdate still gives the same error. If you stopsrc -s xntp, can you run ntpdate??
 
never mind. firewall preventing port 123
 
You shouldn't be able to use ntpdate while xntpd is running as that process uses the socket ntpdate tries to use.

I suspect you are getting the error because the server you are trying to sync to is not set up as a master time server. ntp has layers called stratums (starta?). The server that is at 207.126.103.204 is probably not designated at the correct stratum and this is not a server that you can sync to. You need to use a server such as the one I designated in my broadcast server's ntp.conf file (at the line that says: server timex.<hostname>.edu version 3 prefer)

I got the name of the server through a list of servers that provide this service. My broadcast server goes out to that server and gets the correct time. The broadcast server then broadcasts to all the other servers in my environment the time it has.

xntp takes care of what ntp does. (In fact, HP discourages using ntpdate because it doesn't &quot;discipline&quot; the internal clock so that fewer time corrections are necessary.)

How accurate does your time have to be? I have never set the time on my systems after the original installation of the systems. Even setting up xntp a few days after the initial installation didn't require my resetting the clock. I let xntp sync the clocks up.

You can test the accuracy of xntp by going out to the U.S. Naval Observatory web page ( and clicking on the What time is it? link. This is the clock my master server (the one my broadcast server gets its time from) gets its time from.

The largest discrepancy I have on any of my systems to the U.S. Navy's clock is 10 seconds. That's close enough for me.

The only thing you really need to do occasionally is to make sure your client is still getting the time from your broadcast server and that your broadcast server is getting its time from the master.

Does this help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top