Operating System - HP-UX
1819804 Members
3093 Online
109607 Solutions
New Discussion юеВ

NTP cleint configuration.

 
SOLVED
Go to solution
jeevarajkn
Frequent Advisor

NTP cleint configuration.

Dear Guru's

My datacente having 50 servers which including HPUNIX (11.23) and solaris (10).

In HPUNIX servers oracle database running and in solaris servers some application are running.

My network team has been configured one router as NTP server. Now I want to sync my all servers to this NTP server.

I can see the my all servers current time has some diffrents between NTP server times .ie, 2min,4min.5min and 10min.10min is the highest differnce.All my servers are running some minutes forward to NTP server time.

Now i want to know before syncing to NTP server whether I want to down the database or not.Is it possible to sync to NTP server while server is online.

Expecting some suggestions from all of you.


Thanks

Jeevaraj
10 REPLIES 10
Ganesan R
Honored Contributor

Re: NTP cleint configuration.

Hi Jeevaraj,

No need to bring down the database. That is why we are using NTP. NTP will slowly sync the time.

You need to modify /etc/ntp.conf file to configure HP boxes to act as NTP clients and sync with NTP server.

Client can be configured in two ways. Read below on how to configure NTP clients.

NTP CLIENT:
===========
A client is a system that gets its time information from a server. A client may direct a polling client where it has information about a timeserver in its configuration file and polls that server. Some servers may also broadcast time information on the network, and a client may be configured to listen to these broadcasts and synchronize its time accordingly. This type of client is called a broadcast
client. A client may also act as a server for some other clients.

Configuring an NTP Client:
===========================
NTP client configuration is also made in the /etc/ntp.conf file. An NTP client may be a polling client or a broadcast client. In the cases of a polling client, you provide the server name in the /etc/ntp.conf
file.

Configuring a Client to Use Server Polling:
===========================================
A polling client has information about its server and contacts it for time information over a network. A typical /etc/ntp.conf file for a client that is using gama as its timeserver is as shown next. server gama
driftfile /var/adm/ntp.drift Multiple timeservers may be used in the configuration file. The default polling time for the timeserver is once every 64 seconds. At every poll time, drift in the local time and the server time is recorded. If the drift is high, the next polling time is scheduled to occur earlier. If the drift is low, the next polling time is later.

Configuring a Client to Use Server Broadcast:
=============================================
A broadcast client does not contact any server for time information but listens for broadcast time information from a broadcast timeserver. The configuration for the broadcast NTP client is like the
following. broadcastclient yes driftfile /var/adm/ntp.drift

You can also use SAM to configure NTP
Best wishes,

Ganesh.
T G Manikandan
Honored Contributor

Re: NTP cleint configuration.

Oracle depends on the system time but there is no need to bring down Oracle when you are syncing with a NTP server.

I would suggest you to use the date command like.
date -a 600

this will gradually adjust your time forward by 10mins. This makes clock tick faster rather abruptly.

NTP doc

http://docs.hp.com/en/B2355-90685/ch07.html
Jozef_Novak
Respected Contributor

Re: NTP cleint configuration.

Hello,

you can *smoothly* adjust the time by using slew (-x option to the xntpd), which will slowly eliminate time difference between your client and the server. However HP does not recommend using slew because of instability (see xntpd man page). Since databases do not really expect time stepping backwards, you should stop oracle and make a step time change (for example using ntpdate).

Jozef
jeevarajkn
Frequent Advisor

Re: NTP cleint configuration.

Ganesh

Thanks for your sudden support.

I want to clarify one thing.what will the polling intervals in the sense if my cleint and server having hours of diffrent is it will sync automatically.

if my client and server is running in diffrent time zone is it will sync.

Expecting some clarification.
sujit kumar singh
Honored Contributor

Re: NTP cleint configuration.

hi


In case you need to take the Server back in time please take a look at the following thread

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1162733

regards
sujit
Ganesan R
Honored Contributor

Re: NTP cleint configuration.

Hi,

It will sync automatically but takes hours to sync. So if the time difference is huge it is better to change it manually very near to NTP server time after shutting down all db's/apps and enble NTP to sync with it hereafter.

NTP is meant to sync if the difference is less.

See man xntpd and /etc/ntp.conf for more details.

Best wishes,

Ganesh.
Bill Hassell
Honored Contributor
Solution

Re: NTP cleint configuration.

> I want to clarify one thing.what will the polling intervals in the sense if my cleint and server having hours of diffrent is it will sync automatically.

If the time difference is more than 10 minutes, NTP cannot slowly adjust the time. The reason is that it would take more than a day to make the adjustment. So you will have to bring all servers to within 10 minutes of the correct time. NTP polls once every 64 seconds and once the time difference is very smal (less than a second), the poll interval will be doubled to 128 seconds, then 256 and so on to 1024 seconds (17 minutes). NTP will maintain the time to within 128 milliseconds.

> if my client and server is running in diffrent time zone is it will sync

HP-UX does not use timezones. Instead (like many versions of Unix), the time is kept in UTC (also known as GMT or Zulu time). The command:

date -u

will show the current time kept by HP-UX. Timezone translation is provided by the date command and library routines by returning (or setting) the time according to rules in the file /usr/lib/tztab. See also the man page for environ.

Once the servers are in sync, virtually nothing more is to be done -- the servers will quietly keep in sync with the NTP server. Even if the NTP server is offline for a few hours, all the servers will still be accurate and will adjust again once the NTP is back online.


Bill Hassell, sysadmin
jeevarajkn
Frequent Advisor

Re: NTP cleint configuration.

Hi All

If the server time is running backward to ntp server is it possible to configure the ntp client directly.

Please clarify.....
Bill Hassell
Honored Contributor

Re: NTP cleint configuration.

> If the server time is running backward to ntp server is it possible to configure the ntp client directly.

You can configure the NTP client at any time. Hoever, you must ensure that the time is within 10 minutes either direction. If true, then xntpd will slowly adjust the time so that not a single second is missing from the clock. The seconds will tick slightly faster to bring the time up to current NTP time, or tick slower when slowing the clock down to match NTP time.

If the difference is more than 10 minutes, you must shutdown all your applications and databases, change the time with the date command, then start xntpd and the applications and databases. If you have configured /etc/rc.config.d/netdaemins correctly, you can simply use the start/stop scripts. The xntpd script will jump the time to the correct value when you run it:

/sbin/init.d/xntpd start

Don't run this command if you are running your applications or databases as changing the time can create problems with database records.


Bill Hassell, sysadmin
jeevarajkn
Frequent Advisor

Re: NTP cleint configuration.

Dear All

Thanks for your greate support.Iam closing this thread.