zoukankan      html  css  js  c++  java
  • 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 --持续监控半小时,检查是否有规律产生日志文件。

  • 相关阅读:
    一个漂亮的PHP验证码
    一个漂亮的php验证码类(分享)
    PHP中exit()与die()的区别
    自定义PHP页面跳转函数redirect($url, $time = 0, $msg = '')
    MySQL时间字段究竟使用INT还是DateTime
    mysql中为int设置长度究竟是什么意思
    Array数组对象
    Math对象
    对象篇学习-字符串对象
    事件的学习
  • 原文地址:https://www.cnblogs.com/lijiaman/p/7593860.html
Copyright © 2011-2022 走看看