Previous Page Contents Page Next Page

Appendix A: Using snafilter and snatrcfmt

Some types of tracing create binary output. SNAP-IX provides tools for filtering and formatting these binary files. This appendix describes how to:

A.1 Filtering Binary Tracing

The snafilter utility enables you to select specific entries from an unformatted, internal trace file so that you can extract only the information you need to diagnose a particular problem. For example, if the trace file contains many different trace types (messages traced at different interfaces within SNAP-IX), you can select only messages of a particular type or remove all messages of a particular type. If the trace file contains data from many different APPC or LUA sessions, you can include or exclude messages associated with a particular APPC application or session.

If the trace file contains NLP or RTP frame data from HPR connections, note that snafilter does not filter out these trace types.

Note

You can use snafilter on a line trace file as well as on an internal trace file, or on a single file that contains both types of tracing.

Some of the snafilter options apply only to internal tracing and have no effect on line tracing; this is indicated in the description of each option. Where no mention is made of line tracing, the option applies to both trace types.

The output of snafilter is in a binary format that is suitable for processing by snatrcfmt.

A.1.1 Running the snafilter Utility

The syntax for the command to run the trace filter utility is as follows:

snafilter [-f 
infilename] [-o outfilename
] [options]

Specify the following options and parameters:

-f infilename

The input trace file. If you do not use this option, snafilter uses sna1.trc as the default.

-o outfilename

The output trace file. If you do not use this option, snafilter uses snafil.trc as the default.

Include only messages of the type or types specified (the message types you can specify correspond to the message types described in Controlling Internal Trace Files). Set tracetype to to turn on tracing of all types, or specify one or more of the following values. If you want to specify two or more trace types, separate the values with commas, and do not include space characters before or after the commas.

  • APPC

  • FM

  • LUA

  • NOF

  • MS

  • DLC

  • LLC2

  • MAC

  • LLI

  • SDLC

  • NLI

  • HPRIP (for Enterprise Extender links)

  • NDLC (node to DLC messages)

  • NODE

  • SLIM (messages sent between master and backup servers in a client-server system)

  • DGRM (SNAP-IX internal control messages)

Do not specify both and . If you do not specify either option, the default is .

If the trace file contains both DLC line tracing and internal tracing, you can use to include only the DLC line tracing.

Exclude messages of the type or types specified. The tracetype option is the same as for , except that is not valid.

Do not specify both and . If you do not specify either option, the default is .

If the trace file contains both DLC line tracing and internal tracing, you can use to exclude the DLC line tracing.

Include APPC messages with the specified transaction program (TP) ID (in hexadecimal); exclude other APPC messages. This option has no effect on messages other than APPC messages. To specify more than one TP ID, separate them with commas.

Do not specify both and .

This option has no effect on line tracing.

Exclude APPC messages with the specified TP ID (in hexadecimal).

Do not specify both and .

This option has no effect on line tracing.

Include APPC or CPI-C messages with the specified conversation ID (in hexadecimal); exclude other APPC or CPI-C messages. This option has no effect on messages other than APPC or CPI-C messages. To specify more than one conversation ID, separate them with commas.

Do not specify both and .

This option has no effect on line tracing.

Exclude APPC or CPI-C messages with the specified conversation ID (in hexadecimal).

Do not specify both and .

This option has no effect on line tracing.

Include LUA messages with the specified session ID (in hexadecimal); exclude other LUA messages. This option has no effect on messages other than LUA messages. To specify more than one session ID, separate them with commas.

Do not specify both and .

This option has no effect on line tracing.

Exclude LUA messages with the specified session ID (in hexadecimal).

Do not specify both and .

This option has no effect on line tracing.

Include DLC messages with the specified local-form session identifier (LFSID); exclude other DLC messages. This option has no effect on messages other than DLC messages.

The LFSID consists of a 2-character OAF (aa) in hexadecimal, a 2-character DAF (bb) in hexadecimal, and a one-character ODAI (c), formatted in the same way as they are used in messages flowing from the local node. You can use the wildcard characters xx instead of aa or bb, and you can use x instead of c. To specify more than one LFSID, separate them with commas.

This option controls messages in both directions on the session; you cannot filter on messages in a single direction only. For example, if messages flowing from the node have OAF = 01, DAF = 02, and ODAI = 1, messages flowing to the node on the same session will have OAF = 02, DAF = 01, and ODAI = 1. Specifying includes messages flowing in both directions on this session.

You can use both of the options and .

Exclude DLC messages with the specified LFSID.

You can use both of the options and . For example, to include all messages with DAF 0x0a except those with OAF 0x0b, specify +lfsid xx0ax -lfsid 0bxxx.

Include node and SDLC messages with the specified component instance ID (in hexadecimal); exclude other nodeand SDLC messages. This option has no effect on messages other than node and SDLC messages.

The component instance ID is a SNAP-IX internal identifier that distinguishes between different users or programs using the same component. To specify more than one component instance ID, separate them with commas.

Do not specify both +npid and -npid.

This option has no effect on line tracing.

Exclude node and SDLC messages with the specified component instance ID (in hexadecimal).

Do not specify both +npid and -npid.

This option has no effect on line tracing.

-start yymmddhhmmss

Include only messages traced after the specified date (year, month, day) and time (hours, minutes, seconds). For example, 3:45 p.m. (15.45) on 11 August 1997 is

970811154500
.

You can specify both and to include only messages between the specified times. The end time you specify must be later than the start time.

-end yymmddhhmmss

Exclude messages traced after the specified date and time. Use the same format as -start.

You can specify both and to include only messages between the specified times. The end time you specify must be later than the start time.

A.1.2 Sample Command and Output

The following sample trace command illustrates some of the command options:

snafilter -f new.trc -o newout.trc +point APPC,NOF,DLC -lfsid 0a021 +convid 0100000a

This command does the following:

  • Takes input from the file new.trc

  • Sends the output to the file newout.trc

  • Includes only APPC, NOF, and DLC messages

  • Excludes DLC messages with LFSID 0a021

  • Includes only APPC messages with conversation ID 0100000a

The output file then contains the following:

  • All APPC messages with the specified conversation ID

  • All NOF messages

  • All DLC messages except those with the specified LFSID

You can then format this filtered output by using the snatrcfmt command, which is explained in the next section.

Previous Page Contents Page Top of Page Next page