Class SystemInformation

java.lang.Object
org.sm.smtools.application.util.SystemInformation

public final class SystemInformation extends Object
The SystemInformation class allows gathering of some system information, such as Java VM memory statistics, number of CPUs, and the OS name.

Note that this class cannot be subclassed, nor instantiated!

Version:
23/06/2015
Author:
Sven Maerivoet
  • Method Details

    • getTotalMemory

      public static long getTotalMemory()
      Returns the total available memory that the JVM can have access to.
      Returns:
      the total available memory (in bytes) that the JVM can have access to
    • getUsedMemory

      public static long getUsedMemory()
      Returns the amount of memory currently used by the JVM.
      Returns:
      the amount of memory (in bytes) currently used by the JVM
    • getFreeMemory

      public static long getFreeMemory()
      Returns the amount of free memory for the application.
      Returns:
      the amount of free memory (in bytes) for the application
    • getNrOfProcessors

      public static int getNrOfProcessors()
      Returns the number of processors for the JVM.
      Returns:
      the number of processors for the JVM
    • getOperatingSystem

      public static SystemInformation.EOperatingSystem getOperatingSystem()
      Returns the type of operating system.
      Returns:
      the type of operating system