Use the mqsireadlog command to retrieve trace records for the specified component.
You can specify the output to be directed to file, or to STDOUT. The trace records returned by this command are in XML format and can be browsed with an XML browser. If you direct output to file, the data is written in code page utf-8. The file is therefore platform-independent, and can be transferred to other systems for browsing or formatting using the mqsiformatlog command.
On HP-UX, set the size parameter of the mqsichangetrace command to be less than 500 MB because the size of the XML generated files is often half as much again as the original trace file, and setting the value of the size parameter to be greater than 500 MB can cause problems.
If you transfer this file to another system, ensure that you use a file transfer program that does not convert the data (for example, by specifying a binary transfer option).
If you specify a broker, or any of its resources (integration server or message flow) you must have deployed them before you can start trace and read the log files.
You must specify a file name if you want to format the log by using the mqsiformatlog command. If you do not specify a filename, the contents of the log are written to stdout. Use a file extension of .xml, which represents the format of the data.
If you specify this option, stop tracing (by using mqsichangetrace) before you run the mqsireadlog command. If the log file is in use when you issue this command with this flag specified, partial XML records might be returned. Specify -m safe on the mqsichangetrace command to reduce the risk of partial records. If the component being traced has itself stopped, you do not then need to issue a mqsichangetrace command.
If you do not stop tracing before you issue this command, check the contents of the log file created, and remove any partial records from the end by using a text editor before running the mqsiformatlog command, as partial records cannot be read by the format command.
Use these options only when directed to do so by your IBM Support Center or by a BIPxxxx message.
The following table shows the valid combinations of qualifier and component for service trace.
This option is generally used to trace the commands themselves. If you want to trace a particular command, run that command with environment variable MQSI_UTILITY_TRACE set to debug or normal before you issue this command to read the trace output generated.
Enter these values exactly as shown.
The agent trace is initiated when you specify the -b flag on the mqsichangetrace command. Do this only when directed to do so by an IBM Integration Bus error message, or when instructed to do so by your IBM Support Center.
mqsireadlog brokername -t -b service -f -o service.xml
Run this command only when directed to do so by an IBM Integration Bus error message, or when instructed
to do so by your IBM Support
Center.This option is valid only if you have specified -t (service trace).
Use this option when the integration server label is not available. The integration server UUID can be obtained from the BIP2201I or BIP2208I message that is written to the system log when the integration server starts up.
mqsireadlog brokername -t
-x ce40b73e-2701-0000-0080-85557ff4a8ad -f -o service.xml
Qualifier | Component= broker_name | Component= IBM Integration Toolkit | Component= utility |
---|---|---|---|
mqsichangebroker | x | ||
mqsichangeflowmonitoring | x | ||
mqsichangeflowstats | x | ||
mqsichangeflowuserexits | x | ||
mqsichangeproperties | x | ||
mqsichangetrace | x | ||
mqsicreatebroker | x | ||
mqsicreateconfigurableservice | x | ||
mqsicvp | x | ||
mqsideletebroker | x | ||
mqsideleteconfigurableservice | x | ||
mqsideploy | x | ||
mqsiformatlog1 | x | ||
mqsimigratecomponents | x | ||
mqsireadlog | x | x | |
mqsireload | x | ||
mqsireloadsecurity | x | ||
mqsireportbroker | x | ||
mqsireportflowmonitoring | x | ||
mqsireportflowstats | x | ||
mqsireportflowuserexits | x | ||
mqsireportproperties | x | ||
mqsireporttrace | x | ||
mqsisetdbparms | x | ||
mqsistart | x | ||
mqsistop | x | ||
agent | x | ||
service | x | ||
IBM Integration Toolkit | x | ||
httplistener | x |
Retrieve the user trace for broker IB9NODE:
mqsireadlog IB9NODE -u -e default -o trace.xml
Retrieve service trace for utility mqsiformatlog:
mqsireadlog utility -t -b agent -f -o trace.xml
You can format the log file (trace.xml in the above examples) by using the command mqsiformatlog, or view it using an XML editor or viewer.