1836525 Members
3541 Online
110101 Solutions
New Discussion

clock setting

 
SOLVED
Go to solution
mehul_3
Regular Advisor

clock setting

Hi there!
How can I change my clock setting without rebooting a server. It has been running a lag behind from the actual schedule.


Mehul
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor

Re: clock setting

Hi Mehul,

You can run 'date -a ' command to slowly adjust the time. This way the clock 'ticks' a little faster than at it's normal speed instead of a sudden change.

However, I suggest you check with appadmins and DBAs on the impact. Particularly if you are running any billing applications, it can have a bad affect if something goes wrong in the above setup.

So, I advise you shutdown all your applicatins and databases, reboot the system in single user mode and change the date and time.

Consider using 'ntp' services from now on.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Franky_1
Respected Contributor

Re: clock setting

Hi,

to be on the safe side you should change the time only in single user state

Regards

Franky
Don't worry be happy
Victor Fridyev
Honored Contributor

Re: clock setting

Hi,

Is the time lag is not significant (less than 5-10 minutes), run NTP.
Look at the file /etc/ntp.conf and /etc/rc.config.d/netdaemons, edit them accordingly and run
/sbin/init.d/xntpd start

If the time difference is big, stop all DB applications or reboot the server without running its applications and ru
nntpdate -b TIMESERVER_HOSTNAME_OR_IP

HTH
Entities are not to be multiplied beyond necessity - RTFM
mehul_3
Regular Advisor

Re: clock setting

Hi
Actually I am newbie in HP-UX administration.
How can I open a system in a single user mode and change a clock setting in this mode while rebooting a server?
send me a summary steps.
We have tried it from SAM but I think it created a hassle.
Is there any basic steps to set a clock with hassle-free?

Any help/guidance appreciated from all you wizards.


Mehul




Cheryl Griffin
Honored Contributor
Solution

Re: clock setting

>>How can I open a system in a single user mode and change a clock setting in this mode while rebooting a server?>>
You can't get into true single user mode without rebooting the system. You can change the init levels, but it's not the same as rebooting and using "hpux -is". The -is = init single
shutdown -r
boot primary (or "bo pri" for short)
interact with ISL
at ISL type:
hpux -is


>>Is there any basic steps to set a clock with hassle-free?>> The most hassle free way to have the clock set automatically is by using ntp which syncs the time to a world clock.
See 7 Configuring the Network Time Protocol (NTP)
http://www.docs.hp.com/hpux/onlinedocs/B2355-90685/00/00/63-con.html
"Downtime is a Crime."
Geoff Wild
Honored Contributor

Re: clock setting

Have a look at this doc - "HP-UX Internet Services Administrator's Guide "

http://docs.hp.com/hpux/onlinedocs/B2355-90774/B2355-90774.html

See section on "Configuring NTP"

To change time manually, use the date command.

for more info:

man date

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.