Network Deployment (Distributed operating systems), v8.0 > Reference > Log and trace file descriptions


LogViewer command-line tool


Overview

Use logViewer.sh to query the contents of the HPEL log and trace trace repositories.


LogViewer

The HPEL facility writes to the log and trace repositories in a binary format. We can view, query and filter the repository using logViewer.sh

Options for converting HPEL logs into a text file...

The command also provides options to make getting the data you need from the logs easier; for example, allowing you to filter what log records you want by...


logViewer.sh parameters

-repositoryDir directory_name

Path to the repository directory. Default location is used if one is not provided.

    PROFILE_ROOT/logs/application_server/
If run from $WP_PROFILE/bin, the repositoryDir parameter is not required.

When querying both the log and trace data together, provide the path to the parent directory.

If multiple application servers exist in this profile with HPEL repositories, you are prompted to select which server log and trace repository to view.

-outLog file_name

File name to write text output. If not provided, displayed to console.

-format basic | advanced | cbe-1.0.1

Output format...

  • basic
  • advanced
  • CBE-1.0.1

Default is basic format.

-monitor [interval]

Continuously monitor the repository and output new log record entries as they are created.

Optional integer argument after the parameter specifies how often to query the repository for new records. Default is 5 seconds. When used with other filtering options, only those new records that match the filter criteria are displayed.

-help

List the full set of options that are available.

-startDate date_time

Filter the results that are displayed from the repository by date and time. Filter out log entries that occurred before the date or date time provided as an argument. Provide either a date or date and time, entered in the MM/dd/yy format or the MM/dd/yy H:m:s:S format.

-stopDate date_time

Filter out log entries that occurred after the specified date or date time. Provide the argument in the same format as the -startDate option.

-level level_name

Display those log events which match the level name provided as an argument. Valid values are FINEST, FINER, FINE, DETAIL, CONFIG, INFO, AUDIT, WARNING, SEVERE, FATAL.

-minLevel level_name

Display records which are at or above the specified level. Valid values for the level name are FINEST, FINER, FINE, DETAIL, CONFIG, INFO, AUDIT, WARNING, SEVERE, FATAL.

-maxLevel level_name

Display records that are at or below the specified level. Valid values for the level name are FINEST, FINER, FINE, DETAIL, CONFIG, INFO, AUDIT, WARNING, SEVERE, FATAL.

-includeLoggers logger_names

Only log events from the specified loggers are included in the LogViewer output. Separate multiple entries with a comma. The * symbol can be used as a wild card to include all loggers below a parent logger. When used in combination with the -excludedLoggers option, the more specific match determines if the log event is included or excluded.

-excludeLoggers logger_names

Exclude log events from the specified loggers in the LogViewer output. Separate multiple entries with a comma. The * symbol can be used as a wildcard to include all loggers below a parent logger. When used in combination with the -includeLoggers option, the more specific match determines if the log event is included or excluded.

-thread thread_ID

Restrict LogViewer output to only those log events from a specific thread. Any log messages that were not created by the thread ID provided as an argument to this option are not displayed. Specify the thread ID in hex format.

-extractToNewRepository directory_name

Redirect log and trace records from a binary repository to a new binary repository at the location specified. Use this option with other filtering options to get a subset of log and trace records into the new repository. Uses the directory path where the new repository must be written as an argument. Therefore, the directory must be empty. If the directory does not exist, the directory is created. However, errors that occur during the directory creation might create extraneous directories.

-listInstances

List the IDs of available server process instances that are available to use with the -instance option. After running LogViewer with the -listInstances option, you can then use the -instance option to invoke LogViewer with one of the server process instance IDs as an argument. Since this option does not process any log or trace records, all other options are ignored when you specify this option.

-instance instanceId

Retrieve the log and trace data for a given server process instance by providing the server instance ID.

To obtain a valid instance ID.

    LogViewer -listInstances

Required when viewing logs and trace from an environment that contains subprocesses, such as the z/OS operating system.

If this option is combined with -latestInstance, -instance is ignored.

-latestInstance

Retrieve the log and trace data from the most recent server instance. If this option is used with the -instance option, the -instance option is ignored.

-message match_string

Retrieve only log or trace data with a message field that matches the requested text.


Filtering considerations

Be aware of LogViewer filtering optimizations. The LogViewer tool is able to filter log and trace data most efficiently when used with the following filter options:


Examples

+

Search Tips   |   Advanced Search