Solved

synchronizing clocks on diff. machines

Posted on 1998-08-05
7
357 Views
Last Modified: 2013-12-16
I have a bunch of different machines running different OS's
and I was wondering if there's an easy way of synchronizing
all the clocks and keeping them synchronized.  Or perhaps is
there a way for one machine to "broadcast" the time to all
others?
0
Comment
Question by:ladioss
7 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1812565
do all the OS's support timed?
0
 
LVL 2

Expert Comment

by:lucidity
ID: 1812566
NT servers will respond to the "net time" command.

net time \\NTSName /set /yes

I don't know if UNIX will make this call, anyway, I put that in my start up to synch to the server.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812567
lucidity, why do you post M$ proprietary answres in a UNIX topic?
It's even just half the trouth, it won't work this way in a default M$ setup.

timed (as ozo said) is the solution, available for most M$ products too ;-))
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:ladioss
ID: 1812568
I'm not familiar in that area...how would i get it to work if it
supports timed?  These machines are not running NT, but unix
os's.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812569
timed works in master-slave mode (IRIX also supports primary and secondary masters).

You start timed as master on one machine, and as slave on all others. timed can be configured via options how to synchronize, see man-page for details.
Be prepared that it has different options on different platforms.
0
 

Accepted Solution

by:
almasy earned 100 total points
ID: 1812570
For all of your Unix systems I would recommend setting up a root cron job (use "crontab -e" as root) that runs the "rdate" command periodically to query the time from a common host.

The syntax for "rdate" is:

    rdate -s hostname

Where "hostname" is the name of the machine to query, and the "-s" parameter may not be needed for some flavors of Unix (it can be left off for Solaris and SunOS).

For internet-connected systems there are a number of public machines to query.  The one I usually use is "time.mit.edu", so the crontab entry that I have set up under Solaris is:

    45 4 * * * /usr/bin/rdate time.mit.edu > /dev/null

Which updates the system time at 4:45am each day.

It may also be desirable to invoke rdate from the startup scripts on each machine and/or to increase the frequency of cron invocations, if you're concerned about the clocks always being synchronized.
0
 

Author Comment

by:ladioss
ID: 1812571
Actually, i already have it answered by ozo.  Timed was the answer and I have it working on all 6 different OS's now even
though it was a pain with all the different options on the different platforms like ahoffmann said.  sorry that i couldn't give you the points though, ozo.

thanks to all!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question