1752828 Members
3630 Online
108789 Solutions
New Discussion юеВ

Effects of date command

 
SOLVED
Go to solution
Serena Kuan_1
New Member

Effects of date command

I would like some advise on this scenario:
I need to reconfigure the timestamp(2 minutes behind now) with the 'date' command manually on 2 N-class HP9000 servers so that they are in consistent with the rest of the network (connected to an external atomic clock).

I will be doing this during a time when my cron jobs are not running. Furthermore, I'm setting it forward, so I guess this should not affect my make program. Lastly, my system is not doing any incremental backups.

Currently, xntpd is running on these 2 servers. So after manually resetting the timestamp on both the servers simultaneously (hopefully I can do it fast enough).

After that I hope xntpd will be able resynchronise the time deviations between these 2 servers to provide a better accuracy from microsecond to millisecond range. Thus, do I need to restart the xntpd daemon for this?

However some of the worries I have is:
1. I cannot reboot the servers since they are live production system. So, it is advisable to use the date command without rebooting the system?
2. I also will be doing this while system is running in multi-user mode since I cannot reboot the system. Is that advisable too?
3. Is there any other effect of this 'date' command on the system?

Thank you.

Best regards,
Serena
Have a smile on your face all day! =)
9 REPLIES 9
Ravi_8
Honored Contributor

Re: Effects of date command

Hi, serena

How about using 'ntpdate'.

since you need to synchronize with n/w, i think this is one of the solution
have a look at ntpdate man pages
never give up
Serena Kuan_1
New Member

Re: Effects of date command

Thanks. My focus is more on the system. Rolling forward even 2 minutes might prove to be disasterous to my system since it is used for telecommunication purpose where charging rate, ongoing-calls etc are going on 24 hours. Anyone care to share their experience?
Have a smile on your face all day! =)
Michael Tully
Honored Contributor
Solution

Re: Effects of date command

Note the comments in this post from Bill Hassell in regards to running 'ntpdate'

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x89126049dbb6d611abdb0090277a778c,00.html
Anyone for a Mutiny ?
Pete Randall
Outstanding Contributor

Re: Effects of date command

Serena,

If you're absolutely sure that you want to do this and no harm will come from it (i.e. no databases running, etc.), try this technique:

LIST=`cat /etc/hosts |grep "#unixhost" |awk -F# '{ print $3 }'`
for SERVER in $LIST
do
remsh $SERVER /usr/sbin/ntpdate -b yukon
done


Any method will work for the list but we use the /etc/hosts file to provide this list by adding the #unixhost comment like this:
130.1.0.251.....yukon...yukon.holstein.com.......#unixhost#yukon

(ignore the periods - they're just for spacing).


Good luck,
Pete

Pete
Serena Kuan_1
New Member

Re: Effects of date command

I have just checked the NTP clocking configuration of my two HP9000 servers, SDP1 and SDP2. Please refer to the attached file.

Seems like they are referring to each other at the moment but I am not too sure. Please comment on this.

If that is the case, I have to change the timestamp at least on one server then the other server will slowly follow suit. Databases are running on both of these servers all the time. So I am worried about having to deal with broken links and other corruption later.
Have a smile on your face all day! =)
Garry Ferguson
Frequent Advisor

Re: Effects of date command

Serena,
I am no expert in this area but would observe as follows.
Your 2 machines are just referring to each other. I don't understand what 127.127.0.1 is - perhaps some strange loopback address - but this is shown by the ntpq and netdaemons info.
You mention an external atomic clock. You'll need some machine (X) referring to that and then refer each of your 2 machines to X. Using the server command in /etc/ntp.conf.
You'll then have to stop and start xntpd I'd expect.
If time is VERY important and effects accounting I suggest
resetting in slow stages by hand. eg 1 second at a time over a few hours!!! Carefull with /sbin/init.d/xntpd as it attempts a single step resetting of the time before running the xntpd daemon.
Regards, Garry
Bill Thorsteinson
Honored Contributor

Re: Effects of date command

Install a newer version of ntp and have it slew the time. There is a new switch which tells ntp to allway slew the time. This would be appropriate in your case.
Bill Thorsteinson
Honored Contributor

Re: Effects of date command

Install a newer version of ntp and have it slew the time. There is a new switch (-x) which tells ntp to allways slew the time. This would be appropriate in your case. It will take a few hours to syncronize but won't significantly alter billings.
John Palmer
Honored Contributor

Re: Effects of date command

You can use 'date -a ' to correct the time on your server. It won't have affect any of your applications.

man date

Regards,
John