The WebSphere Application Server logging and tracing


This article basically helps to developers and administration to enable or disable different types of logging and tracing in the IBM WAS.

1.1 Logging and Tracing:

a.    We can specify where log data will be stored
b.    Choose a format for log content.
c.    Also specify a log detail level for components and groups of components.
d.    Can select an application server to enable or disable a system log for that server as show in below screen shot:


Steps to select the preference for no of items to be displayed based on authorization group level: where PreferencesàMaximum rows and Select authorization group levelàAll Roles or Administratoràclick on applyàclick on Server1
Reset button is used to reset the selected values for Preferences and authorization groups.

1.2 JVM Logs

Select logging and tracingàserver1àJVM logs


1.    Use this page to view and modify the settings for the Java virtual machine (JVM) System.out and System.err logs for a managed process.
2.    The JVM logs are created by redirecting the System.out and System.err streams of the JVM to independent log files.
3.    The System.out log is used to monitor the health of the running application server.
4.    The System.err log contains exception stack trace information that is used to perform problem analysis.
5.    One set of JVM logs exists for each application server and all of its applications.
6.    JVM logs are also created for the deployment manager and each node manager.
7.    Changes on the Configuration panel apply when the server is restarted.
8.    Changes on the Runtime panel apply immediately.
Select filename, File formatting, Log file rotation file size , time , historical log and application print statement files as shown in above and below screenshot.
Finaly click on ok to save changes to Master configuration

RUNTIME PANEL:

1.2.1 SystemOut.log file Sample output:

C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\SystemOut.log
1.    WebSphere Platform 8.5.5.3 [BASE 8.5.5.3 cf031430.01] running with process name SINCBP89225LNode01Cell\SINCBP89225LNode01\server1 and process id 7760

2.    Host Operating System is Windows 7, version 6.1

3.    Java version = 1.6.0, Java Runtime Version = pwa6460_26sr8ifx-20140630_01 (SR8), Java Compiler = j9jit26, Java VM name = IBM J9 VM
4.    was.install.root = C:\Program Files (x86)\IBM\WebSphere\AppServer

5.    user.install.root = C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01

6.    Java Home = C:\Program Files (x86)\IBM\WebSphere\AppServer\java\jre



1.2.2 SystemError.log file:


C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\SystemErr.log

1.3    Process Logs:


2.    The process logs are created by redirecting the standard out and standard error streams of a process to independent log files.
3.    Native code writes to the process logs.
4.    These logs can also contain information that relates to problems in native code or diagnostic information written by the JVM.
5.    One set of process logs is created for each application server and all of its applications.
6.    Process logs are also created for the deployment manager and each node manager.
7.    Changes on the Configuration panel apply when the server is restarted.
8.    Changes on the Runtime panel apply immediately.
General Properties:
Logging and tracing > server1>Process Logs
Change the log file name as required and click on ok to save the changes to master configuration
Runtime Panel for IBM Process Logs

1.3.1 Stdout.Log file path:

C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\native_stdout.log
Sample Output:
[9/14/14 18:39:01:283 SGT] 00000001 ManagerAdmin  I   TRAS0018I: The trace state has changed. The new trace state is *=info.
[9/14/14 18:39:01:442 SGT] 00000001 ManagerAdmin  A   TRAS0007I: Logging to the service log is disabled
[9/14/14 18:39:01:494 SGT] 00000001 ProviderTrack I com.ibm.ffdc.osgi.ProviderTracker AddingService FFDC1007I: FFDC Provider Installed: com.ibm.ffdc.util.provider.FfdcOnDirProvider@57be793c
 
 

1.3.2 Stdout.Log file path:

