InfoCenter Home >
8: Problem determination >
8.8: Using internal tools >
8.8.1: Log Analyzer

8.8.1: Log Analyzer

The Log Analyzer takes one or more activity logs, merges all of the data, and displays the entries. Based on its "symptom database," it analyzes and interprets the error conditions in the log entries to help you debug problems. Log Analyzer has a special feature enabling it to download the latest symptom database from the IBM Web site.

About the Log Analyzer

A Log Analyzer quite similar to the one available for use with IBM WebSphere Application Server is available with IBM Component Broker, part of the Enterprise Edition of IBM WebSphere Application Server.

The main differences between the Log Analyzer available with WebSphere Application Server and the Component Broker Log Analyzer are the following:

  • The Log Analyzer for Advanced Edition is capable of downloading the latest symptom (properties/logbr/symptoms/[adv/std/wcs]/symptomdb.xml) from the IBM support site. Use the file -> Update Database -> Adv Symptom Database option in the Log Analyzer interface to take advantage of this feature.
  • The functions for ORB trace formatting, minor codes, message IDs and GPF are not supported for Advanced Edition
  • The script for starting the Log Analyzer is in a different location (see below for instructions)
  • The default directory for opening logs for Advanced Edition is the logs directory.

About the activity log

The application server creates the activity.log file from the activity of the various WebSphere Application Server components. Log Analyzer is used to view the activity.log file. Log Analyzer can merge activity.log files, or any other valid logs files into one log file. The activity.log file is a binary file located at:

product_installation_root/logs/activity.log

The activity.log cannot be easily viewed using a text editor. The Log Analyzer is the tool for viewing the file.

Using the Log Analyzer

To view the activity.log using the Log Analyzer:

  1. Change directory to:
    product_installation_root/bin
    
  2. Run the waslogbr script file, which is called:
    • waslogbr.bat.bat on Windows NT
    • waslogbr.sh.sh on UNIX systems
    It needs to be run from the bin directory cited above.

    This will start the Log Analyzer graphical interface.

  3. In the interface:
    1. Select File-> Open.
    2. Navigate to the directory containing the activity.log file.
    3. Select the activity.log file.
    4. Select Open.

Related tasks

In the course of using the Log Analyzer, you might need to perform the following tasks.

Setting the maximum activity.log file size

When using Log Analyzer, you might have to set the maximum activity.log size. The activity.log file grows to a predetermined size, then wraps. The default size is 1 MB.

To change the activity log size:

  1. Open the properties file in a text editor:
    product_installation_root/properties/logging.properties
    
  2. For the com.ibm.ws.ras.ActivityLogSize property, specify the value you would like, in Kilobytes (KB).

    If an individual size is entered, the default size is used.

Syntax example:

  • To change the log size to 2MB, enter in the line:
    com.ibm.ws.ras.ActivityLogSize=2048
    
    without any spaces in it.

The size change will take effect at the next server startup.

If the size of the activity log is changed, careful consideration must be given to the new size because the computational resources needed to support a larger log must also increase. Remember these tips:

  • As the size of the activity log is increased, the time required to write the message to the log increases. For large log sizes, this can cause a noticeable decrease in performance.
  • Viewing large activity logs can increase the space required in the system's temporary directory.
  • Viewing large activity logs can increase the amount of required paging space.
  • Log Analyzer might not be able to successfully view larger activity logs. If the activity log is too larger, the Log Analyzer can encounter a java.lang.OutOfMemory condition. The activity log can be successfully viewed using the showlog tool.

For these reasons, it is recommended that the size of the activity log never exceed 16 MB. If you intend to use the Log Analyzer to merge multiple activity logs in a single view, the size of all logs combined should not exceed 16 MB.

Changing the port of the logging service

The logging service starts automatically at server startup. It requires the use of a dedicated port. The default port is 1707.

To change the port value:

  1. Stop all application servers and the WebSphere administrative server. (If you do not stop a server, it will not pick up the property change until it is stopped and started again).
  2. Open the properties file in a text editor:
    product_installation_root/properties/logging.properties
    
  3. For the SHARED_LOG_LOCK_PORT property, specify the value you would like.
  4. Start the application and administrative servers that you stopped.

Syntax example:

  • To change the port to 1708, specify:
    SHARED_LOG_LOCK_PORT=1708
    

If the port is in use by another application, the logging service might not be able to start or might not function correctly. The activity.log file will not be created or updated correctly.

To diagnose a port conflict, perform these heuristic checks:

  • Check to see if the activity.log file has been created, and check the timestamp of the file.
  • Check these files:
    product_installation_root/<server_name>_stderr.log
    product_installation_root/logs/adminserver_stderr.log
    
    
    Note: The above paths are the default locations of the files. The administrator might have configured different locations.

    Look for a stack trace such as the following:

    java.lang.Exception: Unable to obtain Shared Log Lock on port1707
    at com.ibm.ejs.ras.SharedLogBase.acquireHostLock(SharedLogBase.java:187)
    at com.ibm.ejs.ras.SharedLogWriter.<init>(SharedLogWriter.java:130)
    at com.ibm.ejs.ras.SharedLogWriter.getInstance(SharedLogWriter.java:100)
    at com.ibm.ejs.ras.Tr.initialize(Tr.java:241)
    at com.ibm.ejs.sm.server.ManagedServer.main(ManagedServer.java:121)
    

Viewing an activity.log file in the absence of a graphical interface

The Log Analyzer cannot be used to view remote files. If the operating system on which you are running WebSphere Application Server does not support the use of a graphical interface, then transfer the file in binary to the system on which you are running the WebSphere Java administrative console. Use the Log Analyzer tool there.

In cases in which transferring the file is impractical or inconvenient, an alternate tool named "showlog" is provided for viewing the activity.log file:

  1. Change directory to:
    product_installation_root/bin
    
  2. Run the showlog tool with no parameters to display the usage instructions:
    • On Windows NT, run showlog.bat
    • On UNIX systems, run showlog.sh

Syntax examples:

  • To direct the activity log contents to stdout, use the invocation:
    showlog activity.log
    
  • To dump the activity.log to a text file that can be viewed using a text editor, use the invocation:
    showlog activity.log textFileName
    
Go to previous article: Using Internal Tools Go to next article: Thread Dumps

 

 
Go to previous article: Using Internal Tools Go to next article: Thread Dumps