格式化跟踪

除非您使用 XML 查看器(如因特网浏览器)或理解文件中文档类型描述符(DTD)的 XML 编辑器,否则,mqsireadlog 命令生成的跟踪信息不容易阅读。

WebSphere Message Broker 提供了命令 mqsiformatlog 将跟踪信息格式化为平面文件,这样,您就可以使用文本编辑器查看它了。

mqsiformatlog 命令采用 mqsireadlog 命令产生的文件作为输入,并且将 XML 日志平铺为结构化的记录。它还以用户当前的语言环境检索 XML 消息中的插入。您可以将经格式化的输出导向到文件或者在命令行窗口中查看它。

每个跟踪条目包含时间戳记和 WebSphere Message Broker 消息,该消息包含一个数字(例如,BIP2622)和包含变量插入的文本字符串。

示例:格式化 Windows 上的用户跟踪信息

Windows 上,要格式化启动用户跟踪中创建的跟踪文件,输入命令

mqsiformatlog -i trace.xml -o formattrace.log

其中:

-i 指定输入文件(在本例中是 trace.xml)
-o 指定输出文件(在本例中是 formattrace.log)

此命令读取文件 trace.xml 中的跟踪信息,格式化此信息,并将这些信息写到文件 formattrace.log。下列示例显示正常级别跟踪文件的 mqsiformatlog 命令的输出的一部分。
Timestamps are formatted in local time, 330 minutes past GMT.

2003-06-19 11:30:29.795999     2852   UserTrace   BIP2632I: Message received and 
 propagated  to 'out' terminal of MQ Input node 'Video_Test.VIDEO_XML_IN'. 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP6060I: Parser type 'Properties' 
 created on behalf of node 'Video_Test.VIDEO_XML_IN' to handle portion of incoming 
 message of length
 0 bytes beginning at offset '0'. 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP6061I: Parser type 'MQMD' 
 created on behalf of node 'Video_Test.VIDEO_XML_IN' to handle portion of incoming 
 message of length '364' bytes beginning at offset '0'. Parser type selected based 
 on value 'MQHMD' from previous parser. 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP6061I: Parser type 'MRM' 
 created on behalf of node 'Video_Test.VIDEO_XML_IN' to handle portion of incoming 
 message of length '650' bytes beginning at offset '364'. Parser type selected based 
 on value 'MRM' from previous parser. 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP2537I: Node 'Video_Test.Extract 
 Fields':
 Executing statement 'BEGIN ... END;' at (.Video_Test_Compute.Main, 2.2). 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP2537I: Node 'Video_Test.Extract 
 Fields':
 Executing statement 'SET OutputRoot = InputRoot;' at (.Video_Test_Compute.Main, 7.3). 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP2538I: Node 'Video_Test.Extract 
 Fields':
 Evaluating expression 'InputRoot' at (.Video_Test_Compute.Main, 7.20). 
2003-06-19 11:30:29.795999     2852   UserTrace   BIP2568I: Node 'Video_Test.Extract 
 Fields':
 Performing tree copy of 'InputRoot' to 'OutputRoot'. 

...

2003-06-19 11:30:29.827999     2852   UserTrace   BIP4124I: Message propagated to 
 'out' terminal of Compute node 'Video_Test.Extract Fields'. 
2003-06-19 11:30:29.827999     2852   UserTrace   BIP2638I: The MQ Output node
 'Video_Test.VIDEO_OUT' attempted to write a message to queue 'VIDEO_OUT' connected
 to queue manager ''. The MQCC was '0' and the MQRC was '0'. 
2003-06-19 11:30:29.827999     2852   UserTrace   BIP2622I: Message successfully 
 output by output node 'Video_Test.VIDEO_OUT' to queue 'VIDEO_OUT' on queue manager ''. 

Threads encountered in this trace:
  2852
相关概念
跟踪
声明 | 商标 | 下载 | 书库 | 支持 | 反馈
Copyright IBM Corporation 1999, 2006 最后一次更新时间:2006/08/14
au14310_