11204 RAC日誌記錄的時間與操作系統時間不一致

RAC搭建完成以後,在系統層面做了時區改動之後,發現RAC日誌記錄的時候與操作系統時間不一致。

其中包括

AWR生成的時間點

數據庫alert日誌

CRS各種日誌

等等

舉個例子:

kaycsqdb001r:/u01/app/11.2.0/grid/log/kaycsqdb001r$date
Fri Oct 17 11:06:37 CST 2014              <<<這個時間點,開另外一個窗口執行集羣啓動命令
kaycsqdb001r:/u01/app/11.2.0/grid/log/kaycsqdb001r$tail -f al*1r.log      <<<監測日誌輸出
2014-10-16 22:06:24.941:
[/u01/app/11.2.0/grid/bin/orarootagent.bin(3146170)]CRS-2302:Cannot get GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).
2014-10-16 22:06:30.145:
[ohasd(5242990)]CRS-2302:Cannot get GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).
2014-10-16 22:06:30.162:
[gpnpd(5767206)]CRS-2328:GPNPD started on node kaycsqdb001r.
2014-10-16 22:06:33.415:
[cssd(3277140)]CRS-1713:CSSD daemon is started in clustered mode
2014-10-16 22:06:34.856:
[ohasd(5242990)]CRS-2767:Resource state recovery not attempted for 'ora.diskmon' as its target state is OFFLINE
2014-10-16 22:06:44.482:
[cssd(3277140)]CRS-1707:Lease acquisition for node kaycsqdb001r number 1 completed
2014-10-16 22:06:45.853:
[cssd(3277140)]CRS-1605:CSSD voting file is online: /dev/rhdisk2; details in /u01/app/11.2.0/grid/log/kaycsqdb001r/cssd/ocssd.log.
2014-10-16 22:06:50.018:
[cssd(3277140)]CRS-1601:CSSD Reconfiguration complete. Active nodes are kaycsqdb001r kaycsqdb002r .
2014-10-16 22:06:52.856:
[ctssd(3998150)]CRS-2407:The new Cluster Time Synchronization Service reference node is host kaycsqdb002r.
2014-10-16 22:06:52.858:
[ctssd(3998150)]CRS-2401:The Cluster Time Synchronization Service started on host kaycsqdb001r.
2014-10-16 22:06:54.468:
[ohasd(5242990)]CRS-2767:Resource state recovery not attempted for 'ora.diskmon' as its target state is OFFLINE
2014-10-16 22:06:58.959:
[ctssd(3998150)]CRS-2408:The clock on host kaycsqdb001r has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-10-16 22:07:04.036:
[/u01/app/11.2.0/grid/bin/orarootagent.bin(6684836)]CRS-5018:(:CLSN00037:) Removed unused HAIP route: 169.254.255.255 / 255.255.0.0 / 169.254.152.93 / en1
[client(3604840)]CRS-10001:16-Oct-14 22:07 ACFS-9391: Checking for existing ADVM/ACFS installation.
[client(3604842)]CRS-10001:16-Oct-14 22:07 ACFS-9392: Validating ADVM/ACFS installation files for operating system.
[client(3604844)]CRS-10001:16-Oct-14 22:07 ACFS-9393: Verifying ASM Administrator setup.
[client(3604846)]CRS-10001:16-Oct-14 22:07 ACFS-9308: Loading installed ADVM/ACFS drivers.
[client(3604852)]CRS-10001:16-Oct-14 22:07 ACFS-9154: Loading 'oracleadvm.ext' driver.
[client(3670458)]CRS-10001:16-Oct-14 22:07 ACFS-9154: Loading 'oracleacfs.ext' driver.
[client(7208994)]CRS-10001:16-Oct-14 22:07 ACFS-9327: Verifying ADVM/ACFS devices.
[client(3670464)]CRS-10001:16-Oct-14 22:07 ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
[client(3670468)]CRS-10001:16-Oct-14 22:07 ACFS-9156: Detecting control device '/dev/ofsctl'.
[client(3670472)]CRS-10001:16-Oct-14 22:07 ACFS-9322: completed
2014-10-16 22:07:19.261:
[crsd(5111996)]CRS-1012:The OCR service started on node kaycsqdb001r.
2014-10-16 22:07:19.303:
[evmd(4456814)]CRS-1401:EVMD started on node kaycsqdb001r.
2014-10-16 22:07:21.026:
[crsd(5111996)]CRS-1201:CRSD started on node kaycsqdb001r.

 

可以看到,日誌寫入時間比操作系統時間往近13小時.

這是由於新版本中的一個變化 ,GRID也有屬於自己的時區設置。在安裝過程中,默認值與操作系統的TZ環境變量相同。

 

microdb01:/u01/app/11.2.0/grid/crs/install$cat s_crsconfig_microdb01_env.txt
 TZ=BEIST-8     <<<<<<<<<<<<<<<GRID的時區設置
 NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
 RT_GRQ=ON
 EXTSHM=OFF
 TNS_ADMIN=
 ORACLE_BASE=


microdb01:/u01/app/11.2.0/grid/crs/install$grep TZ /etc/environment
 TZ=Asia/Shanghai <<<<<<<<<<<<<<<<<<系統的時區設置
 microdb01:/u01/app/11.2.0/grid/crs/install$

會發現GRID的時區設置與系統環境變量TZ不同了。

 

解決方法:

編輯s_crsconfig_microdb01_env.txt設置TZ=Asia/Shanghai,重啓集羣服務即可恢復。

-------------------------------------------------------------------------------------------------

本文來自於我的技術博客 http://blog.csdn.net/robo23

轉載請標註源文鏈接,否則追究法律責任!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章