Skip Headers
Oracle® Collaboration Suite Administrator's Guide
10g Release 1 (10.1.1) for Windows or UNIX

Part Number B14476-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Managing Oracle Collaboration Suite Log Files

Each of the major components of Oracle Collaboration Suite records various important status and error messages in a variety of logs. As an administrator, one of your primary responsibilities is to monitor and maintain the log files. This chapter describes each of the log files used by Oracle Collaboration Suite, and how to view and manage them.

Oracle Collaboration Suite components generate log files containing messages that record all types of events, including startup and shutdown information, errors, warning messages, access information on HTTP requests, and additional information. This chapter describes how to view and manage log files to assist in monitoring system activity and in diagnosing system problems.

See Also:

Appendix B, "Default Locations of Component Log Files"

This chapter contains the following topics:

Introduction to Oracle Collaboration Suite Logging

The Oracle Collaboration Suite Control lets you list and search log files across Oracle Application Server and Oracle Collaboration Suite components. You can view log files from the Oracle Collaboration Suite Control pages or download a log file to your local client and view the log files using another tool.

This section covers the following topics:

Understanding Log File Data and Naming

Several Oracle Collaboration Suite components use Oracle Diagnostic Logging (ODL). Using ODL, log file naming and the format of the contents of log files conforms to an Oracle standard and the diagnostic messages are written in XML. Some Oracle Collaboration Suite components do not use ODL, and write their diagnostic messages using a component specific text format. Regardless of the format of the messages that are stored in log files, ODL or text based, you can view log files using the Oracle Collaboration Suite Control, or you can download log files to your local client and view them using another tool (for example a text editor, or another file viewing utility).

This section covers the following topic:

See Also:

Appendix B, "Default Locations of Component Log Files" for a list of Oracle Collaboration Suite logs and their formats.

ODL Message Formatting and ODL Log File Naming

When Oracle Collaboration Suite components run and produce ODL messages, the messages are written to diagnostic log files using XML format. Each ODL message includes a HEADER element containing fields with information about the message, optionally a CORRELATION_DATA element containing information to assist in correlating messages across components, and a PAYLOAD element containing the message text, including optional arguments and associated values.

Using ODL, Oracle Collaboration Suite components write diagnostic log files to a logging directory and determine the names for logging directories using a component specific naming convention.

Using a Log Repository

The Oracle Collaboration Suite Control supports viewing diagnostic messages from a Log Repository. A Log Repository can be file-based or stored in a database, and contains messages collected from multiple diagnostic log files across components. A Log Loader does not contain messages from access or trace log files because access logs and trace logs are verbose and do not contain diagnostic information.

The Oracle Collaboration Suite Log Loader component initializes and updates the data in a Log Repository. After the Log Loader starts, at regular intervals it stores information from diagnostic log files to the Log Repository.

Using a Log Repository consolidates Oracle Collaboration Suite log file data; this enables you to use the Oracle Collaboration Suite Control Console to easily search and view log file data generated by multiple components. Using a Log Repository can speed up the diagnostic process and reduce the resources required to support Oracle Collaboration Suite.

Note:

By default, the Log Loader is not started. Use the Oracle Collaboration Suite Control Console or OPMN to start Log Loader.

Configuring Component Logging Options

Administrators configure logging options to manage and limit the logging information that Oracle Collaboration Suite components generate and save.

Note:

The Oracle Collaboration Suite Control Console does not directly support configuring logging options. In many cases, to configure component logging options, you need to use the Oracle Collaboration Suite Control Console Advanced Server Properties page to edit the values in configuration files.

The logging configuration options include:

  • Specifying Log File Names and Pathnames: Some Oracle Collaboration Suite components let you specify the directory for storing diagnostic log files. Specifying the diagnostic logging directory allows you to manage system and network resources.

  • Limiting Log File Size: As Oracle Collaboration Suite components run and generate diagnostic messages, the size of the log files increases. Oracle Collaboration Suite components use one of several strategies to deal with log file size. Some components allow log files to keep increasing in size; in this case it is the administrator's responsibility to monitor and cleanup the log files. Other components, including OC4J applications, let you specify configuration options that limit how much log file data is collected and saved.

  • Using Log File Archiving: Certain Oracle Collaboration Suite components let you specify configuration options to control the size of diagnostic logging directories. This lets you determine a maximum size for the directories containing a component's log files. When the maximum size is reached, older logging information is deleted before newer logging information is saved.

  • Setting Component Logging Levels: Certain Oracle Collaboration Suite components, including Oracle HTTP Server, allow administrators to configure logging levels. By configuring logging levels, the number of messages saved to diagnostic log files can be reduced. For example, you can set the logging level so that the system only reports and saves critical messages.

    See Also:

    Oracle Collaboration Suite component Administrator's Guides for information on setting logging configuration options.

Listing and Viewing Log Files with Oracle Collaboration Suite Control

