Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Trace Connection (TRCCNN) command allows the tracing of encrypted data flowing over internet protocol (IP) and Secure Sockets Layer (SSL) connections. Specific types of traces are started and stopped by using this command.
TRCCNN uses the Trace Internal (TRCINT) command to collect the trace records and generate an intermediate spooled file named QPCSMPRT. The QPCSMPRT spooled file data is used to generate a spooled file named QSYSPRT. The user data for the QSYSPRT file is 'TRCCNN'.
You can use also use TRCCNN with a QPCSMPRT spooled file generated by using TRCINT directly. TRCCNN can extract and format the IP and SSL connection-related trace records. This allows you to use TRCINT to collect many types of trace records and then use TRCCNN to format the subset of trace records related to IP or SSL connections.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
SET | Trace option setting | *ON, *OFF, *END, *FORMAT | Required, Positional 1 |
TRCTYPE | Trace type | Values (up to 2 repetitions): *IP, *SSL | Optional |
TRCFULL | Trace full | *WRAP, *STOPTRC | Optional |
TRCTBL | Trace table name | Character value, *GEN | Optional |
SIZE | Size | Single values: *MAX, *MIN Other values: Element list |
Optional |
Element 1: Number of units | 1-998000, 16000 | ||
Element 2: Unit of measure | *KB, *MB | ||
FMTDTA | Trace data to be formatted | 72-99999, *CALC | Optional |
CCSID | Coded character set identifier | 1-65533, *EBCDIC, *ASCII | Optional |
JOB | Job name | Single values: * Other values: Qualified job name |
Optional |
Qualifier 1: Job name | Name | ||
Qualifier 2: User | Name | ||
Qualifier 3: Number | 000000-999999 | ||
SPLNBR | Spooled file number | 1-999999, *ONLY, *LAST | Optional |
JOBSYSNAME | Job system name | Name, *ONLY, *CURRENT, *ANY | Optional |
CRTDATE | Spooled file created | Single values: *ONLY, *LAST Other values: Element list |
Optional |
Element 1: Creation date | Date | ||
Element 2: Creation time | Time, *ONLY, *LAST | ||
TCPDTA | TCP/IP data | Element list | Optional |
Element 1: Protocol | *TCP, *UDP, *ICMP, *IGMP, *ARP, *ICMP6 | ||
Element 2: Local port | Values (up to 2 repetitions): 1-65535 | ||
Element 3: Remote port | Values (up to 2 repetitions): 1-65535 | ||
Element 4: Local IP address | Character value | ||
Element 5: Remote IP address | Character value | ||
Element 6: Line description | Name | ||
WCHMSG | Watch for message | Single values: *NONE Other values (up to 5 repetitions): Element list |
Optional |
Element 1: Message identifier | Name | ||
Element 2: Comparison data | Character value, *NONE | ||
Element 3: Compare against | *MSGDTA, *FROMPGM, *TOPGM | ||
WCHMSGQ | Watched message queue | Values (up to 3 repetitions): Element list | Optional |
Element 1: Message queue |
Single values: *SYSOPR, *JOBLOG, *HSTLOG Other values: Qualified object name |
||
Qualifier 1: Message queue | Name | ||
Qualifier 2: Library | Name, *LIBL | ||
WCHJOB | Watched job | Single values: * Other values (up to 5 repetitions): Element list |
Optional |
Element 1: Job name | Qualified job name | ||
Qualifier 1: Job name | Generic name, name | ||
Qualifier 2: User | Generic name, name | ||
Qualifier 3: Number | 000001-999999, *ALL | ||
WCHLICLOG | Watch for LIC log entry | Single values: *NONE Other values (up to 5 repetitions): Element list |
Optional |
Element 1: Major code | Character value, *ALL | ||
Element 2: Minor code | Character value, *ALL | ||
Element 3: Comparison data | Character value, *NONE | ||
WCHTIMO | Length of time to watch | 1-43200, *NOMAX | Optional |
TRCPGM | Trace program | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Trace program | Name | ||
Qualifier 2: Library | Name, *LIBL | ||
TRCPGMITV | Time interval | 1-9999, *NONE | Optional |
Top |
Specifies whether tracing is started, stopped or ended. Also, you can select to format trace record data collected previously using the TRCCNN or TRCINT (Trace Internal) command.
This is a required parameter.
Top |
If SET(*ON) is specified, identifies the types of trace records to start collecting. If SET(*FORMAT) is specified, identifies the types of collected trace records to format. Multiple trace types may be specified.
Top |
Specifies whether the trace records wrap (replace the oldest records with new records) or stop tracing when the trace table is full.
Top |
Specifies the trace table to hold the collected trace data.
Top |
Specifies the size of the trace table. The amount of storage to be allocated can be specified in units of kilobytes (*KB) or megabytes (*MB). If the size is specified in kilobytes, the amount of storage allocated for the table will be rounded up to the nearest megabyte. Valid table size values range from one megabyte to 258048 megabytes.
Note: The amount of storage specified by this parameter is immediately allocated from the system auxiliary storage pool (ASP 1). This storage space is not dynamically allocated as it is needed. This storage space will not be available for use by the system except to record trace-related information. Before specifying a large value on this parameter, the amount of free space in the system ASP should be checked. Use the Work with System Status (WRKSYSSTS) command to determine the amount of available free space in the system ASP. System performance degradation may result if the size of the free space in the system ASP is significantly reduced as a result of the value specified.
Note: If tracing data over a gigabit Ethernet line the trace table size should be greater than 128000 kilobytes or 128 megabytes.
Single values
Element 1: Number of units
Element 2: Unit of measure
Specifies whether the value specified for the first element should be treated as number of kilobytes or number of megabytes.
Top |
Specifies the number of bytes of traced data to be formatted.
Top |
Specifies whether the extended binary-coded decimal interchange code (*EBCDIC- 37) or the American National Standard Code for Information Interchange (*ASCII- 819) character code or any other is used for the formated output.
Top |
Specifies the name or qualified name of the job that created the input QPCSMPRT spooled file (SPLNBR parameter). This parameter is valid only if SET(*FORMAT) is specified.
Single values
Qualifier 1: Job name
Qualifier 2: User
Qualifier 3: Number
Top |
Specifies the file number of the QPCSMPRT spooled file from the job (JOB parameter) that created the spooled file. This parameter is valid only if SET(*FORMAT) is specified.
Top |
Specifies the name of the system where the job that created the spooled file (JOB parameter) ran. This parameter is considered after the job name, user name, job number, spooled file name and spooled file number parameter requirements have been met.
Top |
Specifies the date and time the spooled file was created. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number and job system name parameter requirements have been met.
Single values
Element 1: Creation date
Element 2: Creation time
Top |
Specifies whether a subset of TCP/IP and/or SSL trace data should be collected. Each parameter element is optional; if no element value is specified, no filtering of trace data is done for that element. For example, if *TCP is specified for element 1, only trace records where the TCP protocol is used are collected. If no value is specified for element 1, trace records using all TCP/IP protocols are collected.
Element 1: Protocol
Specify a TCP/IP protocol to be traced.
Element 2: Local port
Element 3: Remote port
Element 4: Local IP address
Element 5: Remote IP address
Element 6: Line description
Top |
Specifies up to five message identifiers which are to be watched for. If a value other than *NONE is specified, you must specify where to watch for the message on the WCHMSGQ parameter. When the watched for message is added to the specified message queue or log, the trace exit program is called; if no trace exit program is defined, the trace stops.
Single values
Element 1: Message identifier
Element 2: Comparison data
Specify comparison data to be used if a message matching the specified message ID is added to the specified message queue or log. If the message data, the "From program" or the "To program" includes the specified text, the watched for condition is true. If the message data, the "From program" or the "To program" does not contain the specified text, the trace function continues.
Element 3: Compare against
Specify which part of the message the comparison data specified for element 2 is to be compared against.
Top |
Specifies where to watch for the message identifiers specified on the WCHMSG parameter. You can specify to watch the message being added to the system operator message queue, the history log, other message queues, and job logs. Up to three message queues or special values can be specified.
Element 1: Message queue
Single values
Qualifier 1: Message queue
Qualifier 2: Library
Top |
Specifies the job whose job log is watched for the messages specified on the WCHMSG parameter. The specified job will only be watched if *JOBLOG is specified on the WCHMSGQ parameter. Up to five job names may be specified.
Single values
Element 1: Job name
Qualifier 1: Job name
Qualifier 2: User
Qualifier 3: Number
Top |
Specifies up to five licensed internal code (LIC) log entry identifiers which are to be watched for. Each LIC log entry contains a major and a minor code. The watched for condition will be met if a LIC log entry is added that matches the specified major and minor codes and any comparison data specified. When the watched for log entry is added to the LIC log, the trace exit program is called, even when the comparison data specified does not match; if no trace exit program is defined, the trace stops.
Single values
Element 1: Major code
Element 2: Minor code
Element 3: Comparison data
Specify comparison data to be used if a log entry matching the specified major and minor codes is added to the licensed internal code (LIC) log. If this text is found in the LIC log entry data fields of the watched for log entry, the watched for condition is true. If this text is not found in the LIC log entry data fields of the watched for log entry and no exit program is specified on the TRCPGM parameter, the trace function continues. If the log entry matches the specified major and minor codes and an exit program is specified on the TRCPGM parameter, but the entry data does not contain the specified text, the exit program is called to determine if the trace should continue or stop.
When watching for an exception ID, all four hexadecimal digits of the exception ID must be specified. Also, the prefix MCH may be specified if you want to compare only against the exception ID field and avoid possible substring matches with the other fields.
Top |
Specifies the time limit, in minutes, for watching for a message or a licensed internal code (LIC) log entry. When the specified amount of time has elapsed, the trace exit program is called (if one was specified on the TRCPGM parameter), the trace is ended, and message CPI3999 is sent to the system operator message queue.
Top |
Specifies the program to be called for user-defined trace commands and procedures.
The trace program will be called:
There are three input parameters and one output parameter associated with the trace program. The four parameters are required:
1 Trace option setting Input Char(10) 2 Reserved Input Char(10) 3 Error detected Output Char(10) 4 Comparison data Input Char(*)
Allowed values for the "Trace option setting" parameter are:
The "Reserved" parameter must be set to blanks.
Allowed values for the "Error detected" parameter are:
Allowed values for the "Comparison data" parameter when *MSGID is specified for the "Trace option setting" parameter will be the following structure:
OFFSET TYPE FIELD Dec Hex 0 0 BINARY(4) Length of trace information 4 4 CHAR(7) Message ID 11 B CHAR(9) Reserved 20 14 BINARY(4) Offset to comparison data 24 18 BINARY(4) Length of comparison data * * CHAR(*) Message comparison data
Allowed values for the "Comparison data" parameter when *LICLOG or *CMPDATA is specified for the "Trace option setting" parameter will be the following structure:
OFFSET TYPE FIELD Dec Hex 0 0 BINARY(4) Length of trace information 4 4 CHAR(4) LIC Log major code 8 8 CHAR(4) LIC Log minor code 12 C CHAR(8) LIC Log identifier 20 14 BINARY(4) Offset to comparison data 24 18 BINARY(4) Length of comparison data * * CHAR(*) LIC log comparison data
Allowed values for the "Comparison data" parameter when *ON, *INTVAL or *WCHTIMO is specified for the "Trace option setting" parameter will be the following structure:
OFFSET TYPE FIELD Dec Hex 0 0 BINARY(4) Length of trace information (always 4).
For more information on the trace exit program interface, refer to the System API Reference information in the iSeries Information Center at http://www.iseries.ibm.com/infocenter .
Single values
Qualifier 1: Trace program
Qualifier 2: Library
Top |
Specifies how often the trace exit program will be called.
Top |
Example 1: Starting SSL Traces
TRCCNN SET(*ON) TRCTYPE(*SSL)
This command starts tracing for Secure Sockets Layer (SSL) connections.
Example 2: Starting IP Traces
TRCCNN SET(*ON) TRCTYPE(*IP)
This command starts tracing for connections at the internet protocol (IP) level.
Example 3: Stopping Traces and Clearing Trace Storage
TRCCNN SET(*END)
This command stops all traces and deletes the trace table. No spooled output is generated.
Example 4: Printing Traces
TRCCNN SET(*OFF)
This command stops all traces and generates a spooled file (QPCSMTRC) that contains the trace records collected by the TRCINT (Trace Internal) command, and a spooled file (QSYSPRT) that contains the formatted trace data.
Example 5: Formatting Trace Data from TRCINT Command
TRCINT SET(*ON) TRCTYPE(*SCK) TRCINT SET(*OFF) TRCCNN SET(*FORMAT) TRCTYPE(*SSL) JOB(*) SPLNBR(*LAST)
The TRCINT (Trace Internal) commands are used to start collecting trace records related to all usage of sockets, and to stop collecting trace records and create a spooled file named QPCSMPRT. The TRCCNN command will use the trace information in the last spooled file named QPCSMPRT for the current job, and format the trace records related to SSL (Secure Sockets Layer) in a spooled file named QSYSPRT.
Example 6: Specifying a Trace Table
TRCCNN SET(*ON) TRCTYPE(*IP) TRCTBL(USER)
This command starts tracing for connections at the internet protocol (IP) level and stores the trace data in the USER trace table.
Example 7: Specifying a Trace Table Size in Megabytes
TRCCNN SET(*ON) TRCTYPE(*IP) SIZE(20000 *MB)
This command starts tracing for connections at the internet protocol (IP) level and stores the data in a 20000-megabyte trace table.
Example 8: Specifying a CCSID for Trace Data
TRCCNN SET(*OFF) CCSID(*ASCII)
This command stops all traces and generates a spooled file (QSYSPRT). ASCII (819) CCSID will be used when formatting the trace data.
Example 9: Start a Trace and Watch for a Message to End the Trace
TRCCNN SET(*ON) TRCTYPE(*IP) WCHMSG((MCH2804)) WCHMSGQ((*SYSOPR) (*JOBLOG)) WCHJOB((*ALL/MYUSER/MYJOBNAME)) TRCPGM(MYLIB/TRCEXTPGM)
This command starts tracing for connections at the internet protocol (IP) level. The trace will be ended when MCH2804 message is found on the System Operator message queue or within the *ALL/MYUSER/MYJOBNAME job log. Also, MYLIB/TRCEXTPGM is specified as a trace exit program.
Example 10: Start a Trace and Watch for a LIC Log Entry to End the Trace
TRCCNN SET(*ON) TRCTYPE(*IP) WCHLICLOG(('99??' 9932 MYJOBNAME)) WCHTIMO(*NOMAX)
This command starts tracing for connections at the internet protocol (IP) level. The trace will be ended when a Licensed Internal Code (LIC) log entry that has a major code starting with 99 and a minor code of 9932 is generated on the system. Also, the LIC log information should contain the text "MYJOBNAME". *NOMAX on WCHTIMO parameter indicates that the trace will be active until the event occurs or TRCCNN command is issued manually to end the trace.
Top |
Top |