你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle 每隔5分钟产生2个clsc*.log文件

[日期:2017-10-01] 来源:Linux社区  作者:lijiaman [字体:大 中 小]

环境:

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 --持续监控半小时,检查是否有规律产生日志文件。

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-10/147233.htm

linux
相关资讯       clsc*.log 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款