Use the Oracle Collaboration Suite Control to list log files by selecting the Logs link on the Oracle Collaboration Suite Control Console. This brings up the View Logs page.

See Also:

"Using the printlogs Tool to View Log Messages" for information on a command-line tool for viewing log files

This section covers the following:

Listing Log Files for Components

Selecting the Logs link on the Oracle Collaboration Suite Control Console shows the View Logs page. To list the log files, from the View Logs page, perform the following steps:

  1. To view all components, select Move All to move all available components to Selected Components. To view some components, select them in the Available box and click Move.

  2. Select Search to list the log files for the selected components.

  3. After the search returns, the Results section shows log file information such as the name of the component associated with a log file and a link to the log file.

Figure 8-1 shows the Oracle Collaboration Suite Control Console View Logs page after a search.

Figure 8-1 Oracle Collaboration Suite Control Console View Logs Search Results

Enterprise Manager View Logs Search Results
Description of "Figure 8-1 Oracle Collaboration Suite Control Console View Logs Search Results"

Listing Log Files from Oracle Collaboration Suite Components Pages

After you select a system component link on the Oracle Collaboration Suite home page, you can view the log files for the selected component by clicking Logs at the top of the page. When you click Logs, the Oracle Collaboration Suite Control searches for the log files associated with the current component. You can then view the log files on the resulting View Logs page by selecting the Log File links shown in the Results section of the page.

For example, if you click Logs on the HTTP Server Home page, then Enterprise Manager searches for the log files associated with the Oracle HTTP Server and displays the View Logs page with a list of Oracle HTTP Server log files in the Results section of the page.

When you select the Logs link from a component page, the log file pages include a Return to link at the bottom of each page. The Return to link returns you to the component page from which you selected the Logs link.

Using Log Files Advanced Search

After you select the Logs link on an Oracle Collaboration Suite Control page, the View Logs page is shown. Clicking Advanced Search shows the View Logs Advanced Search page. The Advanced Search page lets you list log files for Oracle Collaboration Suite components and enables you to filter the search for log files by certain log file attributes.

Starting on the View Logs Advanced Search page you can list log files using a search filter by performing the following steps:

  1. Select the desired components from the Available Components box by clicking Move or Move All to move components to the Selected Components box.

  2. Select a field from the Log File Attribute list.

  3. Click Add Row to add a row for the selected log file attribute.

  4. Enter the desired search value in the Value field.

  5. If you want to select additional fields with values, click Add Another Row and enter additional values.

  6. Click Search to perform the search. When the search returns, the Results section shows log files with matching fields.

To obtain more information on filtering using log file attributes, click the information icon next to the Log File Attribute list.

Figure 8-2 shows the Advanced Search Filter By Log File Attributes selection box, with the Log File Attribute list and the Add Another Row button.

Figure 8-2 Log Files Advanced Search Filter By Log File Attributes

Log Files Advanced Search Filter By Log File Attributes
Description of "Figure 8-2 Log Files Advanced Search Filter By Log File Attributes"

Searching Diagnostic Messages in a Log Repository

The Oracle Collaboration Suite Control lets you search through diagnostic messages in a Log Repository containing messages collected from several Oracle Collaboration Suite components. The advantage of using a Log Repository is that you can search, view, and correlate diagnostic messages in a uniform way across multiple Oracle Collaboration Suite components.

This section covers the following topics:

Getting Started with Log Repository

To use a Log Repository for searching and viewing diagnostic messages, select the Logs link on an Oracle Collaboration Suite Control page and then select the Search Log Repository link. The Search Log Repository Simple Search and Advanced Search pages allow you to search the diagnostic messages stored in the Log Repository.

Figure 8-3 shows the Oracle Collaboration Suite Control Search Log Repository page.

The Log Repository needs to contain diagnostic messages before you can search the Log Repository. The Log Loader component initializes and updates the diagnostic messages in the Log Repository.

Note:

By default, the Oracle Collaboration Suite Log Loader is not started and does not contain any diagnostic messages.

See Also:

"Using Oracle Collaboration Suite Log Loader" for information on starting and using Log Loader

Searching Log Repository with Simple Search

To search the Log Repository for diagnostic messages, go to the View Logs > Search Log Repository page, and use the Available Components and Selected Components boxes to select components. The online help describes the available search and display options for the Search Log Repository page.

To search for diagnostic log entries in the Log Repository, do the following:

  1. Select components from the Available Components box (optional). Select components and then click Move or Move All to move the selected components to the Selected Components box. This step is optional.

  2. Use the default selections, or select the available search and result display options. The online help describes the available search and display options for the Search Log Repository page.

  3. Click Search to search for messages in the Log Repository that match the constraints you specify. When the search returns, the Results section shows the matching diagnostic log messages from the Log Repository.

    Figure 8-3 shows the Search Log Repository page.

Note:

The Message Type selection box includes the Unknown option. Some components do not include a message type when the component writes log file entries. These messages are loaded into the Log Repository with Unknown specified as the message type.

Figure 8-3 Search Log Repository Page

