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 

不然有些会报如下错误

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 常用功能

查看警告日志

SHOW ALERT -TAIL

SHOW ALERT -TAIL 50 显示最后50条

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

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

查看trace file

SHOW TRACEFILE

SHOW TRACEFILE %mmon%

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

SHOW TRACEFILE -RT

查看Incidents

SHOW INCIDENT

SHOW INCIDENT -MODE BRIEF

SHOW INCIDENT -MODE DETAIL

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

清除日志

purge

purge -age 2 清除一天前日志

purge -age 1 清除当天日志

设置日志保存时间

包含两个属性

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

 

ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:

*************************************************************************

ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME                              

-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------

1335663986           24                   24                   2013-12-20 09:27:21.295138 +08:00        2013-12-14 05:48:36.092047 +08:00        2013-12-20 09:18:52.380654 +08:00        1                    2                    80                   1                    2013-08-27 07:08:28.517862 +08:00      

1 rows fetched

查看错误

SHOW PROBLEM

adrci> set home diag/rdbms/racdb/racdb1

adrci> SHOW PROBLEM

 

ADR Home = /u01/app/oracle/diag/rdbms/racdb/racdb1:

*************************************************************************

PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME                            

-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------

3                    ORA 445                                                     88339                2013-12-16 08:42:43.929000 +08:00      

6                    ORA 29770                                                   72139                2013-09-13 16:25:39.344000 +08:00      

5                    ORA 603                                                     72002                2013-08-07 08:14:35.111000 +08:00      

4                    ORA 600 [kgantc_1]                                          64385                2013-08-07 08:14:20.437000 +08:00      

2                    ORA 240                                                     64154                2013-06-27 10:37:36.264000 +08:00      

1                    ORA 600 [ksfdchkfob1]                                       64425                2013-05-23 13:10:42.927000 +08:00     

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值