출처 :  http://metalink.oracle.com


Applies to:

-----------------
Enterprise Manager Grid Control - Version: 10.2.0.1

Information in this document applies to any platform.



Goal
-----------------
This articles explains if it is possible and how to change the following values for the DB Control log/trace files located in either $ORACLE_HOME/host_sid/sysman/log or $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid/log directory:
  • Maximum File Size
  • Maximum Number of Files
  • File Location



Solution
-----------------
Log/Trace files located in $ORACLE_HOME/host_sid/sysman/log


File emoms.trc

Maximum File Size
Change the value below in the file $ORACLE_HOME/host_sid/sysman/config/emomslogging.properties:
log4j.appender.emtrcAppender.MaxFileSize =5000000

Maximum Number of Files (Rotation)

Change the value below in the file $ORACLE_HOME/host_sid/sysman/config/emomslogging.properties:
log4j.appender.emtrcAppender.MaxBackupIndex=10

File Location:

Change the value below in the file $ORACLE_HOME/host_sid/sysman/config/emomslogging.properties:
log4j.appender.emtrcAppender.File=<path to the new emoms.trc file>


File emoms.log
Maximum File Size
Change the value below in the file $ORACLE_HOME/host_sid/sysman/config/emomslogging.properties:
log4j.appender.emlogAppender.MaxFileSize =20000000

Maximum Number of Files (Rotation)
Change the value below in the file $ORACLE_HOME/host_sid/sysman/config/emomslogging.properties:
log4j.appender.emlogAppender.MaxBackupIndex=10

File Location:

Change the value below in the file $ORACLE_HOME/host_sid/sysman/config/emomslogging.properties:
log4j.appender.emlogAppender.File=<path to the new emoms.log file>


File emdb.nohup
This file stores the standard output from the Console main Java process at each start/exit (dbconsole and agent). It is appended with each new output of the Console main Java process.
The file emdb.nohup.lr stores the last output from the Console main Java process between a manual start and stop command. This means that if the process is restarted automatically by the watchdog process, the file emdb.nohup will be appended with the output from the watchdog process and will not be replaced.

There is no way to change the Maximum File Size, to rotate the file or to change its location by changing some settings in the DB Console configuration files. Rotation of this file can be achieved by using an automated shell script (or a cron job) that should do the following:


1. Stop the DB Console (emctl stop dbconsole)

2. mv $ORACLE_HOME/host_sid/sysman/log/emdb.nohup <path to the new location>.emdb.nohup.<timestamp>
3. Start the DB Console (emctl start dbconsole)


 

Log/Trace files located in $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid/log


File
http-web-access.log

You can only change the rollup frequency and the log file location.

By default, the rollup creates a new log file every day.

Edit ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<SID>/config/http-web-site.xml

Change the value in the following line:
<access-log path="../log/http-web-access.log" split="day"/>

Available values for split:

  • none
  • hour
  • day
  • week
  • month



File rmi.log
You can only change the log file location.

Edit ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<SID>/config/rmi.xml

Change the value in the following line:
<file path="../log/rmi.log"/>


File server.log
You can only change the log file location.

Edit ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<SID>/config/server.xml

Change the value in the following line:
<file path="../log/server.log" />



File global-application.log

Edit ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<SID>/config/application.xml

Find the following:
<log>
        <file path="../log/global-application.log"/>
        <!-- Uncomment this if you want to use ODL logging capabilities
        <odl path="../log/global-application/" max-file-size="1000" max-directory-size="10000"/>
        -->
</log>
Change: "file path" value for the location
Uncomment the "<odl path ..." block for enabling rotation of the log files.
Change: "path" value for the location of the rotated log files.
Change: "max-file-size" value for the maximum log file size prior to rotating it (default is 1Mb).
Change: "max-directory-size" for the maximum size of the rotated files directory (default is 10Mb or 10 files)


File em-application.log
Edit ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<SID>/application-deployments/em/orion-application.xml
You can change only the location (see <file path="../../log/em-application.log" /> tag) because this is the default process output and a restart of the application needs to be done in order to be moved.
For rotating this, a shell script (or a cron job) similar to the one for the emdb.nohup file can be used.

IMPORTANT: after any log setting change, DB Console needs to be restarted.



References
-----------------

NOTE:262781.1 - How to Reduce the size of the Access_Log file (OC4J Standalone)
NOTE:400528.1 - How to Control the Size of default-web-access.log in OC4J Without Using Oracle Diagnostic Logging (ODL)?
NOTE:735173.1 - OracleAS Diagnostic Logging (ODL), Execution Context ID's (ECID), and Log Rotation - A Master Reference



+ Recent posts