1833779 Members
2461 Online
110063 Solutions
New Discussion

Re: Change System Time

 
SOLVED
Go to solution
Rao Uppuluri
Advisor

Change System Time

Hi
I am trying to change system time on our L2000 servers (they are very much out of sync) I read about NTP but was just wondering if someone has or can point me to a step by step directions?
Thanks a bunch,

Rao
6 REPLIES 6
Brian Bergstrand
Honored Contributor

Re: Change System Time

If you have ntp, then

# ntpdate tock.usno.navy.mil

while at run level 0

Otherwise, look at the man page for date.

Again, you should be at rl 0.

HTH.
A. Clay Stephenson
Acclaimed Contributor

Re: Change System Time

Actually, there is a very good document already on your box. Look at /usr/share/doc/NTP_Primer.txt. Its very easy to set up NTP and you can even do it with SAM.
If it ain't broke, I can fix that.
Rao Uppuluri
Advisor

Re: Change System Time

Hi
Can I run "ntpdate" in multi-user mode? If Yes, can I run it while my Oracle databases are running? man ntpdate doesn't say anything about run level 0, as mentioned by Brian.

Also, what happens if the time diff is about 30 mts?
TIA
Rao
Pete Randall
Outstanding Contributor

Re: Change System Time

Rao,

Yes, you can run it in multi-user mode.

You'll want to adjust very gradually so you don't upset your DB. From the ntpdate man page:

"Time adjustments are made by ntpdate in one of two ways. If ntpdate
determines the clock is in error more than 0.5 seconds, it will simply
step the time by calling the clock_settime (see clocks(2)) system
routine. If the error is less than 0.5 seconds, it will slew the time
by calling the adjtime (see adjtime(2)) system routine. The latter
technique is less disruptive and more accurate when the error is
small, and works quite well when ntpdate is run by cron (see cron(1M))"


Pete


Pete
Patrick Wallek
Honored Contributor

Re: Change System Time

If the time is off by 30 minutes, then you really need to manually set the time first, with ALL applications stopped, especially Oracle. The ntp daemon will not sync the time if the difference is more than about 8 minutes (I think). You really don't want to do any drastic time changes with a DB up and running. It can really screw you up. Once the time fairly close, you can start NTP and it will gradually sync the time and keep it synced.