Search Log Repository Page
Description of "Figure 8-3 Search Log Repository Page"

Searching Log Repository with Advanced Search

To search the Log Repository for diagnostic messages using advanced search, go to the View Logs > Search Log Repository page, and click Advanced Search. On the Search Log Repository Advanced Search page, use the Filter By Log Entry Fields box to select log message fields and values to search. When you click Search, Enterprise Manager displays on the View Logs page a list of the log repository messages that match the log message field values you specified.

The View Logs pages shows the diagnostic log entries with matching field values which you enter after you click Search.

To display Log Repository entries matching the Advanced Search filter, perform the following steps:

  1. Use the default selections, or specify search and result date range and message type options by making selections and entering constraints on the Search Log Repository Advanced Search page.

  2. Select log entries with specified field values using the Filter by Log Entry Fields box. Select multiple fields by clicking Add Another Row. When you specify values for multiple fields, the search only returns results that match all of the specified constraints. The online help describes the available search and display options for the Search Log Repository page.

  3. Click Search to search for messages in the Log Repository that match the selection constraints. When the search returns, the Results section shows the matching log entries.

Figure 8-4 shows the Advanced Search Log Repository Filter By Log Entry Fields box.

Figure 8-4 Search Log Repository Advanced Search Filter By Log Entry Fields

Advanced Search Filter By Log Entry Fields
Description of "Figure 8-4 Search Log Repository Advanced Search Filter By Log Entry Fields"

Viewing Repository Log Entry Details

Using either the link shown in the Time field of the Results area on the View Logs page, or by selecting entries in the Select field and then selecting View Details, you can view a log entry and its associated information, including the Message Type, Component, the Message Text, and optionally the Execution Context ID (ECID).

Figure 8-5 shows a log entry details page.

Figure 8-5 Log Repository Log Entry Details Page

Log Repository Log Entry Details Page
Description of "Figure 8-5 Log Repository Log Entry Details Page"

See Also:

"Diagnosing Problems and Correlating Messages" for information on Execution Context IDs

Using Regular Expressions With Log Repository Search

Regular expression matching is applied when the checkbox in the Regular Expression field is selected on the Log Repository Simple Search or Advanced Search page. On the Simple Search page, the Regular Expression checkbox is under the Message Text field. On the Advanced Search page, the Regular Expression checkbox is in the Filter by Log Entry Fields box. Using a regular expression in a search enables you to enter a pattern description that enables you to match strings for a Log Repository search.

The Log Repository search uses the Apache Jakarta regular expression engine which uses "*" for a string of characters, "?" for a single character, and supports boundary matches, including "^" for a match only at the beginning of an entry, and "$" for a match only at the end of an entry, and special characters, including "\t" for Tab, "\n" for newline, "\r" for return, and "\f" for form feed.

See Also:

http://jakarta.apache.org/regexp for more information on supported regular expressions

Diagnosing Problems and Correlating Messages

Generally administrators and others view log file data to diagnose, monitor, and search for component errors or problems that may cause component errors. The Oracle Collaboration Suite Control Console supports a unified architecture and provides cross component tools that can assist you in these tasks.

This section covers the following topics:

Correlating Messages Across Log Files and Components

Certain Oracle Collaboration Suite components provide message correlation information for diagnostic messages. Message correlation information helps those viewing diagnostic messages determine relationships between messages across components. The Execution Context ID (ECID), is a globally unique identifier associated with a thread of execution. The ECID helps you to use log file entries to correlate messages from one application or across application server components. By searching related messages using the message correlation information, multiple messages can be examined and the component that first generates a problem can be identified (this technique is called first-fault component isolation). Message correlation data can help establish a clear path for a diagnostic message across components, within which errors and related behavior can be understood.

When you view an entry on the Log Entry Details page in the Oracle Collaboration Suite Control Console, if the Execution Context ID field is available, it displays the Execution Context ID as a link. Selecting the Execution Context ID link shows you all the diagnostic messages in the Log Repository with the same execution context ID.

You can use the ECID to track requests as they move through Oracle Application Server.

The ECID takes the following format:

request_id, sequence_number

The request_id is a unique integer that is associated with each request. The sequence_number represents the hop number of the request, as it passes through Oracle Collaboration Suite (or through the component). For example, OracleAS Web Cache assigns an initial sequence number of 0 to a request (when OracleAS Web Cache handles the request). After that, the sequence number is incremented as the request moves through Oracle Collaboration Suite components.

Table 8-1 lists the Oracle Collaboration Suite components that provide message correlation information (using an ECID).

Note:

Some Oracle Collaboration Suite components do not support generating message correlation data. Other Oracle Collaboration Suite components support generating message correlation data, but by default do not enable this option.

Table 8-1 Oracle Collaboration Suite Components Supporting Message Correlation

Component Message Correlation Configuration Reference

DCM

DCM supports message correlation.

OC4J

