Oracle client tracing

needed to trace a client session today as we have some transactions occuring from the application which intermittently fail for an unknown reason.

so I used these parameters

TRACE_LEVEL_CLIENT= 16
TRACE_DIRECTORY_CLIENT = c:\temp\
TRACE_FILE_CLIENT= client.trc
TRACE_TIMESTAMP_CLIENT = ON
TRACE_UNIQUE_CLIENT = ON

however i became stumped – this was an Oracle 11g system and nothing was being created.

wasn’t until  remembering this parameter that my local trace was being created:
DIAG_ADR_ENABLED=off

 

the reason? I forgot about ADR- Automatic Diagnostic Repository

ref  : http://docs.oracle.com/cd/B28359_01/server.111/b28310/diag001.htm

Using Wireshark to trace packets

Recently been using wireshark to determine network activity when using multicasting – is proved invaluable to helping to track down some application features.

Wireshark is a great free tool available from http://www.wireshark.org/

Image

Use wireshark to sniff the network.  Download here

to start a trace:

  1. define filter – see examples below
  2. menu – capture/interfaces.  Select interfaces you wish to trace :  wireshark_interfaces
  3. press start

The filter is all powerful, change it to do what you need!

examples

trace UDP traffic only for a define port

here, we want to trace all UDP traffic on ports 7980 and 6980
So, the filter will be ” udp.port==7980 or udp.port==6980″
wireshark_udp_example

show all traffic originating from a given IP and being sent to another IP

Set the filter to be ip.dst==xxx.xxx.xxx.xxx&&ip.src==xxx.xxx.xxx.xxx

example

wireshark_example2

Eg ip.dst==230.6.8.1&&ip.src==172.27.98.15   .  ie i used this example to show all traffic sent from my source machine (.15) onto the multicast pool address (230.6.8.1).