org.apache.geode.management

## Class OSMetrics

- java.lang.Object
- - org.apache.geode.management.OSMetrics

- All Implemented Interfaces:
    java.io.Serializable

      public class OSMetrics
      extends java.lang.Object
      implements java.io.Serializable

  Composite data type used to distribute metrics for the operating system hosting a member of the distributed system.
  Since:
    GemFire 7.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OSMetrics(long maxFileDescriptorCount, long openFileDescriptorCount, long processCpuTime, long committedVirtualMemorySize, long totalPhysicalMemorySize, long freePhysicalMemorySize, long totalSwapSpaceSize, long freeSwapSpaceSize, java.lang.String name, java.lang.String version, java.lang.String arch, int availableProcessors, double systemLoadAverage)` This constructor is to be used by internal JMX framework only.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getArch()` Returns the hardware architecture.
    `int` | `getAvailableProcessors()` Returns the number of available processors.
    `long` | `getCommittedVirtualMemorySize()` Returns the current number of megabytes of memory allocated.
    `long` | `getFreePhysicalMemorySize()` Returns the number of megabytes of free memory available to the operating system.
    `long` | `getFreeSwapSpaceSize()` Returns the number of megabytes of free swap space.
    `long` | `getMaxFileDescriptorCount()` Returns the maximum number of open file descriptors allowed by the operating system.
    `java.lang.String` | `getName()` Returns the name of the operating system.
    `long` | `getOpenFileDescriptorCount()` Returns the current number of open file descriptors..
    `long` | `getProcessCpuTime()` Returns the amount of time (in nanoseconds) used by the member's process.
    `double` | `getSystemLoadAverage()` Returns the system load average.
    `long` | `getTotalPhysicalMemorySize()` Returns the number of megabytes of memory available to the operating system.
    `long` | `getTotalSwapSpaceSize()` Returns the number of megabytes of swap space allocated.
    `java.lang.String` | `getVersion()` Returns the version of the operating system.
    `java.lang.String` | `toString()` String representation of OSMetrics

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### OSMetrics

          @ConstructorProperties(value={"maxFileDescriptorCount","openFileDescriptorCount","processCpuTime","committedVirtualMemorySize","totalPhysicalMemorySize","freePhysicalMemorySize","totalSwapSpaceSize","freeSwapSpaceSize","name","version","arch","availableProcessors","systemLoadAverage"})
          public OSMetrics(long maxFileDescriptorCount,
                                                                                                                                                                                                                                                                                                                          long openFileDescriptorCount,
                                                                                                                                                                                                                                                                                                                          long processCpuTime,
                                                                                                                                                                                                                                                                                                                          long committedVirtualMemorySize,
                                                                                                                                                                                                                                                                                                                          long totalPhysicalMemorySize,
                                                                                                                                                                                                                                                                                                                          long freePhysicalMemorySize,
                                                                                                                                                                                                                                                                                                                          long totalSwapSpaceSize,
                                                                                                                                                                                                                                                                                                                          long freeSwapSpaceSize,
                                                                                                                                                                                                                                                                                                                          java.lang.String name,
                                                                                                                                                                                                                                                                                                                          java.lang.String version,
                                                                                                                                                                                                                                                                                                                          java.lang.String arch,
                                                                                                                                                                                                                                                                                                                          int availableProcessors,
                                                                                                                                                                                                                                                                                                                          double systemLoadAverage)

      This constructor is to be used by internal JMX framework only. User should not try to create an instance of this class.

  - ### Method Detail

    - #### getMaxFileDescriptorCount

          public long getMaxFileDescriptorCount()

      Returns the maximum number of open file descriptors allowed by the operating system.

    - #### getOpenFileDescriptorCount

          public long getOpenFileDescriptorCount()

      Returns the current number of open file descriptors..

    - #### getProcessCpuTime

          public long getProcessCpuTime()

      Returns the amount of time (in nanoseconds) used by the member's process.

    - #### getCommittedVirtualMemorySize

          public long getCommittedVirtualMemorySize()

      Returns the current number of megabytes of memory allocated.

    - #### getTotalPhysicalMemorySize

          public long getTotalPhysicalMemorySize()

      Returns the number of megabytes of memory available to the operating system.

    - #### getFreePhysicalMemorySize

          public long getFreePhysicalMemorySize()

      Returns the number of megabytes of free memory available to the operating system.

    - #### getTotalSwapSpaceSize

          public long getTotalSwapSpaceSize()

      Returns the number of megabytes of swap space allocated.

    - #### getFreeSwapSpaceSize

          public long getFreeSwapSpaceSize()

      Returns the number of megabytes of free swap space.

    - #### getName

          public java.lang.String getName()

      Returns the name of the operating system.

    - #### getVersion

          public java.lang.String getVersion()

      Returns the version of the operating system.

    - #### getArch

          public java.lang.String getArch()

      Returns the hardware architecture.

    - #### getAvailableProcessors

          public int getAvailableProcessors()

      Returns the number of available processors.

    - #### getSystemLoadAverage

          public double getSystemLoadAverage()

      Returns the system load average.

    - #### toString

          public java.lang.String toString()

      String representation of OSMetrics
      Overrides:
        `toString` in class `java.lang.Object`