執行指令碼diagcollection.pl報錯

yangtingkun發表於2011-11-29

OracleRAC提供了diagcollection.pl指令碼,用來收集CLUSTER和資料庫的指令碼。不過在客戶環境中執行這個指令碼報錯。

 

 

詳細錯誤資訊為:

[root@smsdbrac1 ora_test]# $ORA_CRS_HOME/bin/diagcollection.pl -crshome=$ORA_CRS_HOME -collect
Production Copyright 2004, 2005, Oracle. All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
The following CRS diagnostic archives will be created in the local directory.
crsData_smsdbrac1.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the -core option.
ocrData_smsdbrac1.tar.gz -> ocrdump, ocrcheck etc
coreData_smsdbrac1.tar.gz -> contents of CRS core files in text format

Collecting crs data
sh: line 1: /bin/tar: Argument list too long
gzip: crsData_smsdbrac1.tar: No such file or directory
Collecting OCR data
Collecting information from core files
Previous frame. inner to this frame. (corrupt stack?)
Previous frame. inner to this frame. (corrupt stack?)
The following Oracle Home diagnostic archives will be created in the local directory.
oraData_smsdbrac1.tar.gz -> logs, traces and cores from Oracle Home
Collecting oracle home data
/bin/tar: Removing leading `/' from member names

執行指令碼出現Argument list too long的錯誤,查詢MOS發現導致問題的原因CRS目錄中的檔案太多,以致於超過了shell的限制。

11g中可以使用—afterdatevar來限制時間範圍,從而減少CRS中採集的檔案數量。

對於10.2版本,除了手工收集指令碼這個辦法外,還可以考慮手工減少日誌數量的方法。進入$CRS_HOME/log//client目錄,將所有一個月前的日誌打包並壓縮,然後刪除,再次執行diagcollection.pl指令碼即可。

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-712384/,如需轉載,請註明出處,否則將追究法律責任。

相關文章