WebSphere Tutorial · Running WebSphere in Production · Lesson 19 of 23

Logs, FFDC and Tracing

Where WebSphere writes logs, what First Failure Data Capture is, and how to turn on trace safely.

Members can save this page, take notes and track progress. See membership · Sign in

Log files

Runtime Main logs
Liberty logs/messages.log (and console), logs/trace.log, logs/ffdc/
Traditional WAS SystemOut.log, SystemErr.log, native_stdout.log, trace.log, ffdc/ (or HPEL binary logs viewed with logViewer)

Every message has an ID (CWWKZ0001I, WSVR0605W, J2CA0045E) whose last letter is the severity (I, W, E); searching IBM's documentation for the ID explains it.

FFDC

First Failure Data Capture writes details of unexpected exceptions to the ffdc directory automatically: often the most useful evidence after an incident, so collect it with the logs.

Trace

Trace adds detail per component, for example com.ibm.ws.jdbc.*=all. It's heavy: enable it on one server, for a short time, with a narrow specification. Liberty sets it with <logging traceSpecification="..."/>; traditional WAS in the console or wsadmin, at run time without restart.

Counting warning and error message IDs to see what's going onTry it yourself
from collections import Counter

lines = ["W WSVR0605W thread hung", "E J2CA0045E connection not available", "E J2CA0045E connection not available",
         "I CWWKZ0001I app started", "W WSVR0605W thread hung", "E J2CA0045E connection not available"]
counts = Counter(line.split()[1] for line in lines if line[0] in "WE")
for msg_id, n in counts.most_common():
    print(f"{msg_id}: {n}")

Output

J2CA0045E: 3
WSVR0605W: 2

Test yourself

What does FFDC capture?

  1. Every HTTP request
  2. Details of unexpected exceptions the first time they occur
  3. Configuration backups
  4. GC pauses
Show answer

Answer: Details of unexpected exceptions the first time they occur

FFDC files are valuable evidence for support cases and incidents.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake