oracle 以每10分钟为一个文件,Oracle 每隔5分钟产生2个clsc*.log文件

环境:

OS:HP-UNIX

数据库:11.2.0.4  双机RAC

(一)现象

在清理Oracle日志的时候,发现在$ORACLE_HOME/log/{instance_id}/client下面存在大量的clsc*.log。经过观察,发现每隔5分钟产生2个日志,具体如下:

...

-rw-r--r-- 1 oracle oinstall 244 Sep 25 15:55 clsc34691.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 15:55 clsc34692.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:00 clsc34693.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:00 clsc34694.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:05 clsc34695.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:05 clsc34696.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:10 clsc34697.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:10 clsc34698.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:15 clsc34699.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:15 clsc34700.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:20 clsc34701.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:25 clsc34702.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:30 clsc34703.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:35 clsc34704.log

-rw-r--r-- 1 oracle oinstall 244 Sep 25 16:40 clsc34705.log

...

查看日志数量,发现已经有很多了

fabdb1$[/grid/11.2.0/grid/log/fabdb1/client]ll |wc -l

34709

(二)原因

发现这是Oracle在11.2中的bug,在开启Oracle EM的情况下,EM会每隔5分钟使用crs_stat去收集Oracle服务的状态,导致日志的产生。

(三)解决方案

以oracle用户登录,到目录下:

$ORACLE_HOME/sysman/admin/scripts/

修改2个文件:

①  vim crs_resources.pl

# 找到这一行:

my $cmd = "$crs_home/bin/crs_stat";

# 修改为:

my $cmd = "$crs_home/bin/crsctl stat res";

② vim crs_vip.pl

# 找到这一行:

my $cmd = "$crs_home/bin/crs_stat";

# 修改为:

my $cmd = "$crs_home/bin/crsctl stat res";

重启EM

emctl stop dbconsole

emctl start dbconsole

su - grid

cd $ORACLE_HOME/log/{instance_name}/client

ls -lrt --持续监控半小时,检查是否有规律产生日志文件。

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值