2008-07-21

How to read weblogic tlog files ?

What are tlog files ?

Tlog files are the files used by weblogic to keep a trace of current transactions.

For example, when an instance is restarted, the tlog files are used to perform the second step of a two-phase commit on a transaction that was in progress.

Sometimes, when a transaction is corrupted, you've got to delete thes files to get rid of the phantom transaction.

There is no need to restart a server to have them recreated.

Where are they located ?

Tlog files are created for every server. You can thus find some in your server directory.

Ex : myDomain / servers / myServer / logs

 

clip_image002

How to read them ?

These files are not human-readable. But BEA provides a tool to decrypt them.

This tool is very useful to have a trace of running transactions, and know what's going on on your server.

Like every other tool BEA provides, it's part of the package "weblogic".

It can be found :

  • on WLS 8.1 and below, in the weblogic.jar
  • on WLS 9 and above, in the module com.bea.core.transaction_2.0.1.0.jar

Usage: java weblogic.transaction.internal.TransactionLoggerImpl <server_tlog_path>
<server_tlog_path> - path of server transaction log files
e.g. /weblogic/config/mydomain/myserver/myserver

 

To use it, I would advise to go directly where the tlog files are and type the following command :

\user_projects\sample\myserver > java weblogic.transaction.internal.TransactionLoggerImpl myserver

The result of this command should display something like that :

 

image

image

image

 

If available, the information will be displayed like shown below :

 

clip_image002[7]

 

Mots clés Technorati : ,,

3 comments:

TF said...

At least with weblogic 10 it's
'java weblogic.transaction.internal.StoreTransactionLoggerImpl'

you need those Jar-files in the classpath:
com.bea.core.transaction_2.0.1.0.jar
com.bea.core.store_1.0.1.0.jar
(both in the 'modules' directory)
weblogic.jar

Ravi Bhardwaj said...

I tried the above command for 10.3, it works but the command prompt hangs after that. Is that because i don't have transaction files or do we have do something after we run that command.

Also i would like to know is there any way where we can see are pending transactions. It can be command or any tab on console. I am using 10.3. Please help!

Ravi Bhardwaj said...


I tried the above command for 10.3, it works but the command prompt hangs after that. Is that because i don't have transaction files or do we have do something after we run that command.

Also i would like to know is there any way where we can see are pending transactions. It can be command or any tab on console. I am using 10.3. Please help!