本文介绍了使用HeapDumpOnOutOfMemoryError参数进行JBoss的堆转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我被告知我可以将 -XX:+ HeapDumpOnOutOfMemoryError 参数添加到我的JBoss启动脚本的JVM启动选项中,以便在我们得到一个堆转储时获取堆转储我们的应用程序中的内存不足错误。我想知道这些数据被丢弃的位置?它只是控制台,还是一些日志文件?如果它只是到控制台,如果我没有通过控制台登录到Unix服务器怎么办?I was told I can add the -XX:+HeapDumpOnOutOfMemoryError parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application. I was wondering where this data gets dumped? Is it just to the console, or to some log file? If it's just to the console, what if I'm not logged into the Unix server through the console?推荐答案这是什么 Oracle的文档必须说: 默认情况下,堆转储是在VM的工作目录中名为java_ pid .hprof的a文件中创建的,如上面的示例。您可以使用 -XX:HeapDumpPath = 选项指定备用文件名或目录。对于示例 -XX:HeapDumpPath = / disk2 / dumps 将导致堆转储为在 / disk2 / dumps 目录。 By default the heap dump is created in a file called java_pid.hprof in the working directory of the VM, as in the example above. You can specify an alternative file name or directory with the -XX:HeapDumpPath= option. For example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated in the /disk2/dumps directory. 这篇关于使用HeapDumpOnOutOfMemoryError参数进行JBoss的堆转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-27 06:39
查看更多