ADRCI 删除oracle监听告警日志

概述:使用adrci工具删除oracle的监听告警日志,在日常维护中监听的警告日志有可能占用磁盘的空间大需要进行清理。

[grid@hostname ~]$ adrci 

ADRCI: Release 12.1.0.2.0 - Production on Tue Nov 20 08:58:12 2018

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/u01/app/grid"
adrci> show homes
ADR Homes: 
diag/rdbms/_mgmtdb/-MGMTDB
diag/diagtool/user_grid/adrci_xxx
diag/clients/user_root/host_xxx
diag/clients/user_grid/host_xxx
diag/asm/+asm/+ASM1
diag/asm/user_grid/host_xxx
diag/asmtool/user_oracle/host_xxx
diag/asmtool/user_grid/host_315454942_82
diag/tnslsnr/hostname/mgmtlsnr
diag/tnslsnr/hostname/listener
diag/tnslsnr/hostname/listener_scan1
diag/crs/hostname/crs
adrci> set homepath diag/tnslsnr/hostname/listener
adrci> help purge

  Usage: PURGE [[-i <id1> | <id1> <id2>] | 
               [-age <mins> [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]]]: 

  Purpose: Purge the diagnostic data in the current ADR home. If no
           option is specified, the default purging policy will be used.

  Options:
    [-i id1 | id1 id2]: Users can input a single incident ID, or a 
    range of incidents to purge.

    [-age <mins>]: Users can specify the purging policy either to all
    the diagnostic data or the specified type. The data older than <mins>
    ago will be purged

    [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]: Users can specify what type of 
    data to be purged.

  Examples:  
    purge 
    purge -i 123 456
    purge -age 60 -type incident

adrci> purge -age 1440 -type alert
adrci> exit

[root@hostname alert]# du -sh 
12G     .
[root@hostname alert]# du -sh 
2.9G    .
[root@hostname alert]# du -sh 
203M    .
[root@hostname alert]# du -sh 
203M    .
[root@hostname alert]# du -sh 
203M    .
[root@hostname alert]# du -sh 
203M    .
[root@hostname alert]# pwd
/u01/app/grid/diag/tnslsnr/hostname/listener/alert

清除后对应的监听告警日志从原先的12G减小到了203M。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值