ITPub博客

首页 > 数据库 > Oracle > 【问题处理】diagcollection.pl采集脚本执行出错——Argument list too long

【问题处理】diagcollection.pl采集脚本执行出错——Argument list too long

原创 Oracle 作者:OCMU联盟 时间:2010-11-20 22:14:42 0 删除 编辑
1.问题现象
1)在root用户下设置必须的环境变量
[root@rac1 ~]# export ORACLE_BASE=/oracle/app/oracle
[root@rac1 ~]# export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
[root@rac1 ~]# export ORA_CRS_HOME=/oracle/app/crs

2)确认环境变量设置正确
[root@rac1 ~]# echo $ORACLE_BASE
/oracle/app/oracle
[root@rac1 ~]# echo $ORACLE_HOME
/oracle/app/oracle/product/10.2.0/db_1
[root@rac1 ~]# echo $ORA_CRS_HOME
/oracle/app/crs
[root@rac1 ~]# echo $HOSTNAME
rac1

3)问题报错如下
[root@rac1 ~]# cd $ORA_CRS_HOME/bin
[root@rac1 bin]# ./diagcollection.pl -collect --all --crshome $ORA_CRS_HOME
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_rac1.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the -core option.
ocrData_rac1.tar.gz -> ocrdump, ocrcheck etc
coreData_rac1.tar.gz -> contents of CRS core files in text format

Collecting crs data
sh: /bin/tar: Argument list too long
gzip: crsData_rac1.tar: No such file or directory
Collecting OCR data
Collecting information from core files
No corefiles found
The following Oracle Home diagnostic archives will be created in the local directory.
oraData_rac1.tar.gz -> logs, traces and cores from Oracle Home
Collecting oracle home data
/bin/tar: Removing leading `/' from member names

2.问题原因
该问题是由于Shell本身的限制,当参数列表(Argument list)过长后,便会导致diagcollection.pl脚本执行出错。
本例中CRS日志目录下的大量文件是导致该问题的罪魁祸首。

3.处理方法
主要有两种处理方法:①手工收集CRS日志目录下的所需文件;②删除无用文件,避免出现超出Shell限制的问题

针对第二种方法,我们仅需要关心“$CRS_HOME/log//clien”目录下的文件即可,因为该目录下保存的文件内容最为庞大。可以清除一个月之前的文件(或将一个月之前的文件手工备份到其他目录)后再尝试收集。

4.更多的参考信息
有关该问题的更多参考信息请参见MOS:diagcollection.pl Fails With "Argument list too long" [ID 751981.1]

5.小结
我们的目标:不放过任何细节!

Good luck.

secooler
10.11.20

-- The End --

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70034820/viewspace-2994420/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
OCM联盟( Oracle Certified Master Union)是由侯圣文(ACE总监)发起的一个公益组织,旨在为每一个OCM大师提供一个可以继续展示自己才华,技术和实力的平台。

注册时间:2007-05-27

  • 博文量
    799
  • 访问量
    8407005