Interface OperatingSystemMXBean

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getArch()
      Returns a unique string identifier for the architecture of the underlying operating system.
      int getAvailableProcessors()
      Returns the number of processors that are available for the virtual machine to run on.
      String getName()
      Returns the name of the underlying operating system.
      double getSystemLoadAverage()
      Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:
      String getVersion()
      Returns the version string for the underlying operating system.
    • Method Detail

      • getArch

        String getArch()
        Returns a unique string identifier for the architecture of the underlying operating system. The identifier value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "os.arch" for the key.
        Returns:
        the identifier for the operating system architecture.
        Throws:
        SecurityException - if there is a security manager in operation and the caller does not have permission to check system properties.
        See Also:
        System.getProperty(java.lang.String)
      • getAvailableProcessors

        int getAvailableProcessors()
        Returns the number of processors that are available for the virtual machine to run on. The information returned from this method is identical to that which would be received from a call to Runtime.availableProcessors().
        Returns:
        the number of available processors.
      • getVersion

        String getVersion()
        Returns the version string for the underlying operating system. The value is identical to that which would be obtained from a call to System.getProperty(java.lang.String) supplying the value "os.version" for the key.
        Returns:
        the version of the operating system.
        Throws:
        SecurityException - if there is a security manager in operation and the caller does not have permission to check system properties.
        See Also:
        System.getProperty(java.lang.String)
      • getSystemLoadAverage

        double getSystemLoadAverage()
        Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:

        the time-averaged value of the sum of the number of runnable entities running on the available processors and the number of runnable entities ready and queued to run on the available processors. The averaging technique adopted can vary depending on the underlying operating system.

        Returns:
        normally, the system load average as a double. If the system load average is not obtainable (e.g. because the calculation may involve an unacceptable performance impact) then a negative value is returned.
        Since:
        1.6