Filtering options when recording the trace
- Component
- Required - SYSTCPIP for SOCKAPI.
- Subtrace
- Required - TCP/IP stack name.
- Trace option
- Highly recommended to limit the tracing to the SOCKAPI option. You can also filter on this option when formatting the trace.
- Jobname
- Highly recommended for socket applications to limit the trace to one application. You can also filter on this option when formatting the trace.
- ASID
- Highly recommended as an alternative to the job name if the application has already started running (otherwise, the ASID is unknown). You can also filter on this option when formatting the trace.
- IP address
- Recommended only for certain scenarios (see discussion below). The IP address is a filtering option when formatting the trace.
- Port
- Recommended only for certain scenarios (see discussion below). The port number is a filtering option when formatting the trace.
Use the IP address and Port options to filter the trace, both when collecting the trace and when formatting the trace. Generally, it is best to collect all the application records to avoid having to re-create the problem. After the records are collected, you can filter the records various ways when formatting the trace.
An example scenario in which you would only want to collect records for one IP address is if there is a problem with a particular remote client, and the local application has many clients. If you tried to record the trace records for all clients, there could be a lot of data and the trace could wrap, thus overwriting older records. Note that if you specify an IP address when collecting the trace, the trace records with no IP address are also collected. So you get all the records for the problem client, and some other client records.
An example scenario, in which you would only want to collect records for one port number, is if there is a problem with a server on one port. If you specify a port number when collecting the trace, the trace records with no port number are also collected. You get all the records for the problem server application, and some other applications' records.
Socket call | Filtering active? | |
---|---|---|
Local port | Remote IP address | |
|
Yes | No (1) |
|
Yes/No (2) | No |
|
Yes/No (3) | Yes |
|
No | No |
|
Yes | No |
|
Yes | Yes |
- Even though the remote IP address is available after an ACCEPT call, it is not used for filtering the exit ACCEPT trace record. This is done to avoid confusion where the entry trace record for ACCEPT would not be filtered, but the exit trace record would.
- Assumes a BIND issued for a nonzero port. If a BIND is issued for port 0 (meaning an ephemeral port is assigned by TCP/IP), no filtering takes place for this BIND call.
- If the socket is bound at the time of the CONNECT, local port filtering is honored. Otherwise, the CONNECT is not subject to local port filtering.