NTP configuration


in our company we have 5 sun solaris server that running database and ERP system, the problem is  that the timing for those server are out of sync. we have in our envoirment windows NTP server.
the question is how to configure solaris server to sync with ntp server and do i need to shutdown database system.
plesase reply with detail steps

Thank u
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

First of all, there is no real need to shut down the database system.
Only in cases, where your clock is skewed, you may want to do that to prevent inconsistency.

You need to create a ntp.conf file, usually in /etc. It should contain at least these 2 lines:

server <your Windows NTP server's IP>

driftfile /path/to/drift.file # usually this is /var/ntp/ntp.drift

Now, if your clocks are not too far off the NTP server, you can just run:

svcadm restart ntp

If they are off by too much (forgot the limit, but the log would tell you if they are), you need to manually adjust the clock to a closer time, before (re)starting NTP.

That should do it.
cp /etc/inet/ntp.client /etc/inet/ntp.conf

change `server 127.127.XType.0`
                    to `server externel time server`
                        (where externel time server is the IP or hostname of the
                         time server you wish to sync to)

svcadm enable svc:/network/ntp


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brian UtterbackPrinciple Software EngineerCommented:
If course, the svcadm command will only work if you are using Solaris 10 or OpenSolaris. Otherwise you will
need to cd this:

cd /etc/init.d
./xntpd stop
./xntpd start

You also need to decide whether you really want to keep the system in sync only with each other or in sync
with the real time. Then you need to decide how closely they need to stay in sync and whether or not you
can tolerate shutting them down. Before you answer consider that if you cannot shut them down, and you
only care about keeping them in sync with each other, what happens if in 6 months, they have drifted 30 minutes ahead or behind the real time? Are you okay with that or will you need to keep it to the real time after all.

What is the source of time on the windows server? What software are you using on the windows server
to provide the NTP protocol?
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

omar2010Author Commented:
the OS is solaris 10

in more /etc/inet/ntp.client there is only one line:
what the syntax to change it?
what is the purpsoe for /var/ntp/ntp.drift ?? do I need to configre it , or use default value

the time difference in sun server is varying from 10 minute up to 30 minute

NTP server is windows without any external clock

Brian UtterbackPrinciple Software EngineerCommented:
The drift file is used by NTP to remember how fast or slow the system's clock is. It can take a day or two
for NTP to make htis determination and by storing the value in the drift file it does not have to start
over each time the system reboots or NTP is restarted.

Just change the multicast line to this:

server hostnameofserver
server ipaddrofserver

Where the values of hostnameofserver and ipaddrofserver should be replaced with the values corresponding
to the server.

Once you do that, restart the xntpd service and you should be good to go.

The problem is, that if your windows server does not have an external clock source, it will eventually
drift away from the real wallclock time, pulling the clients with it. At some point you are going to want to
reset the clock to the real time. This will probably result in a time jump on the clients, which may have an
effect on the application. It could also cause a spike in the adjustment of the system clocks which will
(as I said before) take days to iron out.

That having been said, it is better to keep the server as close to the real wallclock time as possible. Don't
let it get very far off.
just enter

server  "hosname or IP"

But as i said you have to copy that file as ntp.conf and then enter the above line in ntp.conf
cp /etc/inet/ntp.client /etc/inet/ntp.conf
comment or replace the multicastclient
with server  "hosname or IP"

then restart the services,

svcadm disable svc:/network/ntp
svcadm enable svc:/network/ntp
cd /etc/init.d
./xntpd stop
./xntpd start

Also, there is no need to change to ntp.drift as of now.
omar2010Author Commented:
Thank u
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.