IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

mqsireadlog command

Use the mqsireadlog command to retrieve trace records for the specified component.

Supported platforms

Purpose

The mqsireadlog command is valid for:
User trace
Specify the -u option.
Service trace
Specify the -t option. You are recommended to use this option only if directed to do so by the action described in a BIPxxxx message, or by your IBM® Support Center.

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.

To enable service trace of your CMP applications, take one of the following steps:
  • Call the method BrokerProxy.enableAdministrationAPITracing(String filename).
  • Before running your CMP application, set the environment variable MQSI_CMP_TRACE to the name of the file to which trace is sent.

Syntax

User trace

Read syntax diagramSkip visual syntax diagram
>>-mqsireadlog--Component-- -u --+--------------+--+------+----->
                                 '- -e --Egroup-'  '- -f -'   

>--+----------------------+------------------------------------><
   '- -o --Outputfilename-'   

Service trace

Read syntax diagramSkip visual syntax diagram
>>-mqsireadlog--Component-- -t --+- -b --Qualifier--+-- -f ----->
                                 +- -e --Egroup-----+         
                                 '- -x --EgroupUuid-'         

>--+----------------------+------------------------------------><
   '- -o --Outputfilename-'   

Parameters common to user trace and service trace

Component
(Required) The name of the broker for which the log is to be read. All names are case sensitive on Linux and UNIX systems.
-e Egroup
(Optional) The label of the integration server for which log information is to be read.
-o Outputfilename
(Optional) The name of the file into which to write the log data. If you specify a full path name, the file is created in the directory specified. If you specify just the filename, the file is created in the current working directory. The contents of the file are written in code page utf-8, which is platform-independent and preserves data such as DBCS characters.

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.

-f
(Optional for User trace; required for Service trace). Read the log file directly from the file system. If you do not specify this option, the command sends an XML message to the component to request the log contents. If you have specified -t (service trace), you must specify this flag as well.

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.

Additional parameter exclusive to user trace

-u
(Required) Read the log contents from the user trace log. This option is valid only if you select the broker component.

Additional parameters exclusive to service trace

Use these options only when directed to do so by your IBM Support Center or by a BIPxxxx message.

-t
(Required) Read the log contents from the service trace log.
-b Qualifier
(Required) Read the contents of the log for the broker agent, or for the specified command utility program. This option is valid only if you have specified -t (service trace).

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.

The service trace is initiated when you specify the -b flag on the mqsichangetrace command. The format of the command is:
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.
-xEgroupUuid
(Optional) Read the contents of the log for the integration server UUID (Universally Unique Identifier).

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.

The format of the command is:
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    
Notes:
  1. Because this command does not have a component parameter, trace information is recorded in, and retrieved from, the utility component trace files. For further details see the mqsichangetrace command.

Authorization

For information about platform-specific authorizations, see the following topics: If you have enabled broker administration security, you must also set up the authority detailed in Tasks and authorizations for administration security.

Examples

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.


an07300_.htm | Last updated Friday, 21 July 2017