C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\native_stderr.log
Sample Output:
************ Start Display Current Environment ************
Log file started at: [9/14/14 18:39:01:529 SGT]
************* End Display Current Environment *************
JVMDUMP034I User requested Java dump using 'C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\javacore.20140914.190932.8484.0001.txt' through com.ibm.jvm.Dump.JavaDump
JVMDUMP010I Java dump written to C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\javacore.20140914.190932.8484.0001.txt
JVMDUMP034I User requested Heap dump using 'C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\heapdump.20140914.191033.8484.0002.phd' through com.ibm.jvm.Dump.HeapDump
JVMDUMP010I Heap dump written to C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\heapdump.20140914.191033.8484.0002.phd
************ Start Display Current Environment ************
Log file started at: [9/15/14 0:54:42:425 SGT]
************* End Display Current Environment *************
************ Start Display Current Environment ************
Log file started at: [9/15/14 1:49:43:516 SGT]
************* End Display Current Environment *************
************ Start Display Current Environment ************
Log file started at: [9/15/14 23:38:13:167 SGT]
************* End Display Current Environment *************
************ Start Display Current Environment ************
Log file started at: [9/16/14 0:59:34:676 SGT]
************* End Display Current Environment *************
************ Start Display Current Environment ************
Log file started at: [9/17/14 18:52:24:414 SGT]
************* End Display Current Environment *************
************ Start Display Current Environment ************
Log file started at: [9/19/14 20:18:34:798 SGT]
************* End Display Current Environment *************

 

1.4 IBM Service Logs:

1.     IBM service log, also known as the activity log.
2.    The IBM service log contains both the application server messages that are written to the System.out stream and special messages that contain extended service information that you can use to analyze problems.
3.    One service log exists for all Java virtual machines (JVMs) on a node, including all application servers and their node agent, if present.
4.    A separate activity log is created for a deployment manager in its own logs directory.
5.    The IBM Service log is maintained in a binary format.
6.     Use the Log Analyzer or Showlog tool to view the IBM service log.
Logging and tracing > server1 > IBM Service Logs > click on Ok > click on save >changes to master configuration

1.4.1 Log file Path:



Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\activity.log

1.4.2 Change Log Level Details:

1.       Use log levels to control which events are processed by Java logging.
2.       Click Components to specify a log detail level for individual components, or click Groups to specify a log detail level for a predefined group of components.
3.        Click a component or group name to select a log detail level. Log detail levels are cumulative; a level near the top of the list includes all the subsequent levels

Select the component name > Message and Trace Levels >Message Levels and Trace level as show in below screenshot
Similarly for Group components:

Correlation: Enable log and trace correlation so entries that are serviced by more than one thread, process, or server will be identified as belonging to the same unit of work
Finally click on save to make changes in the master configuration

2. NCSA access and HTTP error logging


Logging and tracing > server1 > NCSA access and HTTP error logging
Use this page to configure HTTP error logs and National Center for Supercomputing Applications (NCSA) access logs. File Path: C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\http_access.log

Enabling HTTP error log as shown in below screenshot

2.1 Log File Path:

 C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\http_error.log
Finally click on save to make changes in the master configuration


2.2 Diagnostic trace service

Logging and tracing > server1 > Diagnostic trace service
1.    To view and modify the properties of the diagnostic trace service.
2.     Diagnostic trace provides detailed information about how the application server components run within this managed process.
3.    Changes on the Configuration panel apply when the server is restarted. Changes on the Runtime panel apply immediately.

Finally click on save to make changes in the master configuration
Runtime Panel:
C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\trace.log

2.3 Trace Log output:



2.4 Configuration Problem:


It shows the problem that exist in the present configuration: You can select Maximum, High, Medium, low and none. And also enable cross validation.



2.5 Java dumps and cores


This is used to generate heap dumps, Java cores or system dumps for a running process. The files resulting from these operations are placed on the local file system as shown in the screenshot:
Java HeapDump file path: C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\ heapdump.20140923.183711.7760.0001
Select server > click on Heap dump


Post Heap Dump generation:

Similarly for Java core/thread dump and System Dump
Java core: Core dump file path will be: C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\ javacore.20140914.190932.8484.0001.txt

No comments:

Post a Comment