OC4J supports message correlation when ODL logging is enabled and when the property oracle.dms.transtrace.ecidenabled is set to the value true (by default this is false). This property is set on the OC4J command line.

See Also: "Configuring Components to Produce ODL Messages and ECIDs"

Oracle Application Server Containers for J2EE User's Guide for details on enabling ODL logging in OC4J

HTTP Server

Oracle HTTP Server supports message correlation.

See Also: "Configuring Components to Produce ODL Messages and ECIDs"

Portal

Portal supports message correlation. Portal outputs the ECID with error messages in the Portal Repository Diagnostics log file.

See Also: "Diagnosing OracleAS Portal Problems" Oracle Application Server Portal Configuration Guide.

Web Cache

Web Cache supports message correlation.

See Also: "Oracle-ECID Request-Header Field" in Chapter 2 of Oracle Application Server Web Cache Administrator's Guide


Diagnosing Component Problems

When an Oracle Collaboration Suite component has a problem you can isolate and determine the cause of the problem by viewing the diagnostic messages. There are general techniques that can assist you in accomplishing this task. In general, the techniques include the following:

  • Search for errors, or warnings, related to the problem

  • Correlate the errors across components

  • Correlate the errors across a time interval

  • Perform component based analysis

Using a Log Repository can make searching for the root cause of a problem much easier. A Log Repository consolidates log file data and enables you to easily search, correlate, and view log file data that is generated by multiple Oracle Collaboration Suite components. A Log Repository correlates cross component information by time, and correlates events that occur in a cascading fashion. Once a problem is isolated to a particular component in the repository, then, if needed, the problem can be further analyzed by examining the component-specific diagnostic files.

Using Oracle Collaboration Suite Log Loader

The Oracle Collaboration Suite Log Loader component is a process that periodically updates a Log Repository. A Log Repository stores diagnostic messages read from multiple log files across Oracle Collaboration Suite components in a single Oracle home. After the Log Loader starts, at regular intervals it reads the contents of log files incrementally and writes the contents to the Log Repository.

This section covers the following topics:

Starting and Stopping Log Loader

You can use the controls on the Oracle Collaboration Suite Control Console Log Loader page to start and stop the Log Loader. Starting the Log Loader starts a process that periodically updates the Log Repository. Stopping the Log Loader stops the process that periodically updates the Log Repository.

Note:

By default, when Oracle Collaboration Suite is installed, the Log Loader is stopped.

To start the log loader, perform the following steps:

  1. Select the Logs link on any Oracle Collaboration Suite Control Console page.

  2. From the View Logs page, select the Search Log Repository link.

  3. Select Log Loader on the View Logs page.

  4. On the Log Loader page, click Start.

  5. On the confirmation page click either Cancel, Start, or Start and Load Existing Logs. Click Cancel to cancel, click Start to start the Log Loader, and click Start and Load Existing Logs to start and initialize the log repository with the existing log messages.

Enabling and Disabling Log Loader

On the Log Loader page, the Enable button enables the Log Loader. By default, when you first install Oracle Collaboration Suite, the Log Loader is enabled, but not started. When you disable the Log Loader, Enterprise Manager stops the Log Loader and the Log Loader component does not appear in the list of components on the View Logs page.

When you enable the Log Loader, the Log Loader component appears in the components list on the View Logs page, but it is not started.

Updating the Log Configuration

When the Log Loader starts, it loads configuration information about the component log files it will use as sources for the diagnostic messages that are stored in the Log Repository (this includes information on the location and format of the log files).Most log configuration files are installed when Oracle Collaboration Suite components are configured. The log configuration files for HTTP Server, OPMN, OC4J and the Log Loader are generated when the Log Loader is initially started.If configuration changes are made that effect the location of diagnostic log files for these components, use the Update Log Configuration button to regenerate the log configuration files for these components. This will ensure the Log Loader is loading the correct set of logs into the Log Repository.

Setting Log Loader Properties

You can set Log Loader properties from the Log Loader page. To navigate to the Log Loader page:

  1. Select the Logs link on any Oracle Collaboration Suite Control Console page.

  2. From the View Logs page, select the Search Log Repository link.

  3. Click Log Loader on the View Logs page.

  4. Select the Log Loader Properties link in the Administration section. The Log Loader Properties page includes fields showing the current values for the Log Loader properties.

To change the Log Loader properties, perform the following steps:

  1. Enter updated values in the appropriate fields on the Log Loader Properties page.

  2. Click Apply to apply the new values.

Figure 8-6 shows the Oracle Collaboration Suite Control Console Log Loader Properties page.

The Oracle Collaboration Suite Control Console online help includes detailed information on the Log Loader Properties fields.

Figure 8-6 Log Loader Properties Page

Log Loader Properties Page
Description of "Figure 8-6 Log Loader Properties Page"

Understanding Log Loader Diagnostic Messages

The Log Loader logs its diagnostic messages, including errors to its log file. Diagnostic messages might include errors encountered due to an incorrect configuration, or errors that occur while the Log Loader is reading data from a log file or is writing data to the log repository.

