1748022 Members
4676 Online
108757 Solutions
New Discussion юеВ

Re: xntpd daemon

 
SOLVED
Go to solution
Tarek
Super Advisor

xntpd daemon

Hi all,
i wanna enable this daemon to start on boot. Using hpux11.00. I think i have to create a server and the others as clients, right?? How to do that??
Thanks...
25 REPLIES 25
Carsten Krege
Honored Contributor

Re: xntpd daemon

You can configure ntp in SAM.

Documentation on ntp and its various functionalities can be found on www.ntp.org.

Ciao: Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Animesh Chakraborty
Honored Contributor

Re: xntpd daemon

hi,
First of all, please made a change in your time server configuration file:

NTP Time server
===========
# cd /etc/
# /sbin/init.d/xntp stop
# vi ntp.conf
((modify the parameter accordingly & save it; broadcast adddress can be
obtained by running the command" ifconfig lan0, get the last entry which
shows something like: 192.23.24.255)):

server 127.127.1.1 minpoll 3 maxpoll 4 prefer
fudge 127.127.1.1 stratum 10
broadcast

# /sbin/init.d/xntp start

NTP Client
======
# cd /etc/rc.config.d
# /sbin/init.d/xntp stop
# vi netdaemons
((modify accordingly)):
export NTPDATE_SERVER=ctxpss
export XNTPD=1
# ntpdate (time Server)
# /sbin/init.d/xntp start

Wait for about 5-8 min, run the follwoing to check the status:
# ntpq -c rv
chk for output of "reftime" it shld not be zero if the servers are in sync.

Regards

Animesh

Did you take a backup?
James R. Ferguson
Acclaimed Contributor

Re: xntpd daemon

Hi Tarek:

A good guide to setting up Network Time Protocol (NTP) can be found in the "Installing and Administering Internet Services" manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

A good list of available time can be found here:

http://www.eecis.udel.edu/~mills/ntp/clock1.htm
If you wish to synchronize locally take a look at document #A5864817. You can use one of your servers as a "master" clock for the remaining ones without going outside of your local network.

...JRF...
Tarek
Super Advisor

Re: xntpd daemon

I don't have an ntp client and server..i have to configure them..i have a nis master server..is it that to configure also as ntp server?? I never made this before..so if you can be so kind to describe everything exactly that will be very helpful for me..
Andreas D. Skjervold
Honored Contributor

Re: xntpd daemon

Hi

here is from HP docs:

Document ID: 1100390400
Date Loaded: 20001201
Title: NTP: setting up a simple xntp environment

PROBLEM

What procedure is used to setup a simple xntp environment?

CONFIGURATION

Operating System - HP-UX
Version - 11.0
Subsystem - NTP (Network Time Protocol)

RESOLUTION

To setup a simple xntp environment:

Server Setup
1. Start SAM (System Administration Manager):
A. Go to Time.
B. Go to NTP Network TIME Sources.
C. Select Actions/Configure NTP Local Clock: set to local clock
Note: Check /etc/ntp.conf. If server is 127.127.1.10,
change it to 127.127.1.1)

2. A. Select List/NTP_Broadcasting.
B. Select Actions/Add Broadcast Client Network.
C. Select broadcast address (enter or click) to get a list
(prefer "subnet".255
for example, 192.19.12.255 if mask is 255.255.255.0)
D. Select OK (twice).

3. Select Actions/Start NTP

Client Setup

1. Start SAM (System Administration Manager):
A. Go to Time.
B. Go to NTP Network TIME Sources.
C. Select Actions/Add Remote Server or Peer
D. Enter hostname, or server IP address
(for example, 192.19.12.5)
E. Select OK.

2. A. Select List/NTP_Broadcasting
B. Select Actions/Enable Receiving Time Broadcasts.

3. Select Actions/Start NTP

Note: It may take 5 to 15 minutes before synchronization occurs.
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Pedro Sousa
Honored Contributor
Solution

Re: xntpd daemon

Hi Tarek!
This document is intended to function as a basic guideline to
get a single UX host to sync via xntpd with another single UX host.
On the system intended as the server:

NOTE: The system acting as the server must sync to itself or to
another server before clients can gain date information from it.

1. Verify which version of ntp your system is running with the what
command:

what /usr/sbin/xntpd

If this command fails to report the version information (patch
[PHNE_9056/PACHRDME/English] released v3.5f without what
information in the binary...
other versions may also be released this way in the future) do the
following:

a. Start the xntpd daemon:
#/usr/sbin/xntpd

b. Kill the xntpd daemon you just started.

c. grep xntpd /var/adm/syslog/syslog.log
Look for the version information such as:
Jun 4 12:38:42 tuco xntpd[882]: xntpd version=3.5f...

2. Based on the version output from step 1, add the following
line to the /etc/ntp.conf file.
For version 3.4 and older:
server 127.127.1.10

For version 3.5 and later:
server 127.127.1.1

3. Start xntpd.
a. Edit /etc/rc.config.d/netdaemons and set the following line as
shown:
XNTPD=1

b. /sbin/init.d/xntpd start

4. Give the system about 5 minutes to sync and check the status with the
command:

#ntpq -c rv

Look for the value of the field 'reftime='. If the field is all
zeros the system has not yet synced to a server. Once a hex
value replaces the zeros, the system is ready to provide time
information to clients.

On the system intended as the client:

1. Edit the /etc/ntp.conf file and add the following line:

> server

2. Run ntpdate to perform initial clock syncronization (note,
xntpd must NOT be running on the client when this command
is entered).

ntpdate

3. Start xntpd.

a. Edit /etc/rc.config.d/netdaemons and set the following
line as shown:

XNTPD=1

b. /sbin/init.d/xntpd start

4. Verify the client can see the server with the command:

ntpq -p

Note: NTP is slow... and so there may be a delay of a couple of
minutes before this command reports any useful information.

5. Give the system about 5 minutes to sync and check the status with
the command:

ntpq -c rv

Look for the value of the field 'reftime='. If the field is all
zeros the system has not yet synced to a server. Once a hex
value replaces the zeros, the system is ready to provide time
information to clients.

Note: It is recommended to leave xntpd running on the client to gain
the most exact syncronization however, some environments prefer
to avoid the network traffic due to performance reasons. At a
minimum, the ntpdate command should be run every 12 hours on the
client via a cron job to ensure time syncronization.

hope this helps.
Tarek
Super Advisor

Re: xntpd daemon

Thanks all for your reply. I wanna start configure using your help and also the manual (Installing and administring internet services)
you told me to look.
I need to know the following things before starting:
- maybe i have a ntp server configured, how can i know which is without creating a new one?
- if it exists, can i create a new one only for 7-8 ws?
- to enable one ws as ntp server, can i use the ws i prefer or i have to follow some criterium??
The version i'm using of xntpd is 3.5f version.
James R. Ferguson
Acclaimed Contributor

Re: xntpd daemon

Hi Tarek:

An invaluable tool is setting up and debugging NTP is 'ntpq'. Take a look at the man pages (1M) for 'ntpq' and at the "Installing and Administering Internet Services" reference I provided above for more information.

# ntpq -p

...will show you what server is acting at the time source and whether or not you are synchronized to it.

Another thing to rememeber with NTP is that that synchronization will take a few minutes, and will fail if the time difference between hosts is more than about 1000 seconds.

...JRF...
Sachin Patel
Honored Contributor

Re: xntpd daemon

Hi Tarek,
Once you will set this up you need this.
I have attached the script that I uses to setup client. I wrote that when I start this sys admin job. It is not best script but it will be easy later on to setup new system in this ntp chain.

Sachin
Is photography a hobby or another way to spend $