Network Deployment (Distributed operating systems), v8.0 > Reference > Log and trace file descriptions
LogViewer command-line tool
Use logViewer.sh to query the contents of the HPEL log and trace trace repositories.
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...
- Common Base Event
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...
- logger name
- date and time
- -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...
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.
- 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.
- 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.
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.
- 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.
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:
- Write all records in the default repository between July 19th, 2009 and August 2nd, 2009 to a file called /tmp/promo.logs.
logViewer.sh -outLog /tmp/promo.logs -startDate 07/19/2009 -stopDate 08/02/2009
- Display new records whose specified level is WARNING or higher using the advanced format as the server writes them to the log repository.
logViewer.sh -monitor -minLevel WARNING -format advanced
- Write only those log messages that were written to the error stream of a specific repository to a file called logged_errors.txt.
logViewer.sh -repositoryDir /apps/server1/logs -includeLoggers SystemErr -outLog logged_errors.txt
- View events from the default repository that occurred before September 14th, 2009 4:28 PM eastern daylight time.
logViewer.sh -stopDate "09/14/2009 16:28:00:000 EDT"