The common Log Loader problems include:

  • Errors in the Log Loader configuration file ($ORACLE_HOME/diagnostics/config/logloader.xml). Errors in the configuration file usually prevent the Log Loader from running. Such errors need to be corrected before the Log Loader can work properly.

  • Configuration errors that occur when a component's registration file contains errors ($ORACLE_HOME/diagnostics/config/registration/*.xml). Errors in the registration files do not prevent the Log Loader from running but may prevent the contents of certain log files from being loaded in the repository. Typically, there are two common types of registration file errors:

    • XML syntax errors that prevent the file from being parsed. If such errors are encountered, the Log Loader completely ignores the contents of the file.

    • A wrong path specified for a configuration file. If the Log Loader cannot find a log file at the specified path, it issues a Warning level diagnostic message. This does not always indicate an error. For example, it is possible that the component that generates that log was not active when the Log Loader started and the log file had not been created yet. The Log Loader continues to look for the log file and starts reading messages when the log file is created.

  • Errors may occur while the Log Loader is reading messages from a log file. If the log file includes contents that cannot be read or parsed, then the Log Loader issues a log message indicating that it cannot read part of the contents of the file. In this case, the Log Loader attempts to recover from the error and continue to read the Log File.

  • Errors may occur when writing messages to the repository (for example, a disk error). This type of error may indicate a problem that may require attention from the system administrator to correct the problem.

  • The Log Loader produces an error message when it skips reading log files because a log file exceeds the currently specified maximum load size. The maximum load size can be specified on the Log Loader properties page.

    In this case the Log Loader logs an error message in the following format:

    Size of data to be read from log /logfile exceeds threshold of x bytes. Skipping y_skipped bytes and moving to end of log.
    
    

    This message indicates the size of data to be read exceeds the specified maximum load size x, and that the Log Loader is skipping to the end of the log file. The error message provides information on the name of the log file /logfile, and the number of bytes skipped y_skipped.

Advanced Logging Topics

This section covers the following topics:

Using the printlogs Tool to View Log Messages

The printlogs tool is a command-line alternative to the Oracle Collaboration Suite Control Console for viewing log messages. printlogs supports a variety of options for gathering and filtering log messages, and prints the results to standard output in a single format. For example, you can use printlogs to:

  • Read log messages from the Log Repository or individual log files

  • Filter log messages according to timestamp or log field value

  • Print log messages in ODL or text format

  • Sort log messages by field

  • Report the number of log messages of a specified type

  • Run in a continuous loop, printing log reports and sleeping for a specified amount of time

    See Also:

    Oracle Application Server Administrator's Guide Appendix F for more information

Understanding ODL Messages and ODL Log Files

This section covers the following topics:

ODL Message Contents

Using ODL, diagnostic messages are written to log files using XML format and each message includes a HEADER element containing information about the message, optionally a CORRELATION_DATA element containing information to assist in correlating messages across components, and a PAYLOAD element containing the message text including optional arguments and associated values.

Example 8-1 shows a sample ODL format message that includes the optional CORRELATION_DATA element.

Example 8-1 Sample ODL Message Content

<MESSAGE>
  <HEADER>
    <TSTZ_ORIGINATING>2002-04-01T18:38:48.058-08:00</TSTZ_ORIGINATING>
    <ORG_ID>oracle.com</ORG_ID>
    <COMPONENT_ID>OHS</COMPONENT_ID>
    <HOSTING_CLIENT_ID>0.0.255.255</HOSTING_CLIENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>17</MSG_LEVEL>
    <HOST_ID>test-perf9</HOST_ID>
    <HOST_NWADDR>0.0.255.255</HOST_NWADDR>
    <MODULE_ID>apache_core</MODULE_ID>
    <PROCESS_ID>5713</PROCESS_ID>
  </HEADER>
  <CORRELATION_DATA>
    <EXEC_CONTEXT_ID>
      <UNIQUE_ID>1017715128:255..255.255.88:5713:0:1</UNIQUE_ID>
      <SEQ>1</SEQ>
    </EXEC_CONTEXT_ID>
  </CORRELATION_DATA>
  <PAYLOAD>
    <MSG_TEXT>File does not exist:
 /files/Apache/docs/images/java-apache-project.gif
    </MSG_TEXT>
 </PAYLOAD>
</MESSAGE>

Table 8-2 describes the contents of an ODL message header. For any given component that produces ODL format messages, the optional header fields may not be present in the generated diagnostic messages.

Table 8-2 ODL Format Message Header Fields

Header Field Name Description Required

COMPONENT_ID

Specifies the product or component ID for the component that originated the message.

Required

HOST_ID

Specifies the DNS host network ID.

Optional

HOST_NWADDR

Specifies the IP or other network address for the originating host.

Optional

HOSTING_CLIENT_ID

Specifies the ID of the client or security group that the message relates to.

Optional

MODULE_ID

Specifies the ID for the module that originated the message.

