OSW使用oswbba.jar数据分析报错的一些问题

 

OSW使用oswbba.jar数据分析报错的一些问题

 

前言

昨晚网络和存储工程师机房调整导致私网断开1min后RAC的2节点脑裂。

其中osw信息需要使用oswbba.jar分析的时候遇到一些问题,加上以前也遇到过一并总结记录下。

 

使用方式

通过mos文档OSWatcher (Includes: [Video]) (文档 ID 301137.1)下载安装包。

通过以下方式分析osw产生信息:

[root@node2 ~]$ java -jar /u01/app/grid/tfa/repository/suptools/node2/oswbb/grid/oswbb/oswbba.jar -i /u01/app/grid/tfa/repository/suptools/node2/oswbb/grid/archive

 

如果是通过oswbb840.tar类似的安装包解压部署的话,oswbba.jar就在软件包的根目录内。

 

  

使用过程中,遇到如下报错。

报错1

信息如下:

[root@node2 ~]$ java -jar /u01/app/grid/tfa/repository/suptools/node2/oswbb/grid/oswbb/oswbba.jar -i /u01/app/grid/tfa/repository/suptools/node2/oswbb/grid/archive
......
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f36e0400000, 62914560, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
......
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000005ae200000, 538968064, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
......

 

网上一堆说是内存不足或者swap不足,我这边机器都很足所以并不是这个问题。

[root@node2 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:        257787     181944      75843          0        635       7365
-/+ buffers/cache:     173942      83844
Swap:        32767          0      32767

 

另外还有说运行这个就行了,在不清楚具体含义和影响之前也不敢在生产机器上搞。

echo 1000000 > /proc/sys/vm/max_map_count

 

 查mos,根据OSWatcher Fails With 'Java.lang.OutOfMemoryError: Java heap space' Error (文档 ID 2288156.1),增加jvm大小并启动即可。

java -jar -Xmx1024M /u01/app/grid/tfa/repository/suptools/node2/oswbb/grid/oswbb/oswbba.jar -i /u01/app/grid/tfa/repository/suptools/node2/oswbb/grid/archive

 

 

另外,根据On Exalogic Node, Java Cannot Allocate Memory Warnings Observed: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000607600000, 530579456, 2097152, 0) failed; error='Cannot allocate memory' (errno=12) (文档 ID 1593936.1),这个是JDK7u40 (1.7.0_40-b43)的一个bug16748995,在 JDK8 中修复,并将包含在 JDK7u60 中。

这篇mos的报错信息比较一致,就是需要升级jdk,由于生产环境没敢升级。不过确实,执行java -version都报错了,版本也1.7.0_45算JDK7u40??

[root@node2 ~]# java -version
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f5604400000, 62914560, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.0.1.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

 

该mos还提到,如果无法升级jdk,

Please add the JVM option flag:

-XX:-UseLargePages

The option -XX:-UseLargePages disables the use of Large pages on a machine where the large pages are available.

不懂。

 

报错2

同样是执行报如下错误,而且网上找不到解决办法。

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 5694, Size: 5694
        at java.util.ArrayList.rangeCheck(ArrayList.java:659)
        at java.util.ArrayList.set(ArrayList.java:450)
        at u.c(Unknown Source)
        at J.c(Unknown Source)
        at u.a(Unknown Source)
        at OSWGraph.OSWGraph.main(Unknown Source)

 

查询MOS找到了解决办法,Oracle Linux: OSWatcher Analizer Tool oswbba.jar Fails With Error: "java.lang.IndexOutOfBoundsException" (文档 ID 2519736.1)

原因是因为oswbba.jar 日志分析工具期望每个日志文件都遵循规定的格式。日志文件内容中的任何偏差都会阻止解析文件,也就是说内容格式不正确。

文档提到说如果多个 OSWatcher 实例正在运行并将日志文件写入同一目录,则可能会发生 OSWatcher 文件损坏。

或者进程写一半突然被终止。我当时看了下没发现这两种情况。

难道是java在分析过程中进程写日志写一半被刚好java分析抓到了所以报错了??

 

处理方法如下:

  1. 如果OSWatcher正在运行,正常停止而不是kill -9取结束。
    # ./stopOSWbb.sh

     

  2. 确保所有日志收集进程都已停止。
    ps -ef | grep osw
    无任何相关进程存活。

     

  3. 复制archive的副本。
    # cp -r archive /tmp/

     

  4. 重启OSWatcher,如果是集群本身的osw自一段时间后自动重启,跳过该步骤。
    # ./startOSWbb.sh

     

  5. 使用 oswbba.jar 工具分析数据。
    # java -jar oswbba.jar -i /var/archive

     

第三点 

这个不算报错吧!

使用PSU20200714这个补丁打上集群后的osw版本中的oswbb.jar,java -jar后少了些功能。

界面如下:

Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs

Enter 6 to Generate All CPU Gif Files
Enter 7 to Generate All Memory Gif Files
Enter 8 to Generate All Disk Gif Files

Enter L to Specify Alternate Location of Gif Directory
Enter T to Alter Graph Time Scale Only (Does not change analysis dataset)
Enter D to Return to Default Graph Time Scale
Enter R to Remove Currently Displayed Graphs

Enter A to Analyze Data
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale)

Enter P to Generate A Profile
Enter X to Export Parsed Data to File
Enter Q to Quit Program

Please Select an Option:

  

我另外从最新版osw中解压出oswbb.jar,单独上传服务器使用java -jar后则多了新功能。

Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs

Enter GC to Generate All CPU Gif Files
Enter GM to Generate All Memory Gif Files
Enter GD to Generate All Disk Gif Files
Enter GN to Generate All Network Gif Files

Enter L to Specify Alternate Location of Gif Directory
Enter Z to Zoom Graph Time Scale (Does not change analysis dataset)
Enter B to Returns to Baseline Graph Time Scale (Does not change analysis dataset)
Enter R to Remove Currently Displayed Graphs

Enter X to Export Parsed Data to Flat File
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale)
Enter A to Analyze Data
Enter D to Generate DashBoard

Enter Q to Quit Program

Please Select an Option:

 

 

 

 

参考文档

OSWatcher (Includes: [Video]) (文档 ID 301137.1)

OSWatcher Fails With 'Java.lang.OutOfMemoryError: Java heap space' Error (文档 ID 2288156.1)

On Exalogic Node, Java Cannot Allocate Memory Warnings Observed: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000607600000, 530579456, 2097152, 0) failed; error='Cannot allocate memory' (errno=12) (文档 ID 1593936.1)

Oracle Linux: OSWatcher Analizer Tool oswbba.jar Fails With Error: "java.lang.IndexOutOfBoundsException" (文档 ID 2519736.1)

posted @ 2021-08-25 23:03  PiscesCanon  阅读(694)  评论(0编辑  收藏  举报