public final class Memstat extends Object
Modifier and Type | Field and Description |
---|---|
long |
availableProcessors
Available processors.
|
long |
freeMemory
Free memory.
|
long |
gctime
Time spent in calling gc() in ms.
|
String |
humanReadableFreeMemory
Free memory in human readable form.
|
String |
humanReadableGctime
GCtime in human readable form.
|
String |
humanReadableMaxMemory
Max memory in human readable form.
|
String |
humanReadableTotalMemory
Total memory in human readable form.
|
String |
humanReadableUsedMemory
Used memory in human readable form.
|
long |
maxMemory
Max memory.
|
long |
totalMemory
Total memory.
|
long |
usedMemory
Used memory; difference of totalMemory and freeMemory.
|
Modifier and Type | Method and Description |
---|---|
static Memstat |
createMemstat(boolean gc)
Create memory statistics.
|
static Memstat |
createMemstatWithGc()
Create memory statistics.
|
public long gctime
0
when no gc is invoked.public String humanReadableGctime
public long freeMemory
public String humanReadableFreeMemory
public long totalMemory
public String humanReadableTotalMemory
public long maxMemory
public String humanReadableMaxMemory
public long usedMemory
public String humanReadableUsedMemory
public long availableProcessors
public static Memstat createMemstatWithGc()
public static Memstat createMemstat(boolean gc)
gc
- Invoke Runtime.gc()
.