Operating System - HP-UX
1834276 Members
2811 Online
110066 Solutions
New Discussion

requesting ntp information

 
SOLVED
Go to solution
William Pribble
Frequent Advisor

requesting ntp information

I want my servers (HP-UX) to request ntp information from our central ntp server twice a day, what is the best way to do this?

Thanks
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: requesting ntp information

Elaine,

Set up a cron job that uses ntpdate thusly:

remsh SERVER /usr/sbin/ntpdate -b CENTRALSERVER

Pete

Pete
John Bolene
Honored Contributor

Re: requesting ntp information

seems like just

/usr/sbin/ntpdate -b CENTRALSERVER

would work fine stuck in a cron shell script
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Pete Randall
Outstanding Contributor

Re: requesting ntp information

Sorry Elaine,

That should have read:

Set up a cron job on the central server that uses ntpdate thusly:


Pete

Pete
John Dvorchak
Honored Contributor
Solution

Re: requesting ntp information

Is there a reason you don't want to just run the xntpd daemon? With very little effort you can use the daemon to contstantly sync time, adjust it's clock drift automatically and virtually insure that all three systems have exactly the same time within milliseconds of each other.
If it has wheels or a skirt, you can't afford it.
A. Clay Stephenson
Acclaimed Contributor

Re: requesting ntp information

The best way to do this is not at all but instead let the xntpd daemon do its thing. The overhead is very small and will automatically adjust its polling interval depending upon the accuracy of the client system clocks.

Just configure your servers to look to this host for NTP and forget it.

You absolutely do not want a scheme that uses ntpdate to step adjust the time.
If it ain't broke, I can fix that.
William Pribble
Frequent Advisor

Re: requesting ntp information

i have the following entry in my /etc/ntp.conf file

server 10.x.x.x

where 10.x.x.x is the ip address of my ntp server.

I stopped and started the /sbin/init.d/xntpd.

I checked using lsof the ntpd is running on port 123.

How often will my HP-UX server sync with the ntp server?

Thanks again for all the help so far.
Robert-Jan Goossens
Honored Contributor

Re: requesting ntp information

Hi Elaine,

You can use ntpq -p to check how often the client request information.

#ntpq -p
remote refid st t when poll reach delay offset jitter
=========================================================================
*GPS_PALISADE(0) .GPS. 0 l 5 16 377 0.000 0.018 0.009

the numbers from
when indicates that the GPS was polled 5 seconds ago

poll indicates with the polling interval set to 16 seconds

Kind regards,

Robert-Jan.