Optional

MSG_GROUP

Name of the group the message belongs to, for purposes of selecting similar messages.

Optional

MSG_ID

Specifies the message ID. The message ID uniquely identifies the message.

Optional

MSG_LEVEL

Specifies an integer value that qualifies the message type (MSG_TYPE). Lower level values are for higher severity errors. Valid Values: 1 - 32

Optional

MSG_TYPE

Specify the type of the message, which is one of: INTERNAL_ERROR, ERROR, WARNING, NOTIFICATION, TRACE, UNKNOWN. If MSG_TYPE is included, the TYPE attribute is required when MSG_TYPE is included in the message header.

Required

ORG_ID

Specifies the organization ID, for the originating component. This is usually the domain name for the organization.

Optional

PROCESS_ID

Specifies the process ID for the process, or execution unit associated with the message. Java components may use this field to specify the process ID and the thread ID, or only the thread ID.

Optional

TSTZ_NORMALIZED

Timestamp normalized for clock drift across hosts. This field is used when the diagnostic message is copied to a repository in a different hosts.

Optional

TSTZ_ORIGINATING

Timestamp with local time zone. This specifies the date and time when the message was generated.

Required

USER_ID

Specifies the User ID associated with the message.

Optional


ODL Log File Naming

Using ODL, Oracle Collaboration Suite components write diagnostic log files to a logging directory. Components determine the names for logging directories using a component specific naming convention.

An ODL log is a set of log files that includes: the current ODL log file, typically named log.xml, and zero or more ODL Archives (segment files) that contain older messages. As the log file grows, new information is added to the end of the log file, log.xml. Each ODL log can specify a maximum segment size. When the log file reaches the maximum segment size, it is renamed and a new log file, log.xml is created (specify the maximum ODL segment size using component-specific configuration options).

Note:

Some Oracle Collaboration Suite components, including Oracle HTTP Server, do not support the ODL log file naming mechanism that this section describes. In Oracle HTTP Server, ODL diagnostic messages are written to a file, log.xml, that does not have a configurable size limit.

Segment files are created when the ODL log file log.xml reaches the maximum segment size. That is, the log.xml is renamed to logn.xml, where n is an integer, and a new log.xml file is created when the component generates new diagnostic messages.

To limit the size of the ODL log, components use a configuration option specifying the maximum size of the logging directory. Whenever the sum of the sizes of all of the files in the directory reaches the maximum, the oldest archive is deleted to keep the total size under the specified limit.

Note:

The most recent segment file is never deleted.

For example, when the maximum directory size is reached, with the starting segment file named log9872, the following files could be present in the log file directory:

File                        Size

log.xml                     10002
log9872.xml                 15000
log9873.xml                 15000
log9874.xml                 15000
log9875.xml                 15000
log9876.xml                 15000

In this case, when log.xml fills up, log9872.xml is removed and log.xml is moved to the new file log9877.xml; new diagnostic messages then are written to a new log.xml.

Using ODL provides the following benefits:

  • Limits the total amount of diagnostic information saved

  • Older segment files are removed and newer segment files are saved in chronological fashion

  • Components can remain active, and do not need to be shutdown, when diagnostic logging files are cleaned

Understanding Log Loader Log File Format Conversion

The Log Loader reads logs in several different formats and it converts the contents of non-ODL logs to ODL format. In most cases, the resulting ODL log record will contain only a timestamp and the message text from the original log entry. Values for other ODL message fields, such as COMPONENT_ID and MODULE_ID can be provided in the log registration file for each log, so that these values are set to all log records parsed from the log. The Log Loader attempts to determine the severity or level of each non-ODL log and generate an appropriate ODL message type. However, in many cases, if the severity or level cannot be determined, the resulting ODL log record will have the message type set to UNKNOWN.

The Log Loader can even read "unformatted" logs, that may not even contain timestamp values. This is the case for several logs in the $ORACLE_HOME/opmn/logs directory which contain redirected output from Oracle Collaboration Suite processes managed by Oracle Process Manager and Notification Server (including most Oracle Collaboration Suite applications). When log entries do not contain a timestamp, the Log Loader will set the timestamp to the value of the "last known timestamp" for that log. The value of the last known timestamp is determined according to the following rules:

  1. The initial value of the last known timestamp is zero. Note that whenever adding a log record to the repository, a zero value timestamp will be converted to the current time.

  2. If the Log Loader finds an Oracle Process Manager and Notification Server generated timestamp it will set the last known timestamp with its value.

  3. When the Log Loader reaches the end of the log, it sets the last known timestamp with the current time. If the Log Loader is running regularly, such as once every five minutes, this will result in timestamps that are approximate to the actual time the message was written within a five minute range. If the Log Loader is not run frequently, the value of these timestamps could be inaccurate.

    Note:

    The OC4J redirected logs found in the $ORACLE_HOME/opmn/logs directory are not treated as "unformatted" logs, since each line in the OC4J logs contains a timestamp. Most other logs in this directory are treated as unformatted logs, and will have timestamps assigned according to the preceding rules.

