@InterfaceAudience.Private public class JVM extends Object
Constructor and Description |
---|
JVM()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getFreeMemory()
Return the physical free memory (not the JVM one, as it's not very useful as it depends on the
GC), but the one from the OS as it allows a little bit more to guess if the machine is
overloaded or not).
|
static int |
getJVMSpecVersion() |
long |
getMaxFileDescriptorCount()
Get the number of the maximum file descriptors the system can use.
|
int |
getNumberOfRunningProcess()
Workaround to get the current number of process running.
|
long |
getOpenFileDescriptorCount()
Get the number of opened filed descriptor for the runtime jvm.
|
double |
getSystemLoadAverage()
Get the system load average
|
static boolean |
isAarch64()
Check if the arch is aarch64;
|
static boolean |
isAmd64()
Check if the arch is amd64;
|
static boolean |
isGZIPOutputStreamFinishBroken()
Check if the finish() method of GZIPOutputStream is broken
|
static boolean |
isLinux()
Check if the OS is linux.
|
static boolean |
isUnix()
Check if the OS is unix.
|
public static boolean isUnix()
public static boolean isLinux()
public static boolean isAmd64()
public static boolean isAarch64()
public static boolean isGZIPOutputStreamFinishBroken()
public static int getJVMSpecVersion()
public long getOpenFileDescriptorCount()
public double getSystemLoadAverage()
public long getFreeMemory()
public int getNumberOfRunningProcess()
public long getMaxFileDescriptorCount()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.