ADRCI常用功能

 

ADRCI 作用

ADR中的诊断数据 

Oracle Support

诊断信息包含:

 incident , problem, trace files, dumps, health monitor reports等

 

帮助,展示adrci相关命令

adrci> help

 HELP [topic]

   Available Topics:

        CREATE REPORT

        ECHO

        EXIT

        HELP

        HOST

        IPS

        PURGE

        RUN

        SET BASE

        SET BROWSER

        SET CONTROL

        SET ECHO

        SET EDITOR

        SET HOMES | HOME | HOMEPATH

        SET TERMOUT

        SHOW ALERT

        SHOW BASE

        SHOW CONTROL

        SHOW HM_RUN

        SHOW HOMES | HOME | HOMEPATH

        SHOW INCDIR

        SHOW INCIDENT

        SHOW PROBLEM

        SHOW REPORT

        SHOW TRACEFILE

        SPOOL

 There are other commands intended to be used directly by Oracle, type

 "HELP EXTENDED" to see the list

具体命令的帮助信息

adrci> HELP SHOW TRACEFILE

  Usage: SHOW TRACEFILE [file1 file2 ...] [-rt | -t]

                        [-i inc1 inc2 ...] [-path path1 path2 ...]

 

  Purpose: List the qualified trace filenames.

  Options:

    [file1 file2 ...]: The trace files users are interested in to search.

    If "-i" or/and "-path" is specified, the trace files are assumed

    to be under the specified incidents or paths. Otherwise, the files

    will be searched among the trace directory and all incident directories

    of the current ADR homes. Filenames allow SQL like condition syntax.

    I.e., allowing wildcard search on filenames by using "%". For example,

    "%mmon%" means all trace files with the "mmon" substring.

 

    [-rt | -t]: Order the trace filenames. "-t" means in the modified

    timestamps order; "-rt" means in the reversed modified timestamps

    order. Note that the ordering is only apply to a single directory.

    [-i inc1 inc2 ...]: The trace files produced for the listed incidents.

    If no files are listed, all trace files produced for the list

    incidents are considered.

 

    [-path path1 path2 ...]: The trace files under the given paths will be

    queried. If no files are listed, all trace files under these paths

    are considered.

  Examples: 

    1. Show all the trace files under the current home

       "show tracefile"

    2. Show all the mmon trace files in time reverse order

       "show tracefile %mmon% -rt"

    3. Show all trace files under incidents 123 456, and /home/someone/temp

       "show tracefile -i 123 456 -path  /home/someone/temp"

 

使用ADRCI命令先需要设置Homepath  或者 ADR_BASE

不然有些会报如下错误

adrci> SHOW CONTROL

DIA-48448: This command does not support multiple ADR homes

adrci> show HOMES

ADR Homes:

diag/asm/+asm/+ASM1

diag/tnslsnr/zzwsjdb3/listener

adrci> set HOMEPATH diag/asm/+asm/+ASM1

adrci> show HOMES

ADR Homes:

diag/asm/+asm/+ASM1

ADRCI 常用功能

1 查看警告日志

SHOW ALERT -TAIL

SHOW ALERT -TAIL 50 显示最后50条

SHOW ALERT -TAIL -F  类似tail -f alertorcl.log

SHOW ALERT -P "MESSAGE_TEXT LIKE '%ORA-600%'"

2 查看trace file

SHOW TRACEFILE

SHOW TRACEFILE %mmon%

SHOW TRACEFILE %mmon% -PATH /home/steve/temp

SHOW TRACEFILE -RT

3 查看Incidents

SHOW INCIDENT

SHOW INCIDENT -MODE BRIEF

SHOW INCIDENT -MODE DETAIL

SHOW INCIDENT -MODE DETAIL -P "INCIDENT_ID=1681"

4 清除日志

purge

purge -age 2 清除一天前日志

purge -age 1 清除当天日志

5 设置日志保存时间

包含两个属性

SHORTP_POLICY

Trace files

Core dump files

Packaging information

LONGP_POLICY

 Incident information

Incident dumps

Alert logs

 

adrci> set home diag/rdbms/orcl/orcl

adrci> SET CONTROL(SHORTP_POLICY=24)

adrci> SET CONTROL(LONGP_POLICY=24)

adrci> show CONTROL

 

6 查看错误

SHOW PROBLEM

adrci> set home diag/rdbms/racdb/racdb1

adrci> SHOW PROBLEM

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值