Component Diagnostic Log File Registration

The Oracle Collaboration Suite Control Console and the Log Loader read Oracle Collaboration Suite component diagnostic registration files to determine names, locations, and additional configuration information about diagnostic log files. The directory $ORACLE_HOME/diagnostics/config/registration contains the diagnostic log file registration files.

Oracle Collaboration Suite components may have multiple registration files in the configuration registration directory.

The format for the registration files includes a Oracle Collaboration Suite component ID, and extension, .xml. Table 8-3 lists the Oracle Collaboration Suite Components and their associated Component IDs.

Note:

Components are responsible for creating the component diagnostic registration files. Normally, Oracle Collaboration Suite administrators should not modify these files.

Table 8-3 Component IDs For Diagnostic Log File Configuration

Component Name Component ID

ADF

ADFBC

DCM

DCM

Discoverer

DISCOVER

Enterprise Manager

EM

HTTP Server

OHS

Infrastructure Database

RDBMS

Internet Directory

OID

Listener for Infrastructure Database

LISTENER

Log Loader

LOGLOADER

OC4J

OC4J

OPMN

OPMN

Port Tunneling

IASPT

Portal

PORTAL

Single Sign-On

SSO

TopLink

TOPLINK

Ultra Search

ULTRSRCH

Universal Installer

OUI

Voicemail & Fax

VMAILFAX

Web Cache

WEBCACHE

Oracle Mobile Collaboration


WIRELESS


Configuring Components to Produce ODL Messages and ECIDs

Table 8-4 lists the Oracle Collaboration Suite components that support ODL messages but that generate text messages by default. By making configuration changes, these components can be configured to produce ODL messages and for OC4J, an ECID.

This section covers the following topics:

Table 8-4 Oracle Application Server Components with Configuration Options for Supporting ODL

Component Default Format ODL Support LocationFoot 1 

HTTP Server

Text

Yes

ORACLE_HOME/Apache/Apache/logs

OC4J Instance

Text

Yes

ORACLE_HOME/j2ee/instance_name/log

ORACLE_HOME/j2ee/application-deployments/application_name/application.log


Footnote 1 Locations are shown in UNIX format. Invert the slashes for Windows format.

Configuring Oracle HTTP Server to Produce ODL Messages

To configure the Oracle HTTP Server to produce ODL messages, perform the following steps:

  1. Add a directory named oracle where the Oracle HTTP Server ODL messages will be stored. The directory should be located at the following location:

    (UNIX) ORACLE_HOME/Apache/Apache/logs
    (Windows) ORACLE_HOME\Apache\Apache\logs
    
    
  2. Using the Oracle Collaboration Suite Control or the dcmctl command line utility, modify the httpd.conf file to set the value of the OraLogMode and OraLogSeverity directives. Using the Oracle Collaboration Suite Control Console, from the Administration section of the HTTP_Server page select the Advanced Server Properties link. Specify the OraLogMode and OraLogSeverity directives in httpd.conf.

    For example:

    OraLogMode oracle
    OraLogSeverity NOTIFICATION
    
    
  3. Using the Oracle Collaboration Suite Control Console, restart the HTTP Server.

    See Also:

    Oracle HTTP Server Administrator's Guide for details on using the OraLogMode and OraLogSeverity directives

Configuring OC4J to Produce ODL Messages

The supplied configuration files for OC4J include commented out specifications for ODL logging. Enabling ODL logging in OC4J involves uncommenting the ODL configuration options and restarting the associated OC4J instance.

To change the ODL logging configuration for OC4J, use the Oracle Collaboration Suite Control Console to select the Administration link for the OC4J instance that you want to enable ODL logging. Then, select the Advanced Properties link to show the Advanced Server Properties page. On this page, edit the configuration files and uncomment the lines that contain the <odl> element.

See Also:

Chapter 3, "Advanced Configuration Development, and Deployment" in Oracle Application Server Containers for J2EE User's Guide

Configuring OC4J to Produce ECIDs

OC4J supports generating an Execution Context ID (ECID) for its log file entries. You can use the ECID to track requests as they move through Oracle Collaboration Suite, or through OC4J. By default ECID generation is disabled in OC4J.

To enable ECID generation in OC4J, set the Java command-line option -Doracle.dms.transtrace.ecidenabled=true.

To modify Java command line options using the Oracle Collaboration Suite Control Console, do the following:

  1. Select the Administration link on the OC4J Home Page of the tier instance of interest.

  2. Select Server Properties in the Instance Properties area.

  3. Scroll down to the Multiple VM Configuration section. This section defines the ports and the command line options for OC4J and for the JVM that runs OC4J processes.

  4. Under the Command Line Options area, add the following at the end of the Java Options text field:

    -Doracle.dms.transtrace.ecidenabled=true

  5. Click Apply.

