在suse linux 10上部署WAS应用和搭建ORACLE RAC集群时,经常会碰到因系统时间不准而导致WAS不正常和RAC节点宕机问题,解决系统时间跑偏的问题,大家会很自然的想到NTP和CRONTAB。下面针对这个问题来具体说说suse linux 10系统时间跑偏问题。
一、现象
经过观察,你会发现在安装系统后第一次设置正确系统时间后,没设置定时校准的情况下,它的系统时间一小时会偏差有4-6分钟左右,一天下来通常会偏差50分钟左右。这在生产环境下肯定会出问题。
二、NTP设置
如果你能直接连接到外部时间源或一个内部的时间源服务器,你可以在其中的一台suse linux 10上设置NTP服务器,让其他suse linux 10定时同步这台NTP服务器就行。
#vi /etc/ntp.conf
## Radio and modem clocks by convention have addresses in the
## form 127.127.t.u, where t is the clock type and u is a unit
## number in the range 0-3.
##
## Most of these clocks require support in the form of a
## serial port or special bus peripheral. The particular
## device is normally specified by adding a soft link
## /dev/device-u to the particular hardware device involved,
## where u correspond to the unit number above.
##
## Generic DCF77 clock on serial port (Conrad DCF77)
## Address: 127.127.8.u
## Serial Port: /dev/refclock-u
##
## (create soft link /dev/refclock-0 to the particular ttyS?)
##
# server 127.127.8.0 mode 5 prefer
##
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
server 127.127.1.0 # local clock (LCL)
fudge 127.127.1.0 stratum 10 # LCL is unsy