Package com.complexible.common.base
Class OSUtil
java.lang.Object
com.complexible.common.base.OSUtil
- Author:
- Evren Sirin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNative memory usage info collected from OS. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OSUtil.NativeMemoryUsageConstant instance with memory usages set to 0 that indicates no memory info was retrieved. -
Method Summary
Modifier and TypeMethodDescriptionstatic OSUtil.NativeMemoryUsageReturns a string with information about native memory usage orERRORif an error occurs.static StringReturns a string with information about native memory usage of "N/A" if an error occurs.static longgetPID()Returns the process ID for the JVM or -1 if the process ID cannot be determined.
-
Field Details
-
ERROR
Constant instance with memory usages set to 0 that indicates no memory info was retrieved.
-
-
Method Details
-
getNativeMemory
Returns a string with information about native memory usage orERRORif an error occurs. -
getNativeMemoryInfo
Returns a string with information about native memory usage of "N/A" if an error occurs. -
getPID
public static long getPID()Returns the process ID for the JVM or -1 if the process ID cannot be determined.
-