2014-05-25 38 views

回答

0
less %DUMP_FILE_DIR%/java_pid28356.hprof 

您也可以嘗試ParseHeapDump.sh - 日食內存分析器的一部分(你可以谷歌,但我張貼下面的腳本爲您提供方便)

#!/bin/sh 
# 
# This script parses a heap dump. 
# Adjust the path to java, version 5 or later, and the heap size as required. 
# Suitable for 64-bit and 32-bit Java, but a 64-bit Java is required 
# for larger heap sizes. 
# 
# Usage: ParseHeapDump.sh <path/to/dump.dmp.zip> [report]* 
# 
# The leak report has the id org.eclipse.mat.api:suspects 
# The top component report has the id org.eclipse.mat.api:top_components 
# 

java -Xmx3072M -jar "`dirname "$0"`"/plugins/org.eclipse.equinox.launcher_1*.jar -consoleLog -application org.eclipse.mat.api.parse "[email protected]" 
+0

我已經嘗試過類似的工具少,只是輸出文件,但它是一個二進制文件。這裏是它打印出來的摘錄。 @^@^@^@^Z^@^@ ^?_ x^E unsignedEntryNames^A^@^@^@^@^@^@^@^@^@^@ ^?_ | F <9D> P/^ A^@^@^@^@^@^@^@^@^@^_^_ | Hh <80> 0^A^@^@^@^@^@^@^@^@ ESC^@^@^?_^F^ @ java/io/InputStream^A^@^@^@^@^@^@^@%^^^^^ _ x^M

pIllegal八進制轉義序列^ A^@^@^@^@^@^@^@。^ @^@ ^?_ | J^WPjava/util/concurrent/ThreadLocalRandom ^ A^@^@^@^@^@^@^@^@^@ ^? _ | G ':^ A^@^@^@^@^@^@^@^@^@^_ _ | G ;^A^@^@^@^@^@^@^@^@^@ ^?_ | Gz0 <^ A^@^@^@^@^@^@^@^U^@^@ ^?_ | FESC'getAndAddLong^A^@^@^@^@ – user3635219

+0

你期望什麼?如果你知道該找什麼應該就夠了。如果你感到幸運,你可以嘗試我建議的第二個選項。 – aviad

+0

我曾希望像GUI那樣。類似於由字符串,整數等組成的堆的百分比 – user3635219