CP TRSOURCE TYPE LAN Command
CP TRSOURCE ID traceid SET traceset TYPE LAN {options}where: - ID traceid
- the identifier for the trace. Trace ID is a user-defined, alphanumeric, 1- to 8-character string.
- SET traceset
- is a user-defined, alphanumeric, 1- to 8-character string; it identifies the trace set that includes the specified trace ID.
- TYPE LAN
- specifies this is a trace for a virtual switch or guest LAN.
OPTIONS
- OWNER ownerid
- the owner of the guest LAN or virtual switch. If the ownerid is SYSTEM, then it is owned by the system and not an virtual machine.
- LANNAME lanname
- the name of the guest LAN or virtual switch to be traced.
- VLAN ALL
- all VLAN ids will be traced. Since this trace is initialized from a class C user, no VLAN authorization is needed in order to see all VLAN traffic.
- VLAN vlan
- up to 4 specific VLAN ids can be specified. Only the packets for the VLAN ids specified will be captured.
- LENGTH 512
- 512 is the default. When no length option is specified, 512 bytes of data will be captured and recorded.
- LENGTH FULL
- 2048 bytes of data will be captured and recorded. This is the maximum amount of data that can be traced per packet.
- LENGTH #ofbytes
- a number between 64 and 2048 can be specified. It represents the amount of data to be captured and recorded.
- NIC userid vdev
- userid is the user ID of the guest virtual machine to be traced. vdev is the virtual device belonging to the guest virtual machine being traced. Only traffic flowing inbound or outbound on the specified NIC (user ID vdev combination) will be captured and recorded.
- TRUNK
- only packets which have passed in or out of the OSA RDEV related to the VSWITCH will be recorded. If TRUNK is specified on a guest LAN, no data will be captured.
- DROPPED
- only packets that have been dropped or discarded will be captured. When this option is not specified, all packets regardless of successful delivery are recorded.
- NIC userid vdev
- TRUNK
- DROPPED
If it is necessary to capture data on the same guest LAN or virtual switch using combinations of these options, define multiple TRSOURCE trace ids for the same OWNER LANNAME combination.
For a complete syntax diagram, see z/VM: CP Commands and Utilities Reference.
Figure 1 is an example using the TRSOURCE TYPE LAN feature to capture only dropped packets on VLAN 3 or 4 for the virtual switch owned by SYSTEM named testvsw.

CP TRSOURCE ID testid TYPE LAN OWNER SYSTEM LANNAME testvsw VLAN 3 4 DROPPED
- LAN segment defined by VSWITCH testvsw
- Traffic for both VLANs 3 and 4
- All packets dropped by this VSWITCH
CP TRSOURCE ENABLE ID testid
CP TRSOURCE DISABLE ID testid
When tracing is to be stopped, the trace id must be disabled. Once disabled, the captured data will be in a TRF file which can now be processed by TRACERED. The trace id must be disabled before TRACERED can process the TRF file.
Once the trace has been disabled, the data can be processed by TRACERED. The spool id is needed for input to TRACERED. The spool id is obtained through the Query TRF ALL. Figure 5 shows the query and TRACERED command needed to process the TRSOURCE trace and write the results to a CMS file named TESTVSW TRCDATA.
Q TRF ALL
OWNERID FILE TYPE CL RECS DATE TIME FILENAME FILETYPE ORIGINID
OPERATOR 0008 TRF A 0002 06/08 12:37:09 5 testvsw LAN SYSTEM
Ready;
TRACERED 8 CMS TESTVSW TRCDATA (ALL
For more information on TRACERED, see z/VM: CP Commands and Utilities Reference.
The resulting file can be viewed in the original hex form (see Figure 6) or formatted using the IPFORMAT tool. For detailed information on the IPFORMAT tool, see z/VM: TCP/IP Diagnosis Guide.
-------------------------- 06/08/05 12:37:14.130495 -------------------
.130495 0250BD21 BABEBE43 F76AFFFF 02000000 0134E2E8 SPID 0008
E2E3C5D4 4040E5E2 E6E3D9C1 C3E8E3C3 D7C9D740
40402D02 00010000 00FFE400 00000000 00000106
00000000 00000114 00000001 00000000 00000000
00000000 00000A06 03024500 01140002 00003C01
63D90A06 03010A06 03020800 32200102 00000F32
BD73238A 4810BBDB 7D501FB6 26CC8C83 FDB3182A
E8564A84 F66F7585 1934D926 A1207713 7D7CB819
30B0BC4D 944B83FD 52D3BE58 1D4E73DD B18D5384
8F3BDBAD 75A92DCC 9F57ABD2 C042595A BFF0F098
323CC102 9BE150BC 65C9ACC4 9C138FE2 6FE63A4D
67F90F1D 65DEEB75 5E11496C D5C418C0 1B685739
49FB76DE FA146DDB C9B0992D 8EBA5913 575C6C35
28080991 7345BB29 563A036E 97FCAC6A 5F97ECB1
B9DE3F05 CAF303CC CE95D432 D72CA51E 4496A3D6
02AFCA71 85A24300 85F3847B 7948266D D4FA855F
025F1A06 21D5972C 808FC75E D81F245A 4CC73537
227FAE52 3FC646FC 642956E5 2B943647 BF5C57D2
5E08205B 90E30000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000
00000000 00000000 0000