2

全部,我在 Websphere App Server 7.0.0.15 上运行我的应用程序时获取了 native_stderr.log 文件。早些时候它曾经是简单的日志文件格式,但最近我观察到该文件是 XML 格式的。

是否有任何 IBM 提供的工具来解释此文件?

日志文件包含如下部分:

<af type="tenured" id="345" timestamp="Sep 07 15:51:45 2011" intervalms="3981.813">
  <minimum requested_bytes="16400" />
  <time exclusiveaccessms="0.163" meanexclusiveaccessms="0.163" threads="0" lastthreadtid="0x0000000032D8C700" />
  <refs soft="24731" weak="22022" phantom="1950" dynamicSoftReferenceThreshold="19" maxSoftReferenceThreshold="32" />
  <tenured freebytes="4223424" totalbytes="536870912" percent="0" >
    <soa freebytes="0" totalbytes="531503104" percent="0" />
    <loa freebytes="4223424" totalbytes="5367808" percent="78" />
  </tenured>
  <gc type="global" id="347" totalid="347" intervalms="3982.134">
    <finalization objectsqueued="786" />
    <timesms mark="677.563" sweep="8.489" compact="0.000" total="686.650" />
    <tenured freebytes="334476968" totalbytes="536870912" percent="62" >
      <soa freebytes="330253544" totalbytes="531503104" percent="62" />
      <loa freebytes="4223424" totalbytes="5367808" percent="78" />
    </tenured>
  </gc>
  <tenured freebytes="334460568" totalbytes="536870912" percent="62" >
    <soa freebytes="330237144" totalbytes="531503104" percent="62" />
    <loa freebytes="4223424" totalbytes="5367808" percent="78" />
  </tenured>
  <refs soft="24252" weak="17085" phantom="1950" dynamicSoftReferenceThreshold="19" maxSoftReferenceThreshold="32" />
  <time totalms="687.356" />
</af>

谢谢

4

2 回答 2

4

该输出是 JVM verbosegc 跟踪。文件格式没有改变,它仍然是扁平的,但是有人启用了verbosegc日志,所以你得到了额外的信息输出,它是xmlish。

它们是可以解析这个并产生漂亮图表的工具。IBM Support Assistant包含一个名为 Garbage Collection and Memory Visualizer 的工具。有一个关于此工具的视频,包括如何在IBM Education Assistant上安装说明。

于 2011-09-12T21:23:04.803 回答
0

如果您在 websphere 应用程序服务器中启用详细垃圾收集,那么您将获得此类信息。如果要检查,请转到该路径 Server->Application Server->Server1(单击要查看日志的服务器)-> Process Definition->Java Virtual Machine-> Verbose Garbage Collection(一个复选框)重新启动服务器,您将在日志文件夹中该特定配置文件的 native_stderr.log 文件中看到类似的日志。要分析该文件,您需要使用 Tivoli® Performance Viewer、Dump JVM (DMPJVM) 和 WebSphere 的资源分析器等工具。我认为这个链接会有所帮助 http://www.ibm.com/developerworks/websphere/library/techarticles/0706_sun/0706_sun.html

我还安装了一个性能分析器,您将通过此链接获得完整的指南 - http://www.ibm.com/developerworks/websphere/library/techarticles/0811_gunasekaran/0811_gunasekaran.html#download

您必须从上面的链接下载一个 jar 并将其放入本地系统并打开 CMD 并转到该路径并运行此命令 - java -jar hsa_jdk15.jar -f D:\IBM\WebSphere\AppServer\ profile\profile1\logs\server1\native_stderr.log 根据您的配置进行更改,例如您的 native_stderr.log 文件的路径,并在 -f 之后提供。我认为这会有所帮助。

于 2016-05-30T05:44:38.910 回答