How to sync server clocks

I manage 5 dev/test servers, all Solaris 10 (with DBs) and would like to sync the clocks between them. I checked the /etc/TIMEZONE file and they are all the same (Eastern).  However the times are off by at most 5-10minutes.  I researched online, but not sure if the solutions pertain to my situation.  How do I sync?  (FYI: I access the servers normally via putty from window workstation) Thanks.
sajmf0408Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Zac HarrisSystems Administrator Commented:
I would setup one of the servers to be the "time keeper" and install NTP on the others and point it to the "time keeper" server.
sajmf0408Author Commented:
Hi, Thanks.  How would i do that?
Zac HarrisSystems Administrator Commented:
I have used the procedure on this page to setup NTP on some test machines before:

NTP Server Setup on Unix
Discover the Answer to Productive IT

Discover app within WatchGuard's Wi-Fi Cloud helps you optimize W-Fi user experience with the most complete set of visibility, troubleshooting, and network health features. Quickly pinpointing network problems will lead to more happy users and most importantly, productive IT.

sajmf0408Author Commented:
Thanks for the info.  I will review it and give you an update in a couple of days.  I appreciate the info.
Joseph GanSystem AdminCommented:
You can also setup a Windows NTP server, and piont the Solaris servers to it.

http://www.satsignal.eu/ntp/setup.html
frankhelkCommented:
You can also setup a Windows NTP server, and piont the Solaris servers to it.

That's quite an option, but with respect to the hassle I experienced with W32time in NTP mode and the lousy troubleshooting options of that, I would recommend to use a port of the unix NTP client if one tries to set up a time server with a Windows machine (see my article on NTP for some infos about that).

Anyhow, since NTP is a basic native of *UX environments, I would recommend to activate it on all machines and to use it for that (my article would help with that, too).
sajmf0408Author Commented:
I'm just working in the Unix environment so I will activate it on all servers as suggested, and point all 4 to the 1 that I make the NTP server.  I've been reading all the articles and trying to test it.
sajmf0408Author Commented:
I've been researching online to include your suggestions and they are all similar, but some suggested some additional stuff.   I checked all 5 server times and notice that server #1 has the same time as my workstation (windows) time (connect to unix servers via putty).  I would like to servers 2-5 to point to server #1.  I saw these instructions along w/others:

http://unixadminschool.com/blog/2011/11/solaris-setup-ntp-client-in-solaris-8-9-and-10/#

Configured server 1 via ntp.conf file:
multicastclient 224.0.1.1

enabled ntp

Configured server 2 ntp.conf:
server (server 1 IP)
server (server 2 IP)

Enabled ntp and tested from server 2
-bash-3.2# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
server 1         0.0.0.0         16 -    -   64       0           0.00    0.000 16000.0
server 2         0.0.0.0         16 -    -   64       0           0.00    0.000 16000.0

What did i miss or do wrong or miss?
Typed date to see, but server 2 is still 3 mins off.

Appreciate your assistance.
frankhelkCommented:
Ooops - I've never worked with NTP multicast - I think it woud only be useful when a server needs to maintain a big bunch of clients (100 and up). In that case the server constantly sends timestamp packets via multicast and the clients only listen to that. It would produce (a bit nowadays) more CPU load on the server (and possibly on the clients) and more network "noise".

In regular NTP operation (which I presume to be more useful in your case of 1 server and about 5...10 clients) the clients ask the server for a time stamp whenever they think it's needed, and the server answers. That's a very lightweight procedure which minimizes the performance impact on either server CPU, client CPU and network load.

For the server (iff connected to the internet), I would recommend to sync it according the example in my article on NTP this way:
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst
driftfile /var/lib/ntp/drift/ntp.drift
logfile /var/log/ntp

Open in new window


Be sure to adjust the file paths to your system needs. Given the small number of systems, you might as well use that config for the client systems, too - that would keep them in sync for the case that the server fails.

If you insist on using one server (presumed to be named tmsrv) to get the time from outside, the clients could be configured with
server tmsrv iburst
driftfile /var/lib/ntp/drift/ntp.drift
logfile /var/log/ntp

Open in new window


Hope that helps.

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
Joseph GanSystem AdminCommented:
If your inveroment already had a NTP server, you could add following line in the ntp.conf file in all servers:

server (ntp server IP) prefer

If you don't know any NTP server, why don't you sync with server1, by adding following line in the rest servers:

server (server1 IP)
sajmf0408Author Commented:
Still working, I will provide an update next week.
frankhelkCommented:
Inactive for a long time now ... solutions seem to be suffuicient
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.