Operating System - HP-UX
1819870 Members
2616 Online
109607 Solutions
New Discussion юеВ

Replacement of rdate commad in HPUX

 
Srimalik
Valued Contributor

Replacement of rdate commad in HPUX

Is there and command in HPUX which synchronizes the system time with a remote machine.

Solaris has a command rdate, does it has a replacement in HPUX?
abandon all hope, ye who enter here..
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: Replacement of rdate commad in HPUX

NTP would be the tool of choice for time synchronization. This can be set up using SAM. You can also use the ntpdate command to sync a server to a NTP source without setting up the NTP client software.

Or, you could use a little script like this:

echo "yes" > /tmp/yes_time
CTIME=`date +%m%d%H%M%y`
remsh $SERVER date $CTIME < /tmp/yes_time
rm /tmp/yes_time


Pete

Pete
Srimalik
Valued Contributor

Re: Replacement of rdate commad in HPUX

The problem is:

I want to synchronize the time between a solaris machine and a HPUX machine.

when I do ntpdate on HPUX it gives me the following error:

ntpdate solh-01
27 Jun 09:54:08 ntpdate[13846]: no server suitable for synchronization found

when the try to sync a sol machine with the same server(solh-01) using rdate the sync completes.

is there some command in HPUX which will do the same job as rdate
abandon all hope, ye who enter here..
Bill Hassell
Honored Contributor

Re: Replacement of rdate commad in HPUX

rdate is very dated and should not be used in a modern system. NTP is the correct tool but you have to define the true time source. Your Solaris machine needs to get it's (NTP) time from a reliable source. There are two methods: the Internet and a local radio or GPS receiver. For the Internet, you start with your network admoinistrator and see if your firewall is already setup to use NTP. If not, turn that feature on and use the web page http://www.pool.ntp.org/ to select atomic clock server accuracy. Then have the firewall act as the NTP source for all your systems, Solaris, HP-UX, etc.

Use the ntpq -p command to test the server and once it is working, you just add the server name to your /etc/ntp.conf file. If your systems have access to the open Internet, then obtain the time directly with entries like this in ntp.con:

server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org

But before you start, run ntpq -p 0.north-america.pool.ntp.org to test connectivity. You need port 123 enabled on your firewall.


Bill Hassell, sysadmin
Srimalik
Valued Contributor

Re: Replacement of rdate commad in HPUX

Hi ,

Now I have manually synced the times at there was not NTP server available on the solaris machine.

Thanks for your valuable replies.

sri
abandon all hope, ye who enter here..