public class JvmTools extends Object
| 构造器和说明 |
|---|
JvmTools() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
jMap(String outputFile,
boolean live)
Dumps the heap to the outputFile file in the same format as the hprof heap dump.
|
static List<String> |
jStack()
Returns java stack traces of java threads for the current java process.
|
static List<String> |
memoryUsage()
Returns memory usage for the current java process.
|
static double |
memoryUsed()
Returns the heap memory used for the current java process.
|
public static List<String> jStack() throws Exception
Exceptionpublic static List<String> memoryUsage() throws Exception
Exceptionpublic static double memoryUsed()
throws Exception
Exceptionpublic static void jMap(String outputFile, boolean live) throws Exception
outputFile - the system-dependent filenamelive - if true dump only live objects i.e. objects that are reachable from othersExceptionCopyright © 2018. All rights reserved.