Jump to content

PDGuide - Viewing and Analyzing Error Log Entries

From EDM2
Problem Determination Programmer's Guide
  1. Introduction to Collecting and Managing Problem Determination Data
  2. Guide to Instrumenting Your Code
  3. Controlling FFSTProbe Calls
  4. Viewing and Analyzing Error Log Entries
  5. Analyzing Performance and Debugging Problems Using Trace
  6. Capturing and Saving Failure-Related Information through Dumps
  7. The Desktop Management Interface
  8. Summary of Functions and Interfaces
  9. Problem Determination APIs

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

This chapter assumes that you have read the information and are familiar with the defined terms in Guide to Instrumenting Your Code.

This chapter describes error logging and the error log formatter that is used to format, display, and analyze error information.

When your program encounters an error, the FFSTProbe API records information about the error in the system error log.

This chapter refers to the following types of error logs:

Active error log
The name of the log that is currently used. When you suspend logging, the system will not write entries to the active error log.
Default error log
The system uses this log after you power on the system. The system assumes this log until you specify another log to work with.
Current error log
The error log that a user is currently working with.

What is an Error Record?

An error record is created by the system when an error in a system or application program triggers a probe in that program. Error records contain detailed information to help you diagnose the error. Error records are also called DET1 records. Records created by a back level logging system are called DET4 records.

What is a Control Record?

A control record is created by the system when you make changes to the way errors are logged. For example, when you suspend error logging or direct error logging to a new file, the system records that change in a control record. Control records are also called DET2 records. Control records are new for FFST technology and are not available in records created by a back level logging system.

Controlling Error Logs by Using the SYSLOG Command

Use the SYSLOG command and its various parameters to access the SYSLOG utility. If you do not specify parameters when you use the command, the system loads the active system error log and displays the SYSLOG Summary window (see Working with the Error Log and Controlling Error Logging). If the system cannot find the file name you requested, SYSLOG displays a message.

If logging is not active, an error message will be shown stating

 "The OS/2 Logging Facility device driver LOG$ is not
  loaded.  To activate logging enter DEVICE=\OS2\LOG.SYS
  and RUN=\OS2\SYSTEM\LOGDAEM.EXE in config.sys and reboot.

The available parameters of the SYSLOG command are as follows:

Parameter Action

/V: <error log pathname>

Use this parameter with the error log pathname to access the error log. If you specify no pathname, the system accesses the active error log.

/S:<error log pathname>

Use this parameter to suspend error logging. Note that when you use this parameter, the system writes an error log entry to the current active error log that indicates that you suspended logging.

/R:<error log pathname>

Use this parameter to resume error logging to the suspended file. If the system cannot find the pathname, the system does not resume logging. If the system finds the pathname but cannot find the error log file, the system creates the error log file and resumes logging. Note that when you use this parameter the system writes an error log entry to the current active error log that indicates that you resumed logging.

/P:<error log pathname>

Use this parameter to redirect error logging to another error log. Note that when you use this parameter the system writes an error log entry to the current active error log that indicates you redirected logging. The error log entry contains the pathname of the error log file that logging was directed from and the pathname of the error log file that logging was directed to.

/W:xx

Use this parameter along with the /P parameter and the error log pathname to change the maximum size (xx) of the specified error log. The default size of the error log is 64 KB.

Viewing Error Log Contents by Using SYSLOG

SYSLOG is also a function you use to view the contents of an error log entry. This function resides in the Problem Determination Tools folder.

SYSLOG supports formatting and viewing error log entries created either from the DosProbe or FFSTProbe APIs. Entries created by DosProbe will not have as much data

You can start SYSLOG by any of the following methods:

  • Clicking on the SYSLOG icon that is located in the Problem Determination Tools folder of the OS2 System folder.
  • Using the SYSLOG command without any parameters. The Problem Determination Users Guide in the Problem Determination Tools folder describes the SYSLOG command.
  • Dragging an error log file and dropping it onto the SYSLOG icon.

If you drop multiple error log files onto the SYSLOG icon, the system starts a separate session of the formatter for each file.

You can select another error log file to view by selecting the Open... choice of the File pull-down option within SYSLOG. The active file appears as the default. You can change the file name to any other error log.

You can select which error log entry to view by double clicking on an error log entry. SYSLOG windows contain the following system error log information:

  • A summary panel containing an entry for each error log record in a given error log file with limited information on each.
  • One or more panels containing detailed information on specific error log entries.
  • A browseable pop-up window containing the header information for the error log being viewed.
  • An entry into the PM Dump Facility dump formatter tool using parameters the error log record contains.
  • An entry into the trace formatter tool using the parameters that are contained in the error log record.
  • An entry into the Modify Enter Collection tool used to change data-collection parameters.

In addition to its display capabilities, SYSLOG also provides controls to change the system parameters that pertain to logging. Use the controls to do the following:

  • activate logging
  • suspend active logging
  • redirect logging
  • increase the maximum size of the error log file.

The following information describes the SYSLOG Summary window and explains how you use SYSLOG to view, change, and control the error log and error log contents.

Working with the Error Log and Controlling Error Logging

       File Choices
       Edit Choices
       View Choices
           Refresh Now
           Header
           Error Details
           Search Choice
           All Records
           Active Log Name 
       Action Choices
           Suspend/Activate Logging
           Redirect Logging
           Change Log Size 
       Displaying Error Log Entry Data 

Accessing Error-Log Information through Functions

       Event Notification 

Remote Error Reporting

       Building and Sending an Indication