Class OSUtil

java.lang.Object
com.complexible.common.base.OSUtil

public final class OSUtil extends Object
Author:
Evren Sirin
  • Field Details

    • ERROR

      public static final OSUtil.NativeMemoryUsage ERROR
      Constant instance with memory usages set to 0 that indicates no memory info was retrieved.
  • Method Details

    • getNativeMemory

      public static OSUtil.NativeMemoryUsage getNativeMemory()
      Returns a string with information about native memory usage or ERROR if an error occurs.
    • getNativeMemoryInfo

      public static String 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.