运行脚本diagcollection.pl报错

Oracle的RAC提供了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脚本即可。

This entry was posted in BUG and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *