oacore内存溢出日志搜集

本文介绍如何通过配置参数收集Java应用程序的运行时信息,包括gc日志、threaddump和heapdump等,以便于故障排查。同时提供了一种监控垃圾回收状态的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

由于没有thread dump和heap dump信息,所以需要加入一些参数来收集信息

请在setDomainEnv中的JAVA_OPTION中加入红色部分参数,加入前请设置gc.log.$$的路径。

JAVA_OPTIONS="${JAVA_OPTIONS} -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:<Path>/gc.log.$$ "
export JAVA_OPTIONS

加之前先备份,加完重启生效。

请在故障发生时采集以下资料:

gc.log
server.log
cpu/内存
故障时的thread dump
故障时heap dump

heap dump的抓取方法可以参考以下命令:
<JAVA_HOME>/bin/jmap -dump:format=b,file=c:\temp\heap.hprof <PID>

把-XX:+HeapDumpOnOutOfMemoryError加到server start的argms

thread dump可以考虑使用以下方法(二选一):
1.jstack <pid> or jstack -l <pid> to print additional information about locks

按照java cache full的那个文档检查过wf_local_role表

如果oacore遇到JOC cache full问题,前台用户就会遇到“Error Page
You have Encountered an unexpected error. Please contact the System Administrator for assistance.”

-gcutil Option
Summary of Garbage Collection Statistics
Column Description
S0 Survivor space 0 utilization as a percentage of the space's current capacity.
S1 Survivor space 1 utilization as a percentage of the space's current capacity.
E Eden space utilization as a percentage of the space's current capacity.
O Old space utilization as a percentage of the space's current capacity.
P Permanent space utilization as a percentage of the space's current capacity.
YGC Number of young generation GC events.
YGCT Young generation garbage collection time.
FGC Number of full GC events.
FGCT Full garbage collection time.
GCT Total garbage collection time.

/app/apperp/fs1/EBSapps/comn/util/jdk64/bin/jstat -gcutil 45346cutil 45346 250 7
可以用这个命令去观察gc的状态
[app@mcpl002 ~]$ /app/apperp/fs1/EBSapps/comn/util/jdk64/bin/jstat -gcutil 45346 250 7
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
0.00 4.01 38.56 35.96 23.23 51 7.164 0 0.000 7.164
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值