When copying a DB2 cluster, the two hosts are required to have the same time. However, the system time on a host is about 12 hours different from the hardware Time. After Manual synchronization, the restart time is about 12 hours different. Why is it like this? first introduce the difference between the system clock and the hardware clock: Linux...
When copying a DB2 cluster, the two hosts are required to have the same time.
However, the system time on a host is about 12 hours different from the hardware Time. After Manual synchronization, the restart time is about 12 hours different.
Why is it like this? first introduce the differences between the system clock and the hardware clock:
Linux Clock is divided into System Clock and Real Time Clock (RTC. The system clock is the current Linux Kernel clock, and the hardware clock is the battery-powered clock on the motherboard. This hardware clock can be set in the BIOS. When Linux is started, the hardware clock reads the system clock settings, and then the system clock runs independently of the hardware.
Query time
Swas702 :~ # Date
Fri Mar 9 13:33:15 CST 2011
Swas702 :~ # Hwclock -- show
Fri Mar 9 13:33:22 2011-0.517526 seconds
Set system time
Was7:/ccc # date
Fri Mar 9 14:02:35 CST 2011
Was7:/ccc # date-s "14:02:35"
Fri Mar 9 14:02:35 CST 2011
Was7:/ccc # date
Fri Mar 9 14:02:36 CST 2011
Set hardware Time
Swas702 :~ # Hwclock -- set -- date = "13:33:22"
Swas702 :~ # Hwclock -- show
Fri Mar 9 13:33:22 2011-0.517526 seconds
If you want to synchronize the system time with the hardware clock, use
Swas702 :~ # Hwclock -- hctosys (hc indicates the hardware Time, sys indicates the system time)
Swas702 :~ # Clock -- systohc system clock and hardware clock synchronization
From Dream19881003