com.ibm.lang.management

Class OperatingSystemMXBeanImpl

  1. java.lang.Object
  2. extended bycom.ibm.lang.management.DynamicMXBeanImpl
  3. extended bycom.ibm.lang.management.OperatingSystemMXBeanImpl
All implemented interfaces:
java.lang.management.OperatingSystemMXBean, javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter

  1. public final class OperatingSystemMXBeanImpl
  2. extends DynamicMXBeanImpl
  3. implements OperatingSystemMXBean, javax.management.NotificationEmitter
Runtime type for OperatingSystemMXBean. In addition to implementing the "standard" management interface java.lang.management.GarbageCollectorMXBean, this class also provides an implementation of the IBM extension interface com.ibm.lang.management.OperatingSystemMXBean.
Since:
1.5

Field Summary

Fields inherited from class com.ibm.lang.management.DynamicMXBeanImpl
info

Method Summary

Modifier and Type Method and Description
  1. void
addNotificationListener(javax.management.NotificationListener listener,javax.management.NotificationFilter filter,java.lang.Object handback)
  1. java.lang.String
getArch()
  1. int
getAvailableProcessors()
  1. long
getFreePhysicalMemorySize()
  1. java.lang.String
getName()
  1. javax.management.MBeanNotificationInfo[]
getNotificationInfo()
  1. long
getProcessCpuTime()
  1. int
getProcessingCapacity()
  1. long
getProcessPhysicalMemorySize()
  1. long
getProcessPrivateMemorySize()
  1. long
getProcessVirtualMemorySize()
  1. double
getSystemLoadAverage()
  1. long
getTotalPhysicalMemory()
  1. java.lang.String
getVersion()
  1. void
removeNotificationListener(javax.management.NotificationListener listener)
  1. void
removeNotificationListener(javax.management.NotificationListener listener,javax.management.NotificationFilter filter,java.lang.Object handback)
  1. void
sendNotification(javax.management.Notification notification)
Methods inherited from class com.ibm.lang.management.DynamicMXBeanImpl
getAttribute, getAttributes, getMBeanInfo, getPresentAttribute, getPresentOperation, initMBeanInfo, invoke, setAttribute, setAttributes, setMBeanInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getArch

  1. public java.lang.String getArch( )

Description copied from interface: java.lang.management.OperatingSystemMXBean

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.
Specified by:
getArch in interface java.lang.management.OperatingSystemMXBean
Returns:
the identifier for the operating system architecture.
See Also:
System.getProperty(java.lang.String)

getAvailableProcessors

  1. public int getAvailableProcessors( )

Description copied from interface: java.lang.management.OperatingSystemMXBean

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().
Specified by:
getAvailableProcessors in interface java.lang.management.OperatingSystemMXBean
Returns:
the number of available processors.

getName

  1. public java.lang.String getName( )

Description copied from interface: java.lang.management.OperatingSystemMXBean

Returns the name of 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.name" for the key.
Specified by:
getName in interface java.lang.management.OperatingSystemMXBean
Returns:
the name of the operating system.
See Also:
System.getProperty(java.lang.String)

getVersion

  1. public java.lang.String getVersion( )

Description copied from interface: java.lang.management.OperatingSystemMXBean

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.
Specified by:
getVersion in interface java.lang.management.OperatingSystemMXBean
Returns:
the version of the operating system.
See Also:
System.getProperty(java.lang.String)

getTotalPhysicalMemory

  1. public long getTotalPhysicalMemory( )

Description copied from interface: OperatingSystemMXBean

Returns the total number of bytes used for physical memory.
Returns:
the number of bytes used for physical memory

getProcessingCapacity

  1. public int getProcessingCapacity( )

Description copied from interface: OperatingSystemMXBean

Returns the collective capacity of the virtual processors in the partition the VM is running in. The value returned is in units of 1% of a physical processor's capacity, so a value of 100 is equal to 1 physical processor. In environments without such partitioning support, this call will return getAvailableProcessors() * 100.
Returns:
the collective capacity of the virtual processors available to the VM

removeNotificationListener

  1. public void removeNotificationListener( javax.management.NotificationListener listener,
  2. javax.management.NotificationFilter filter,
  3. java.lang.Object handback)
  4. throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface javax.management.NotificationEmitter
Throws:
javax.management.ListenerNotFoundException

addNotificationListener

  1. public void addNotificationListener( javax.management.NotificationListener listener,
  2. javax.management.NotificationFilter filter,
  3. java.lang.Object handback)
  4. throws java.lang.IllegalArgumentException
Specified by:
addNotificationListener in interface javax.management.NotificationBroadcaster
Throws:
java.lang.IllegalArgumentException

removeNotificationListener

  1. public void removeNotificationListener( javax.management.NotificationListener listener)
  2. throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface javax.management.NotificationBroadcaster
Throws:
javax.management.ListenerNotFoundException

getNotificationInfo

  1. public javax.management.MBeanNotificationInfo[] getNotificationInfo( )
Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster

sendNotification

  1. public void sendNotification(javax.management.Notification notification)

getSystemLoadAverage

  1. public double getSystemLoadAverage( )

Description copied from interface: java.lang.management.OperatingSystemMXBean

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.

Specified by:
getSystemLoadAverage in interface java.lang.management.OperatingSystemMXBean
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.

getProcessCpuTime

  1. public long getProcessCpuTime()

Description copied from interface: OperatingSystemMXBean

Returns total amount of time the process has been scheduled or executed so far in both kernel and user modes. Returns -1 if the value is unavailable on this platform or in the case of an error.
Returns:
process cpu time in 100 ns units

getFreePhysicalMemorySize

  1. public long getFreePhysicalMemorySize( )

Description copied from interface: OperatingSystemMXBean

Returns the amount of physical memory that is available on the system in bytes. Returns -1 if the value is unavailable on this platform or in the case of an error.
Returns:
amount of physical memory available in bytes

getProcessVirtualMemorySize

  1. public long getProcessVirtualMemorySize( )

Description copied from interface: OperatingSystemMXBean

Returns the amount of virtual memory used by the process in bytes, including physical memory and swap space. Returns -1 if the value is unavailable on this platform or in the case of an error.
Returns:
amount of virtual memory used by the process in bytes

getProcessPrivateMemorySize

  1. public long getProcessPrivateMemorySize( )

Description copied from interface: OperatingSystemMXBean

Returns the amount of private memory used by the process in bytes. Returns -1 if the value is unavailable on this platform or in the case of an error.
Returns:
amount of private memory used by the process in bytes

getProcessPhysicalMemorySize

  1. public long getProcessPhysicalMemorySize( )

Description copied from interface: OperatingSystemMXBean

Returns the amount of physical memory being used by the process in bytes. Returns -1 if the value is unavailable on this platform or in the case of an error.
Returns:
amount of physical memory being used by the process in bytes