Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to manage Oracle diagnostics logs not managed by adrci?

Ewae RpokMar 26 2019 — edited Mar 29 2019

How can I identify Oracle log files that are not managed by adrci?

[Reposted from https://dba.stackexchange.com/questions/232634/how-to-manage-oracle-diagnostics-logs-not-managed-by-adrci]

I wish to manage disk space usage, in a similar scenario to these articles: "" and "How to free up disk space? which logs/directories to clean?". Those articles explain how adrci can be used to identify and manage certain log files. However, it highlights that other types of log files must be managed with other tools (OS scripting, etc.)

My scenario differs in that I wish to do it proactively. i.e. with automated housekeeping. This is instead of waiting for files to become identifiable by growing noticeably large, then requiring manual intervention to confirm that they are indeed diagnostic-type log files that can be safely cycled, and only then being able to address any disk space issues.

Current output from adrci on one of our systems:

[oracle@host oracle]$ adrci

ADRCI: Release 11.2.0.4.0 - Production on Wed Mar 20 10:22:06 2019

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

ADR base = "/u01/app/oracle"

adrci> show homes

ADR Homes:

diag/rdbms/appx/AppX

diag/rdbms/appy/AppY

diag/rdbms/appz/AppZ

diag/tnslsnr/host/listener

adrci> show tracefiles %.log

     diag/rdbms/appx/AppX/trace/alert_AppX.log

     diag/rdbms/appy/AppY/trace/alert_AppY.log

     diag/rdbms/appz/AppZ/trace/alert_AppZ.log

     diag/tnslsnr/host/listener/trace/listener.log

adrci>


However, manual check of file systems at OS-level identifies other application files - outside of the ADR base location - that were modified in the last day with file name extension ".log":

[oracle@host-name oracle]$ cd /home/oracle/app/oracle/product/11.2.0/AppZ

[oracle@host-name AppZ]$ find . -mtime 0 -name "*.log"

host-name.fully.qualified.domain_AppZ/sysman/emd/state/progResUtil.log

host-name.fully.qualified.domain_AppZ/sysman/emd/state/storage/host-nam/nmhsrmet.log

host-name.fully.qualified.domain_AppZ/sysman/emd/state/1234567890ABCDEF1234567890ABCDEF_failedLogin.log

host-name.fully.qualified.domain_AppZ/sysman/emd/state/1234567890ABCDEF1234567890ABCDEF_seg_adv_count.log

host-name.fully.qualified.domain_AppZ/sysman/log/emoms.log log/diag/tnslsnr/host-name/listener/trace/listener.log

[oracle@host-name AppZ]$


And on a second system, I find this additional log:

/home/oracle/app/oracle/product/11.2.0/AppQ/oc4j/j2ee/OC4J_DBConsole_host-name2.fully.qualified.domain_AppQ/log/em-application.log

On a third system, without restricting to files modified in the last day, there are many more locations:

[oracle@host-name3 oracle] cd /home/oracle/

[oracle@host-name3 oracle]# find . -name "*.log" -type f|wc -l

196

[oracle@host-name3 oracle]# find . -name "*.log" -type f -exec dirname {} \; | sort -u

.

./admin/AppN/dpdump

./cfgtoollogs/catbundle

./cfgtoollogs/dbca/AppN

./cfgtoollogs/emca/AppN

./cfgtoollogs/netca

./diag/rdbms/AppN/AppN/trace

./diag/tnslsnr/host-name3/listener/trace

./memChecks

./.oracle/logs

./oradiag_oracle/diag/clients/user_oracle/host_1234567890_80/trace

./oradiag_oracle/diag/clients/user_oracle/host_223456789_80/trace

./oraInventory/logs

./product/11.2.0/AppN/cfgtoollogs

./product/11.2.0/AppN/cfgtoollogs/cfgfw

./product/11.2.0/AppN/cfgtoollogs/opatch

./product/11.2.0/AppN/cfgtoollogs/oui

./product/11.2.0/AppN/host-name3.fully.qualified.domain_AppN/host-name3_AppN/sysman/emd/state

./product/11.2.0/AppN/host-name3.fully.qualified.domain_AppN/host-name3_AppN/sysman/emd/state/storage/host-nam

./product/11.2.0/AppN/host-name3.fully.qualified.domain_AppN/host-name3_AppN/sysman/log

./product/11.2.0/AppN/host-name3.fully.qualified.domain_AppN/sysman/emd/state

./product/11.2.0/AppN/host-name3.fully.qualified.domain_AppN/sysman/emd/state/storage/host-nam

./product/11.2.0/AppN/host-name3.fully.qualified.domain_AppN/sysman/log ./product/11.2.0/AppN/host-name3_AppN/sysman/emd/state

./product/11.2.0/AppN/host-name3_AppN/sysman/emd/state/storage/host-nam

./product/11.2.0/AppN/host-name3_AppN/sysman/log

./product/11.2.0/AppN/install

./product/11.2.0/AppN/log/host-name3/client

./product/11.2.0/AppN/log/diag/tnslsnr/host-name3/dbconsole/trace

./product/11.2.0/AppN/network/log

./product/11.2.0/AppN/oc4j/cfgtoollogs/opatch

./product/11.2.0/AppN/oc4j/j2ee/OC4J_DBConsole_host-name3.fully.qualified.domain_AppN/log

./product/11.2.0/AppN/oc4j/j2ee/OC4J_DBConsole_host-name3_AppN/log

./product/11.2.0/AppN/rdbms/log

./product/11.2.0/AppN/sysman/log

./spfileBackups

[oracle@host-name3 oracle]#


And this is before searching for files with ".trc" or ".xml" or other "likely candidate" file name extensions.

I appreciate that these might not all be Oracle product diagnostic logs that can be or even need to be truncated, but I don't know which ones are, or whether any new ones might appear at some point.


Comments
Post Details
Added on Mar 26 2019
3 comments
2,238 views