Note the following when setting the oracle.dms.transtrace.ecidenabled property:

  • The default value for oracle.dms.transtrace.ecidenabled is false.

  • The property applies for the entire OC4J instance and it cannot be set to different values for different applications running on OC4J.

  • When ODL is enabled for OC4J and you specify oracle.dms.transtrace.ecidenabled=false, OC4J uses an ECID that is generated from within OC4J, rather than receiving the ECID from Oracle HTTP Server. When ODL is enabled for OC4J, all log messages should include an ECID.

    See Also:

    "Advanced Configuration Development, and Deployment" in Oracle Application Server Containers for J2EE User's Guide

Creating and Managing a Diagnostic Message Database Repository

You can use SQL scripts to create and manage a database repository for diagnostic messages. By creating a database repository for diagnostic messages, you can search, view, and correlate diagnostic messages across multiple Oracle Collaboration Suite tiers.

Use the following SQL scripts to create and manage a repository for diagnostic messages. The scripts are located in the following directory:

  • On Windows:

    ORACLE_HOME\diagnostics\admin
    
    
  • On UNIX:

    ORACLE_HOME/diagnostics/admin
    
    

The database that hosts the Log Repository can be an Oracle9i database or an Oracle Database 10g database.

Choose an Existing Tablespace or Create a New Tablespace

You can either use an existing tablespace for the repository or you can create a new tablespace. If you decide to create a new tablespace, connect to an Oracle database as an administrator and run the script dmrep_tablespace.sql. This script requires two arguments: the name of the tablespace to be created and the location of the tablespace datafile, for example:

SQL> connect sys as sysdba
...
SQL> @ORACLE_HOME/diagnostics/admin/dmrep_tablespace.sql dmrep ORACLE_HOME/diagnostics/repository/dmrep.dbf

Choose an Existing User or Create a New User

You can use an existing user or you can create a new user. If you decide to create a new user, connect to the Oracle database, containing the tablespace for the repository, as an administrator and run the script dmrep_user.sql. This script requires three arguments: name of the user, user password, and the default user tablespace. Use the tablespace you designated for the repository for the default user tablespace, for example:

SQL> @ORACLE_HOME/diagnostics/admin/dmrep_user.sql dmrepusr dmreppw dmrep

Create the Diagnostic Message Repository Schema

To create the diagnostic message repository schema, run the script dmrep_create.sql. Connect to the tablespace as the designated user, for example:

SQL> connect dmrepusr
...
SQL> @ORACLE_HOME/diagnostics/admin/dmrep_create.sql

Change the LogLoader Configuration To Use the Diagnostic Message Repository

In order for the LogLoader to load diagnostic messages into the repository, you must update the repository element in the logloader.xml file. To edit the repository element, you must know the Java Database Connectivity (JDBC) URL for the database hosting the diagnostic message repository. Replace the contents of the repository element with the following:

<repository>
   <database_repository
      url="jdbc:oracle:thin:@DB host:DB port:DB instance"
      user="dmrepusr"/>
</repository>

Replace the variables in the preceding example with the values for your installation. The repository password for your installation should be stored in a wallet in the LogLoader configuration directory. To store the password, use the following command:

ORACLE_HOME/diagnostics/bin/logloader -storePassword -user dmrepusr -pwd dmreppw

If your installation is part of an OracleAS Cluster, updating the LogLoader configuration in one instance of the cluster and then running the following command propagates the changes to the other instances in the cluster:

ORACLE_HOME/dcm/bin/dcmctl updateConfig -ct logloader

Removing Old Messages From the Diagnostic Message Repository

The script, dmrep_drop.sql, deletes messages that are older than a specified number of days, hours, minutes, or seconds. The script takes two arguments:

  • N, which is the number of units

  • Unit, which must be one of the following: DAY, HOUR, MINUTE, or SECOND

The following is an example of the script with arguments:

SQL> @ORACLE_HOME/diagnostics/admin/dmrep_cleanup.sql 7 DAY

Deleting the Diagnostic Message Repository

The script, dmrep_drop.sql, enables you to delete the schema for the diagnostic message repository. The following is an example of deleting the dmrep schema:

SQL> connect dmrepusr
...
SQL> @ORACLE_HOME/diagnostics/admin/dmrep_drop.sql

To delete the user and tablespace, connect to the databases an administrator and run the SQL commands for dropping a user and dropping a tablespace. The following is an example of dropping a user and tablespace including contents and datafiles:

SQL> connect sys as sysdba
...
SQL> drop user dmrepusr;
SQL> drop tablespace dmrep including contents and datafiles;

Limitations and Configuration

The Logs link in the Oracle Collaboration Suite Control Console gives you an integrated view of many Oracle Collaboration Suite component log files. However, certain log files are only available at the component level. Oracle Collaboration Suite components use the directory ORACLE_HOME/diagnostics/config/registration to make their log files visible to the Oracle Collaboration Suite Control Console. Some Oracle Collaboration Suite component log files are not exposed through Oracle Collaboration Suite Control Console pages.