bpxtrace activates and deactivates tracing for one or more processes. It can be run from the z/OS® UNIX shell or the TSO environment. The captured syscall trace output is dependent on the system-wide setting for SYSOMVS CTRACE options and the amount of z/OS UNIX activity on the system when the bpxtrace command is issued.
Guideline: When using SYSOMVS CTRACE, always specify the minimal setting. Otherwise, when you run bpxtrace to capture syscall data, the amount of the output might be reduced.
Restriction: A single user can run bpxtrace only once at any given time. Running multiple occurrences might result in allocation errors, dump failures, inconsistent process tracing, or other unexpected behaviors.
The data set names must be eligible for allocation on the specified or default volumes, or the bpxtrace command will fail. For example, any ACS routines that determine the SMS classes and storage groups for these data sets and objects might need to be modified to allow allocation on these volumes.
While all options and parameters are accepted for each function, some might be ignored for a particular function. See the function descriptions in Format for options that are applicable to that particular function.
Restriction: This option is intended for use by service personnel only.
The debug level is specified as one of the following numbers:
Specifies how the trace records (syscall entry and syscall exit records) should be displayed. The values full, short, and counts show the trace records as formatted by the IPCS CTRACE command with the corresponding IPCS format request for COMP(SYSOMVS).
PID ASID TCB Local time System call Additional trace data
7 0025 8FF1D8 09:43:04.070651 Call open pgm=/bin/bpxtrace parms: 0000000D /bin/bpxwrtso 00800002
00000000 00000000 00000000 00000000
7 0025 8FF1D8 09:43:04.070668 Exit open rv=00000007 pgm=/bin/bpxtrace
7 0025 8FF1D8 09:43:04.070675 Call read pgm=/bin/bpxtrace parms: 00000007 25D00000 00000000 00001000
00000000 00000000 00000000
7 0025 8FF1D8 09:43:04.091468 Exit read rv=00001000 pgm=/bin/bpxtrace</xmp></entry>
The first word of the "System Call" column identifies whether the trace entry corresponds to a syscall entry (CALL) or syscall exit (EXIT). The second word identifies the syscall. For "CALL" type entries, parameters shown in the "Additional Trace Data" column must be matched with the input and output parameters for the specified syscall. Note that the output parameters might contain residual data upon entry to a syscall. The pgm=field displays information about the process being traced only if it remains active after bpxtrace has ended. For "EXIT" type entries, the return value (RV) returned from the syscall is displayed in the "Additional Trace Data" column. Both the input parameter mapping and the return value meaning can be found in z/OS UNIX System Services Programming: Assembler Callable Services Referencez/OS UNIX System Services Programming: Assembler Callable Services Reference.
Restriction: This option is intended for use by service personnel only.
CTRACE COMP(SYSOMVS) FULL OPTIONS((KERNINFO))
The
following screen shows an example of output from bpxtrace
-f full: FCN...open SYSCALL...BPX1OPN PID...00000007 MODULE...BPXJCPC
SY1 SYSCALL 0F080001 09:43:04.070651 STANDARD SYSCALL ENTRY TRACE
ASID..0025 USERID....MEGA STACK@....26D9D0A8
TCB...008FF1D8 EUID......00000000 PID.......00000007
+0000 00000026 00000000 D1C3E2C5 8C000004 | ........JCSE.... |
+0010 8000000C 00000000 8288B768 FFFFFFFF | ........bh...... |
+0020 00000002 26D9E8B4 00000000 7F6DCBBC | .....RY....."_.. |
+0030 C0000007 0000000D 61828995 618297A7 | {......./bin/bpx |
+0040 A699A3A2 96000000 00800002 00000000 | wrtso........... |
+0050 00000000 00000000 0BBD0000 00000000 | ................ |
+0060 00000000 00000000 00000000 00000000 | ................ |
+0070 00000000 00000000 00000000 00000000 | ................ |
+0080 00000000 00000000 00000000 | ............ |
FCN...open SYSCALL...BPX1OPN PID...00000007 MODULE...BPXJCPC
SY1 SYSCALL 0F080002 09:43:04.070668 STANDARD SYSCALL EXIT TRACE
ASID..0025 USERID....MEGA STACK@....26D9D0A8
TCB...008FF1D8 EUID......00000000 PID.......00000007
+0000 00000026 00000000 D1C3E2C5 8C008000 | ........JCSE.... |
+0010 8000000A 00000000 00000007 00000002 | ................ |
+0020 00000001 | .... |
FCN...read SYSCALL...BPX1RED PID...00000007 MODULE...BPXJCPC
SY1 SYSCALL 0F080001 09:43:04.070675 STANDARD SYSCALL ENTRY TRACE
ASID..0025 USERID....MEGA STACK@....26D9D0A8
TCB...008FF1D8 EUID......00000000 PID.......00000007
+0000 0000002B 00000000 D1C3E2C5 8C000004 | ........JCSE.... |
+0010 8000000C 00000000 82885438 00000000 | ........bh...... |
+0020 00000000 618297A7 00000000 7F6DCBBC | ..../bpx...."_.. |
+0030 40000007 00000007 25D00000 00000000 | ........}...... |
+0040 00001000 00000007 00000000 0BBD0000 | ................ |
FCN...read SYSCALL...BPX1RED PID...00000007 MODULE...BPXJCPC
SY1 SYSCALL 0F080002 09:43:04.091468 STANDARD SYSCALL EXIT TRACE
ASID..0025 USERID....MEGA STACK@....26D9D0A8
TCB...008FF1D8 EUID......00000000 PID.......00000007
+0000 0000002B 00000000 D1C3E2C5 8C008000 | ........JCSE.... |
+0010 8000000A 00000000 00001000 26D9D0BA | .............R}. |
+0020 00000000 | .... |
CTRACE COMP(SYSOMVS) SHORT
For an example of the SYSOMVS trace record when the short format option is specified, see z/OS MVS Diagnosis: Tools and Service Aids.
CTRACE COMP(SYSOMVS) OPTIONS((SCCOUNTS))
For an example of the SYSOMVS trace record when the sccounts format option is specified, see z/OS MVS Diagnosis: Tools and Service Aids.
If the specified file exists, the contents are replaced. If redirection is used, the results depend on the redirection operator.
Users with an effective UID of 0 will see the trace records for all UIDs while non-effective UID 0 users will see only those trace records with a matching UID. The first 40 (decimal) bytes of these trace records are mapped by the ThliSecErrCT section of the BPXYTHLI macro, which is documented in z/OS UNIX System Services Programming: Assembler Callable Services Reference. The portion of the records beyond the first 40 bytes are for use by IBM® service.
The trace facilities utilized by the -S option do not require the prior activation of tracing for the system or for a given process. The trace facilities that are used for the -S option are always active and do not need to be activated or deactivated.
bpxtrace -c -o trace.output df
If the user's effective UID is changed after BPXTRACE tracing started, CTRACE records might be missing from the BPXTRACE output. Due to limitations in DUMP processing, only CTRACE records matching the user's EUID at the time of the dump are captured and made available for display.