 |
MustGather: Directions to start, end and format trace
|
| | | Problem(Abstract) | | Instructions to start, stop, and format trace. | | | | | | Resolving the problem | Trace can provide additional details required for problem solving. Follow the instructions listed below to gather trace details.
IBM treats customer documentation as Confidential Information, sharing it among Support personnel on a "need to know" basis. WebSphere MQ V6 and V7 for the Windows and UNIX platforms offer a new trace flag, "-d 0", that will prevent the trace from capturing any user message data. You might want to consider making it a standard trace option when capturing trace to send to IBM. You can read about this trace flag in the MQ Information Center. WebSphere Message Broker trace directions 1. Remove old trace files using the following command: RMVLNK OBJLNK('/qibm/userdata/mqm/trace/*.*') 2. To start trace; issue the following command from the command line: TRCMQM TRCEARLY(*NO) SET(*ON)TRCLEVEL(*DETAIL) MQMNAME(QMANAGER_NAME) NOTE: Use TRCEARLY *YES for problems with CRTMQM and STRMQM. 3. Recreate failure/problem. 4. To end trace; issue the following command from the command line: TRCMQM TRCEARLY(*NO) SET(*OFF) MQMNAME(QMANAGER_NAME) NOTE: If TRCEARLY(*YES) was specified at the start of trace, then it MUST be specified on termination. 5. Formatting is not required. 6. To save all unformatted trace files to a savefile: CRTSAVF FILE(QGPL/PNNNNNTRC) TEXT('Save file for PMR Pnnnnn') where nnnnn is the pmr number SAV DEV('/qsys.lib/qgpl.lib/pnnnnntrc.file') OBJ(('/qibm/userdata/mqm/trace' *INCLUDE)) Additional information Refer to Procedure to remove MQSeries files. Refer to WebSphere MQ for OS/400 documentation collection package.
The MQSC commands in the instructions below are prefixed with "/cpf ", where cpf is the command prefix defined for the subsystem. Follow the instructions listed below to start, stop and format WebSphere MQ for OS/390 GTF trace. - Start trace:
- Start GTF (Figure 11 in the Problem Determination Guide)
Notes: 1. Make sure the trace data set is large enough. GTF only allocates primary extents, not secondary extents. 2. Ensure PQ77295 is on so that all the MQI trace entries will be captured. 3. Use the JOBNAME option to specify the jobs whose processing in the MSTR is to be traced. This may include the MSTR, CHIN, batch, CICS, IMS, or TSO job names. Include the jobs that do the MQPUT and MQGET. Up to 5 job names can be listed. 4. You can not route CHIN internal trace entries, which include inbound and outbound data transmissions, to GTF. They only appear in a dump of the CHIN job and CSQXTRDS dataspace. Example: START GTFxx.yy 01 AHL100A SPECIFY TRACE OPTIONS R 01,TRACE=JOBNAMEP,USRP 02 ALH101A SPECIFY TRACE EVENT KEYWORDS - JOBNAME=,USR= R 02,JOBNAME=(ssidMSTR,ssidCHIN,zzzzzzzz), USR=(5E9,5EA,5EE) 03 ALH102A CONTINUE TRACE DEFINITION OR REPLY END R 03,END END 04 AHL125A RESPECIFY TRACE OPTIONS OR REPLY U R 04,U U Where xx is an optional name of a GTF procedure to use yy is an identifier for this occurrence of GTF trace ssid is the subsystem id of the queue manager zzzzzzzz is as described in Note 3 above. - Start MQ GTF trace:
- /cpf START TRACE(GLOBAL) DEST(GTF) CLASS(*) RMID(*)
- Alternatively, you can route GTF trace to an internal buffer rather than to a data set. The GTF information will be included when a dump is taken, which is especially useful in a slip dump.
- Start GTF Trace as listed above with additional parameters of MODE(INT) and REGION=1000K. Additionally, GTF parameter SADMP, SDUMP, or ABDUMP should be set to at least 10M, depending on the type of dump.
For additional details regarding trace, refer to the publication: WebSphere MQ for z/OS Problem Determination Guide.
Follow the instructions listed below to start, stop and format WebSphere MQ for z/OS MSTR Internal trace. - Increase the trace size if necessary to capture the problem:
For MQ V5.3.x, the MSTR trace table size is specified in the CSQ6SYSP parameter TRACTBL (defaults to 99 4K blocks). You must recycle the queue manager if you make a change to this value. For MQ V6, and V7 you can increase the size of the trace by issuing a SET SYSTEM TRACTBL(nn) command. nn is in 4K blocks, and the range is 1 to 999 with a default of 99. If there is any trace currently in effect, the existing trace table continues to be used, and its size is unchanged. A new global trace table is only obtained for a new START TRACE command. If a new trace table is created with insufficient storage, the old trace table continues to be used, and the message CSQW153E is displayed. - Start trace:
- /cpf START TRACE(GLOBAL) DEST(RES) CLASS(*) RMID(*)
- Capture trace in a dump:
- Dump the MQ MSTR address space. See Figure 3 or Figure 5 in the Problem Determination Guide for example dump commands.
- End trace (optional):
- /cpf STOP TRACE(GLOBAL) DEST(RES) CLASS(*) RMID(*)
- Format trace:
- MSTR trace information can be displayed by entering the IPCS command:
VERBX CSQWDPRD 'SUBSYS=ssnm,TT'
Where ssnm is the subsystem name. For additional details regarding trace, refer to the publication: WebSphere MQ for z/OS Problem Determination Guide.
Follow the instructions listed below to start, stop and format WebSphere MQ for z/OS CHIN trace. - Increase the trace size if necessary to capture the problem:
For MQ V5.3.x, the CHIN trace table size is specified in the CSQ6CHIP parameter TRAXTBL (defaults to 2M). You must recycle the CHIN if you make a change to this value. For MQ V6, and V7 you can increase the size of the trace dataspace by issuing an ALTER QMGR TRAXTBL(nn) command. nn is in MB, and the smallest value you can have is 2 (default value). Issuing this command causes a message to be sent to the CHIN, which will free the existing trace dataspace (if there is one) and allocate a new one of the new size. - Start trace (v5.3.x):
- /cpf START TRACE(GLOBAL) DEST(RES) CLASS(*) RMID(*)
to start both MSTR and CHIN internal trace OR - /cpf START TRACE(GLOBAL) DEST(RES) CLASS(*) RMID(231)
to start CHIN internal trace only Start trace (v6.0 and V7): - /cpf START TRACE(CHINIT)
Note that you cannot issue START TRACE(CHINIT) if the command server or the channel initiator is not running. - Capture trace in a dump:
Dump the channel initiator (CHIN) address space. The dump must Include the trace data space (CSQXTRDS), which contains the trace information. See Figure 4 or Figure 5, in the Problem Determination Guide for example dump commands. - End trace (optional):
V5.3.x: - /cpf STOP TRACE(GLOBAL) DEST(RES) CLASS(*) RMID(*)
V6.0 and V7: - /cpf STOP TRACE(CHINIT)
- Format trace:
- CHIN trace information can be displayed by entering the IPCS command:
VERBX CSQXDPRD 'SUBSYS=ssnm,CTRACE=F' Where ssnm is the subsystem name. - Or the command:
CTRACE COMP(CSQXssnm),FULL For additional details regarding trace, refer to the publication: WebSphere MQ for z/OS Problem Determination Guide.
If you are diagnosing a problem with the keyring read by SSL, then the trace MUST be started just prior to the channel initiator. Otherwise the required trace information will not be collected. If you are diagnosing a problem with the certificate exchange during the channel handshake then the trace MUST be started just prior to the secure channel being started; otherwise the required trace information will not be collected. - Capture trace:
The following will trace MQ initialization and will show what certificates were read off of the keyring: - /S GSKSRVR
- /TRACE CT,WTRSTART=GSKWTR
- /TRACE CT,ON,COMP=GSKSRVR
- /R NN,JOBNAME=(ssidCHIN),OPTIONS=(LEVEL=255),WTR=GSKWTR,END
where ssid is the subsystem name of the queue manager. - /cpf START QMGR
where cpf is the command prefix for the queue manager. Include the PARM option if you normally do so. - /TRACE CT,OFF,COMP=GSKSRVR
- /TRACE CT,WTRSTOP=GSKWTR
At this point, you can either copy the dataset that the above trace was written to or write this next trace to a different dataset. This next trace will capture the an error at channel start (GSKSRVR should still be started before the ssidCHIN job): - /TRACE CT,WTRSTART=GSKWTR
- /TRACE CT,ON,COMP=GSKSRVR
- /R NN,JOBNAME=(ssidCHIN),OPTIONS=(LEVEL=255),WTR=GSKWTR,END
- /cpf START CHANNEL(channelname)
- /TRACE CT,OFF,COMP=GSKSRVR
- /TRACE CT,WTRSTOP=GSKWTR
- /P GSKSRVR
- Format trace:
To format the trace in IPCS, ensure the following load library is in the STEPLIB concatenation: hlq.SGSKLOAD for z/OS 1.6 and below hlq.SIEALNKE for z/OS 1.7 and above Issue the IPCS command: CTRACE COMP(GSKSRVR) LOCAL FULL Refer to the z/OS System SSL Programming manual. RACF, TopSecret, and ACF2 Certificate/Keyring Displays RACF Display certificate and keyring information for the specified CHIN. RACDCERT ID(ssnmCHIN) LISTRING(keyring) Display detailed certificate information for the specified CHIN. RACDCERT ID(ssnmCHIN) LIST List detail information for the specific certificate identified by the LABEL keyword. RACDCERT ID(ssidCHIN) list(LABEL('...'))
Top Secret List connected certificate information for the specified CHIN. TSS LIST(ssnmCHIN) SEG(RINGDATA) List all certificate detail information for the specified CHIN. TSS LIST(MQX3CHIN) SEG(CERTDATA) List both CERTDATA and RINGDATA for a particular CHIN. TSS LIST(MQX3CHIN) DATA(ALL) List all digital certificate and accessorid information associated with a particular ID. TSS LIST(SDT) DIGICERT(ALL) CA / ACF2 Commands To Display Certificate Information This OMVS SECTRACE must be started prior to receiving any SSL error messages Its output is written to the MVS syslog. 'ST SET,TYPE=OMVS,FUNC=ALL,END' The command to modify/start this trace is : F TSS,SECTRACE(ON) The problem should be re-created at this point. After trace has been captured terminate tracing by issuing : F TSS,SECTRACE(OFF) SECTRACE DEL,ID=trace1
Follow the instructions listed below to start, stop and format the AIX trace on v5.3. Note: WebSphere MQ V6 and V7 customers should review the second part of this section. The additional trace function described in part two was added at WebSphere MQ v6.0. - Start trace
The following command starts a trace of WebSphere MQ data which will grow to approximately 50MB in size before wrapping. You can change the maximum size, but be aware that a small size may prevent useful information from being captured. The larger you make the file size the better chance of capturing the trace you need. You can choose any output file name you wish, but be sure there is ample storage for the trace: trace -a -j30D,30E -o /path/to/trace.out -L 50000000 - End trace:
Because AIX traces wrap by default, it is important to stop tracing as soon as the problem occurs. If you delay in stopping the trace, or if your trace file size is too small, the information you hope to gather may be overwritten by new trace data: - Format trace:
trcrpt -t /usr/mqm/lib/amqtrc.fmt /path/to/trace.out > /path/to/trace.fmt Send formatted trace files to IBM support unless binary traces are specifically requested. If the IBM support team asks you to gather additional trace hooks (not just 30D and 30E) then please send the binary trace file instead. Full information on AIX trace options is available in the General Programming Concepts: Writing and Debugging Programs. WebSphere MQ V6 and V7 on AIX now supports the standard WebSphere MQ trace facility as well as the AIX system trace. It is recommended that V6 and V7customers use the WebSphere MQ trace commands unless requested by the WebSphere MQ service team to use the AIX system trace hooks. Follow the instructions listed below to start, stop and format WebSphere MQ for AIX trace. Trace files are written to the directory /var/mqm/trace, so delete or relocate old trace files before beginning a new trace. - Start trace for every WebSphere MQ process:
strmqtrc -e Or start trace only for one queue manager: Or start a high detail trace for one queue manager: strmqtrc -t all -t detail -m MY.QMGR Or start a high detail wrapping trace and limit the file size to ~5MB: strmqtrc -l 5 -t all -t detail -m MY.QMGR - End all tracing:
endmqtrc -a - Format the trace files:
dspmqtrc *.TRC Or format wrapping trace files: The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT. If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above. Send formatted trace files to IBM support unless binary traces are specifically requested. To save space, compress the formatted trace files with compress, zip, gzip, or bzip2.
Follow the instructions listed below to start, stop and format WebSphere MQ for HP-UX trace. Trace files are written to the directory /var/mqm/trace, so delete or relocate old trace files before beginning a new trace. - Start trace for every WebSphere MQ process:
Or start trace only for one queue manager: Or start a high detail trace for one queue manager: strmqtrc -t all -t detail -m MY.QMGR Or start a high detail wrapping trace and limit the file size to ~5MB: strmqtrc -l 5 -t all -t detail -m MY.QMGR - Format the trace files:
Or format wrapping trace files: The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT. If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above. Send formatted trace files to IBM support unless binary traces are specifically requested. To save space, compress the formatted trace files with compress, zip, gzip, or bzip2.
Enable or modify tracing using the strmqtrc control command Examples: This command enables tracing of data from common services and the local queue manager, for a queue manager called QM1: strmqtrc -m QM1 -t csdata -t lqmdata Stop trace using the endmqtrc control command Optional parameters: -m QMgrName Is the name of the queue manager for which tracing is to be ended. -e flag. -e If this flag is specified, early tracing is ended -a If this flag is specified all tracing is ended. Examples: This command ends tracing of data for a queue manager called QM1: endmqtrc -m QM1 Display formatted trace output using the dspmqtrc control command Required parameters: InputFileName Specifies the name of the file containing the unformatted trace. For example MQS_ROOT:[MQM.TRACE]AMQ20202345.TRC.Optional parameters -t FormatTemplate Specifies the name of the template file containing details of how to display the trace. The default value is SYS$SHARE:AMQTRC.FMT -h Omit header information from the report -o output_filename The name of the file into which to write formatted data. Example: The following command shows the redirection of output: dspmqtrc mqs_root:[mqm.trace]amq20202345.trc > mqs_root:[mqm.trace]amq20202345.fmt For further details see: WebSphere MQ for HP OpenVMS System Administration Guide, Chapter 14, Using WebSphere MQ trace.
Enable or modify tracing using the strmqtrc control command Examples: This command enables tracing of a local queue manager. The command enables tracing only for those server processes of the queue manager that are running in CPU x. This is how to enter the command at an OSS shell command prompt: run -cpu=x strmqtrc -m <qmgrname> -t detail -t all where x is the the cpu to start trace in . Repeat command to start trace in other cpus. This is how to enter the command at a TACL command prompt: run /CPU x/ strmqtrc -m <qmgrname> -t detail -t all where x is the the cpu to start trace in . Repeat command to start trace in other cpus. Stop trace using the endmqtrc control command Examples: This command ends tracing for those server processes that are running in the same CPU as the OSS shell or TACL session in which the command is entered. The tracing of the server processes of the queue manager that are running in other CPUs is unaffected. endmqtrc -a This command ends tracing for those server processes that are running in CPU x. The tracing of the server processes of the queue manager that are running in other CPUs is unaffected. This is how to enter the command at an OSS shell command prompt: run -cpu=x endmqtrc -a This is how to enter the command at a TACL command prompt: run /CPU x/ endmqtrc -a Display formatted trace output using the dspmqtrc control command
dspmqtrc *.TRC
The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT.
Use the Service Data Collection and Packaging (SDCP) utility to package the trace data for sending in to IBM (or you may package them manually, see below). You can download SDCP from here: http://www.ibm.com/support/docview.wss?rs=171&uid=swg27015549 If sending manually: Send formatted trace files to IBM support unless binary traces are specifically requested. To save space, compress the formatted trace files with zip or gzip. For further details see: WebSphere MQ for HP NonStop Server: System Administration Guide, Chapter 16, Tracing
Follow the instructions listed below to start, stop and format WebSphere MQ for Linux trace. Trace files are written to the directory /var/mqm/trace, so delete or relocate old trace files before beginning a new trace. Start trace for every WebSphere MQ process: strmqtrc -e Or start trace only for one queue manager: strmqtrc -m MY.QMGR Or start a high detail trace for one queue manager: strmqtrc -t all -t detail -m MY.QMGR Or start a high detail wrapping trace and limit the file size to ~5MB: strmqtrc -l 5 -t all -t detail -m MY.QMGR End all tracing: endmqtrc -a Format the trace files: dspmqtrc *.TRC Or format wrapping trace files: dspmqtrc *.TRC *.TRS The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT. If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above. Send formatted trace files to IBM support unless binary traces are specifically requested. To save space, compress the formatted trace files with compress, zip, gzip, or bzip2.
Follow the instructions listed below to start, stop and format WebSphere MQ for Solaris trace. Trace files are written to the directory /var/mqm/trace, so delete or relocate old trace files before beginning a new trace. Start trace for every WebSphere MQ process: Or start trace only for one queue manager: Or start a high detail trace for one queue manager: strmqtrc -t all -t detail -m MY.QMGR Or start a high detail wrapping trace and limit the file size to ~5MB: strmqtrc -l 5 -t all -t detail -m MY.QMGR End all tracing: Format the trace files: Or format wrapping trace files: The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT. If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above. Send formatted trace files to IBM support unless binary traces are specifically requested. To save space, compress the formatted trace files with compress, zip, gzip, or bzip2.
Follow the instructions listed below to start, stop and format WebSphere MQ for Windows trace. Delete or relocate old trace files from the trace directory before beginning a new trace. Start trace: Or start a high detail trace: strmqtrc -t all -t detail Or start a high detail wrapping trace and limit the file size to ~5MB: strmqtrc -l 5 -t all -t detail End trace: Format trace: No formatting is required The trace records are written to the following directory where <mqmwork> is the directory where WebSphere MQ was installed. MQ 5.3: <mqmwork>\errors Therefore the default trace directory for WebSphere MQ 5.3 is C:\Program Files\IBM\WebSphere MQ\errors. MQ 6: <mqmwork>\trace Therefore the default trace directory for WebSphere MQ 6 is C:\Program Files\IBM\WebSphere MQ\trace. On Windows, the trace files are readable without formatting. However, they are still called AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) rather than AMQppppp.FMT.
Follow the instructions listed below to run trace for the WebSphere MQ for Windows V6 and V7 Explorer using the MQ Java API: 1. Modify the files runmqcfg.cmd and runmqcfg_rcp.cmd in the directory: C:\Program Files\IBM\WebSphere MQ\bin Add the following line, which specifies the properties file in C:\TEMP\internal.properties. set AMQ_EXPLORER=%AMQ_EXPLORER% "-Dcom.ibm.mq.commonservices=C:\TEMP\internal.properties" Note: The command must be typed on ONE LINE in the runmqcfg.cmd and runmqcfg_rcp.cmd files and BEFORE the statement: start "WebSphere MQ Explorer" %AMQ_EXPLORER% 2. Create a file internal.properties in the C:\TEMP directory as with the following text: Diagnostics.MQ=enabled Diagnostics.Java=explorer,wmqjavaclasses,all #Diagnostics.Java=explorer Diagnostics.Java.Trace.Detail=high Diagnostics.Java.Trace.Destination.File=enabled Diagnostics.Java.Trace.Destination.Console=disabled Diagnostics.Java.Trace.Destination.Pathname=C:\\temp\\trace Diagnostics.Java.FFDC.Destination.Pathname=C:\\temp\\FFDC Diagnostics.Java.Errors.Destination.Filename=C:\\temp\\errors\\AMQJERR.LOG 3. You may also need to create the following directories: C:\temp\FFDC C:\temp\trace C:\temp\errors 4. In the C:\temp\trace directory you will find files with the format AMQyyyymmddhhmmsssss.*.TRC which contain the MQ Java trace output.
Follow the instructions listed below to run trace for the WebSphere MQ for Linux V6 and V7 Explorer using the MQ Java API: 1. Modify the files runmqcfg.cmd and runmqcfg_rcp.cmd in the directory: /opt/mqm/bin Modify the line: AMQ_EXPLORER="./eclipse" to the following, according to the version of MQ: v6.0: AMQ_EXPLORER="/opt/mqm/ies30/eclipse/eclipse" v7.0:
AMQ_EXPLORER="/opt/mqm/eclipseSDK33/eclipse/eclipse" And add the single line: AMQ_EXPLORER="$AMQ_EXPLORER -Dcom.ibm.mq.commonservices=/tmp/internal.properties" before the statement cd $AMQECLIPSE 2. Both of these scripts are dependent on the environment variable AMQECLIPSE. If this environment variable does not exist then it should be created as the first line in the script. For example: v6.0: export AMQECLIPSE="/opt/mqm/ies30/eclipse" v7.0: export AMQECLIPSE="/opt/mqm/eclipseSDK33/eclipse" Note: If you want, you can include the above line in the user's profile. 3. Create a file called "internal.properties" in the /tmp directory with the following text. Diagnostics.MQ=enabled Diagnostics.Java=explorer,wmqjavaclasses,all #Diagnostics.Java=explorer Diagnostics.Java.Trace.Detail=high Diagnostics.Java.Trace.Destination.File=enabled Diagnostics.Java.Trace.Destination.Console=disabled Diagnostics.Java.Trace.Destination.Pathname=/tmp/trace Diagnostics.Java.FFDC.Destination.Pathname=/tmp/FFDC Diagnostics.Java.Errors.Destination.Filename=/tmp/errors/AMQJERR.LOG 4. Ensure that the file permissions for the above file allow it to be read by all processes: chmod a+r /tmp/internal.properties 5. You may also need to create the following directories: /tmp/FFDC /tmp/trace /tmp/errors 6. Ensure that the file permissions for these directories allow other users to write, such as: chmod 777 /tmp/FFDC chmod 777 /tmp/trace chmod 777 /tmp/errors 7. From a command prompt, invoke the script: runmqcfg 8. In the /tmp/trace directory you will find files with the format AMQyyyymmddhhmmsssss.*.TRC which contain the MQ Java trace output. Follow the instructions listed below to start, stop and format trace for the WebSphere MQ base Java classes: MQ V7: The method shown for MQ V6 has been deprecated in MQ V7. - Create an MQ Java properties file. # # Base WebSphere MQ diagnostics are disabled # Diagnostics.MQ=enabled # # Java diagnostics for WebSphere MQ Transport for SOAP # and the WebSphere MQ Java Classes are both enabled # Diagnostics.Java=soap,wmqjavaclasses # # High detail Java trace # Diagnostics.Java.Trace.Detail=high # # Java trace is written to a file and not to the console. # Diagnostics.Java.Trace.Destination.File=enabled Diagnostics.Java.Trace.Destination.Console=disabled # # Directory for Java trace file # Windows: # Diagnostics.Java.Trace.Destination.Pathname=c:\\tracedir # Unix: Diagnostics.Java.Trace.Destination.Pathname=/var/mqm/trace # # Directory for First Failure Data Capture # Windows: # Diagnostics.Java.FFDC.Destination.Pathname=c:\\errorsdir # Unix: Diagnostics.Java.FFDC.Destination.Pathname=/var/mqm/errors - Specify the full path of the properties file when executing the Java program. Some examples are given below. There is only one command, which is long, and should take only one line. Windows: java -Djava.library.path="C:\Program Files\IBM\WebSphere MQ\Java\lib" -Dcom.ibm.mq.commonservices="C:\temp\mq7-java-prop-test.txt" MQSamplePut Unix: java -Djava.library.path=/opt/mqm/java/lib -Dcom.ibm.mq.commonservices=/tmp/mq7-java-prop.txt MQSamplePut
MQ V6: Start and stop trace: WebSphere MQ base Java classes includes a trace facility which you can use to produce diagnostic output if you suspect that there might be a problem with the code. Your program must control tracing using the enableTracing and disableTracing methods of the MQEnvironment class. For example:
Format trace: Formatting is not required The trace records are by default written to the Java console, but if you specify an output file name the trace output will be written there instead. For additional details regarding trace, refer to the publication: WebSphere MQ Using Java.
Follow the instructions below to start, stop and format JMS trace in V6 and V7.0: Start trace:
WebSphere MQ JMS applications normally invoke trace by using command line arguments to the 'java' command. For example: java -DMQJMS_TRACE_LEVEL=base -DMQJMS_TRACE_DIR=/tmp myApp Sometimes this is not possible and you may need to invoke trace from within the source code. This can be done as follows: com.ibm.mq.jms.services.ConfigEnvironment.start("base"); ... com.ibm.mq.jms.services.ConfigEnvironment.stop(); The value of MQJMS_TRACE_DIR may also be controlled programmatically: java.util.Properties pros = System.getProperties(); props.put("MQJMS_TRACE_DIR", "/tmp"); System.setProperties(props); New in v7.0: Tracing JMS programs using the configuration file for WebSphere MQ classes for JMS.
See: MQ v7.0 Using Java - Tracing Programs Format trace: Formatting is not required The trace records are written to a file called mqjms.trc in the current directory if the MQJMS_TRACE_DIR property is not set. Although the directory can be changed, the file name is always mqjms.trc. For additional details regarding trace, refer to the publication: WebSphere MQ Using Java.
JCA Resource Adapter trace For details on how to enable JCA Resource adapter trace, refer to the WebSphere MQ Using Java manual. The ra.xml file provided with the 6.0.2.1 resource adapter has these properties defined, so they just need editing to enable trace.. Note : MQ JMS/Java trace needs enabling as above, how this is done will depend on the application server in use. Two files will need collecting mqjms.trc from the JMS client, and the trace file created by the JCA RA. Follow the instructions listed below to enable JMS trace under WebLogic: - Ensure that the WebLogic Server that you want to enable trace is stopped
- Edit the file <WLS_home>\startWebLogic.cmd on Windows systems, or <WLS_home>\startWebLogic.sh on UNIX platforms (where <WLS_home> is the directory that contains the server configuration) and add the following statements before the echo statements that output the current values for the system's CLASSPATH and PATH environment variables:
- set JAVA_OPTIONS=%JAVA_OPTIONS% -DMQJMS_TRACE_DIR=<The directory where the mqjms.trc file will be written to>
- set JAVA_OPTIONS=%JAVA_OPTIONS% -DMQJMS_LOG_DIR=<The directory used by WebSphere MQ to log information on serious problems>
- set JAVA_OPTIONS=%JAVA_OPTIONS% -DMQJMS_TRACE_LEVEL=base
- Save the updated file.
Now whenever the WebLogic Server is started, WebSphere MQ JMS trace information will be written to the file <MQJMS_TRACE_DIR>\mqjms.trc.
Enabling JMS trace for releases of WebSphere Application Server Using trace on Windows Using trace on UNIX systems Start or stop online tracing to the OTMA trace table. Note that OTMT is not a typo. /TRACE SET ON OFF TABLE OTMT Start or stop online tracing of OTMA client activity and transaction-pipe activity for clients for currently active TPIPES. /TRACE SET ON OFF TMEMBER client1 TPIPE tpipe1 Start or stops online tracing of OTMA client activity and transaction-pipe activity for new TPIPES. /TRACE SET ON OFF TMEMBER client1 ALL Note: You must switch the OLDS/OLPS in IMS and save the one that contains current IMS trace. If OLDS/OLPS too big, then cut 6701 recs and send those.
MQSeries trace MQSeries for VSE relies on the CICS auxiliary trace for problem determination. To reduce overhead in a production environment, the trace points are not issued unless specified using the 'Log and Trace Settings' screen. Tracing should only be used when requested by IBM service personnel. Refer to section 4.4.3.5 Queue Manager Log and Trace Settings in the MQSeries for VSE System Management Guide for details. MQPUTIL program The MQPUTIL program performs the following functions: Prints the system, queue, and channel definitions from a configuration file. Prints the SYSTEM.LOG file in a formatted report. Prints the SYSTEM.MONITOR queue in a formatted report. Updates all channels with a new starting MSN. Updates a configuration file for dual queues. It makes all dual queues into a primary queue. Prints new Help Facility error information. Prints code pages recognized by MQSeries for VSE. Updates system configuration constants. Sample JCL to print the log (switch parameters and it will print the config) * ** JOB JNM=MQJUTILY,DISP=D,CLASS=A * ** LST DISP=H,CLASS=Q,PRI=3 // JOB MQJUTILY - Execute VSE/ESA MQ/Series Batch Utility Program. /* ------------------------------------------------------------------* /* I M P O R T A N T I M P O R T A N T I M P O R T A N T * /* * /* Please change : * /* "* ** JOB" to "* $$ JOB" * /* "* ** LST" to "* $$ LST" * /* "* ** EOJ" to "* $$ EOJ" * /* * /* ------------------------------------------------------------------* /* This job executes MQPUTIL to access the CONFIGURATION file * /* * /* This file is a sample and needs modification to suit the * /* users environment. * /* * /* ------------------------------------------------------------------* /* Licensed Materials - Property of IBM * /* * /* 5686-A06 * /* Copyright IBM Corp. 1998, 2006. * /* * /* US Government Users Restricted Rights - Use, duplication or * /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * /* ------------------------------------------------------------------* /* ------------------------------------------------------------------* /* SELECT ONE OF THE FOLLOWING SYSIPT CARD OPTIONS * /* & INSERT IT AFTER // EXEC MQPUTIL ... * /* ------------------------------------------------------------------* /* col 1.................20....... * /* RESET MSN 00000002 * /* PRINT MESSAGES * /* PRINT CONFIG * /* PRINT LOG * /* PRINT LOG FROMQ system.log * /* PRINT MONITOR * /* PRINT MONITOR FROMQ system.monitor * /* UPDATE * /* UPDATE UPPERCASE * /* UPDATE FROM MQFSSET * /* UPDATE FROM MQFSSET UPPERCASE * /* ------------------------------------------------------------------* // LIBDEF PHASE,SEARCH=(PRD2.MQSERIES,PRD2.SCEEBASE) // ASSGN SYS005,SYSLST // DLBL CONFIG,'MQSERIES.MQFCNFG',,VSAM,CAT=MQMCAT // DLBL INLOG,'MQSERIES.MQFLOG',,VSAM,CAT=MQMCAT /. C /. C if using PRINT MONITOR then change following /. DLBL INLOG /. C to // DLBL INLOG with fileid of monitor's queue VSAM file /. C /. DLBL INLOG,'MQSERIES.MQFMON',,VSAM,CAT=MQMCAT /. C /. C if using PRINT LOG FROMQ or PRINT MONITOR FROMQ then ensure /. C following SETPARM is set to the batch interface id of the /. C required queue manager /. C // SETPARM MQBISRV='mqbiserv' // EXEC MQPUTIL,SIZE=MQPUTIL /* /& * ** EOJ
| | | | | | | | | Cross Reference information | | Segment | Product | Component | Platform | Version | Edition | | Application Servers | WebSphere Application Server | Not Applicable | AIX, HP-UX, Linux, Linux Red Hat - pSeries, Linux zSeries, OS/390, OS/400, Solaris, Windows, z/OS | 6.0, 5.0 | | | Business Integration | WebSphere Enterprise Service Bus | Documentation | AIX, HP-UX, Linux, Linux iSeries, Linux pSeries, Linux x86, Linux zSeries, Solaris, Windows | 6.0.1 | | | Business Integration | WebSphere Message Broker | Documentation | AIX, HP-UX, Linux, OS/390, OS/400, Solaris, Tandem NSK, Windows, z/OS, Linux SuSE - zSeries | 6.0, 5.0, 2.1 | | | Business Integration | WebSphere MQ Workflow | Documentation | AIX, HP-UX, Linux, OS/390, Solaris, Windows, z/OS | 3.6, 3.5, 3.4 | |
| Product Alias/Synonym | | WMQ MQ | | |
| | |
 |
| IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. |
 |
 |
 |
| Please take a moment to complete this form to help us better serve you. |
 |
 |
 |
|
|
|
 |
 |
| Product categories: |
 |
| | Software |  |
| | Business Integration and Optimization |  |
| | Application Integration and Connectivity |  |
| | WebSphere MQ |  |
| | Documentation |  |
 |
| Operating system(s): |
| |
AIX, HP-UX, Linux, OS/390, OS/400, Solaris, Windows, z/OS
|
 |
| Software version: |
| |
2.2.1, 5.3, 5.3.1, 6.0, 6.0.2, 7.0
|
 |
| Reference #: |
| |
1174924
|
 |
| IBM Group: |
| | Software Group |
 |
| Modified date: |
| | 2006-07-10 |
 |
|