Formatting event trace records for TCP/IP stacks and Telnet
You can format event trace records using IPCS panels or a combination of IPCS panels and the CTRACE command. For a description of the relevant IPCS panels, see Steps for formatting component traces using IPCS panels.
For more information about other CTRACE options, see the z/OS MVS IPCS Commands.
When using an IPCS panel, enter the trace types in
the following format:
option DUCB() CID()
Following is the syntax for the CTRACE command for TCP/IP stacks and Telnet. For more information about the command and IPCS, see the z/OS MVS IPCS User's Guide.
.------. V | >>-OPTIONS--((----Type-+----------------------------------------> >--+---------------------------------------+--------------------> | .-----------------------. | | V | | '-ADDR--(----control_block_address-+--)-' >--+-------------------------------+----------------------------> | .---------------. | | V | | '-DUCB--(----process_index-+--)-' >--+--------------------------------------+---------------------> | .-----------------------. | | V | | '-CID--(----connection_identifier-+--)-' >--+------------------------------+-----------------------------> | .------------. | | V | | '-IPADDR--(----ip_address-+--)-' >--+-----------------------------+------------------------------> | .-------------. | | V | | '-PORT--(----port_number-+--)-' >--+----------------------------------------------------+-------> | .----------------------------------. | | V | | '-RECORD--(----record_number--+---------------+-+--)-' '-record_number-' >--+----------------------------+--))-------------------------->< | .-DETAIL--. | '-SESSION--(--+-SUMMARY-+--)-'
- Type Name
- The name of a trace type. Only records of these types are formatted. For a list of types, see Table 1.
- ADDR
- A control block address. Up to 16 control block addresses can be specified. Addresses in hexadecimal should be entered as x'hhhhhhhh'.
- DUCB
- A process index for the thread of execution. Up to 16 indexes can be specified. The DUCB index values can be entered either in decimal (such as DUCB(18)) or hexadecimal (such as DUCB(X'12')), but are displayed in hexadecimal format.
- CID
- A connection identifier. Up to 16 identifiers can be specified. The CID values can be entered in either decimal (such as CID(182)) or hexadecimal (such as CID(X'0006CE7E')), but are displayed in hexadecimal. This is the same value that appears in the NETSTAT connections display.
- IPADDR
- An IP address. Up to 16 addresses can be specified. IPv4 addresses are in dotted decimal notation, for Example: 192.48.24.57. IPv6 addresses are in colon-hexadecimal notation or in a combination of both colon-hexadecimal and dotted decimal for IPv4-mapped IPv6 addresses, for example: beef::c030:1839. Use an IP address of 0 for trace records that do not have an IP address. A subnet mask is indicated by a slash (/) followed by the prefix length in decimal or by a dotted decimal subnet mask for IPv4 addresses. The prefix length is the number of one bits in the mask. For IPv4 addresses it might be in the range of 1 - 32; for IPv6 addresses it might be in the range of 1–128, for example: 192.48.24/24 or 2001:0DB8::0/10
- PORT
- A port number. Up to 16 port numbers can be specified. The port numbers can be entered in decimal, such as PORT(53), or hexadecimal, such as PORT(x'35'), but are displayed in decimal. These are port numbers in the range 0–65535. Use a port number of 0 for trace records that do not have a port number.
- RECORD
- The record number can be specified as a single hexadecimal value (for example, x'hhhhhhhh') or as a range (for example, x'hhhhhhh':x'hhhhhhhh'). The record number is assigned as the records are written and can be found on the line of equal signs (=) that separates each record.
- SESSION(DETAIL|SUMMARY)
- Generate a report that shows TCP and socket send/receive activity
on a per-session basis. This formatting option operates on TCPMIN
and PFSMIN trace entries.Tip: The SESSION formatting option for SYSTCPIP traces is useful for analyzing TCP traffic that is flowing over an IPSec tunnel. If you are accustomed to using packet trace (SYSTCPDA) for diagnosis, IPSec encryption of TCP headers and insertion of AH|ESP headers can result in an inability to do TCP-layer diagnosis (for example, matching up ACKs with data packets, spotting retransmissions, analyzing flow control issues) with the packet trace report. By contrast, the SESSION formatting option for SYSTCPIP trace operates on TCP headers in the clear before encryption and after decryption, so this report can be more informative than a standard packet trace if encryption is involved or AH|ESP headers are present.
- DETAIL
- List each inbound or outbound flow within the socket and TCP layers. If neither the PFSMIN or TCPMIN CTRACE options were enabled in the trace, a null report is produced. DETAIL is the default.
- SUMMARY
- Show only the summary statistics.
Figure 1 shows the beginning of the CTRACE formatted output. The CTRACE command parameters are followed by the trace date and column headings. Then, there is one TCP/IP CTRACE record with four data areas.
Figure 1. Start of component trace full format
COMPONENT TRACE FULL FORMAT
COMP(SYSTCPIP)SUBNAME((TCPSVT))
**** 11/03/1999
SYSNAME MNEMONIC ENTRY ID TIME STAMP DESCRIPTION
------- -------- -------- --------------- -------------
1 VIC142 PFS 60010018 14:57:59.207826 Socket IOCTL Exit
2 HASID..001E PASID..000E SASID..001E USER...OMPROUTE
3 TCB....007E7A68 MODID..EZBPFIOC REG14..161D86C0 DUCB...0000000C
4 CID....0000003A PORT.....0
IPADDR. 3F98::D002:A521
5 ADDR...00000000 14D9EED0 LEN....000000A0 OSI
6 +0000 D6E2C940 000000A0 00000000 00000000 | OSI ............ |
+0010 0500001B 14D9EF70 00500AC8 00000000 | .....R...&.H.... |
+0020 00000000 00000000 00000000 00000000 | ................ |
+0030 00000000 00000000 00000000 00281080 | ................ |
+0040 14D9FC0C 00000C00 14D9FFE8 00000000 | .R.......R.Y.... |
+0050 00000000 00000000 00000000 00000000 | ................ |
+0060 00000000 00000000 00000000 00000000 | ................ |
+0070 00000000 00000000 00000000 00000000 | ................ |
+0080 00000000 00000000 00000000 00000000 | ................ |
+0090 00000000 00000000 00000000 00000000 | ................ |
ADDR...00000000 12D7F874 LEN....00000004 SCB Flags
+0000 00280000 | .... |
ADDR...00000000 12E88598 LEN....00000010 Return Value Errno ErrnoJr
+0000 C5D9D9D5 FFFFFFFF 00000462 740E006B | ERRN..........., |
ERRNO..-1, 462, 740E006B
ADDR...00000000 14D9F4E4 LEN....00000048 IOCTL Request
+0000 C3C6C7D4 D9C5D840 0000008E 00000462 | CFGMREQ ........ |
+0010 00000320 00000500 00000000 00000000 | ................ |
+0020 740E0005 00000000 14B4C7C0 00000000 | ..........G{.... |
+0030 00000000 00050063 00000000 00000000 | ................ |
+0040 F3F1F0F1 00000000 | 3101.... |
7 ====================================================================0000573E
The parts of the TCP/IP CTRACE record are:
- 1 Standard IPCS header line, which includes the system name (VIC142), TCP/IP option name (PFS), time stamp, and record description.
- 2 TCP/IP header line with address space and user (or job name) information.
- 3 TCP/IP header line with task and module information.
- 4 TCP/IP header line with session information (CID, IP address, and port number).
- 5 TCP/IP header line for a data area. This line has the address (first four bytes are the ALET), the length of data traced, and the data description. Following the description, the actual data is in dump format (hexadecimal offset, hexadecimal data, and EBCDIC data).
- 6 There are four data areas in this example. The third data area (Return Value Errno ErrnoJr" has an extra line. The ERRNO line is added only when the return value is -1 and the ERRNO indicates an error. In this example, the return code is hexadecimal 462 (decimal 1122). See z/OS Communications Server: IP and SNA Codes for more information.
- 7 TCP/IP trailer and separator line with the record sequence number (hexadecimal 573E).