com.ibm.lang.management
Class OperatingSystemMXBeanImpl
- java.lang.Object
com.ibm.lang.management.DynamicMXBeanImpl
com.ibm.lang.management.OperatingSystemMXBeanImpl
All implemented interfaces:
java.lang.management.OperatingSystemMXBean, javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
- public final class OperatingSystemMXBeanImpl
- extends DynamicMXBeanImpl
- implements OperatingSystemMXBean, javax.management.NotificationEmitter
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 |
---|---|
|
addNotificationListener(javax.management.NotificationListener listener,javax.management.NotificationFilter filter,java.lang.Object handback)
|
|
getArch()
|
|
getAvailableProcessors()
|
|
getFreePhysicalMemorySize()
|
|
getName()
|
|
getNotificationInfo()
|
|
getProcessCpuTime()
|
|
getProcessingCapacity()
|
|
getProcessPhysicalMemorySize()
|
|
getProcessPrivateMemorySize()
|
|
getProcessVirtualMemorySize()
|
|
getSystemLoadAverage()
|
|
getTotalPhysicalMemory()
|
|
getVersion()
|
|
removeNotificationListener(javax.management.NotificationListener listener)
|
|
removeNotificationListener(javax.management.NotificationListener listener,javax.management.NotificationFilter filter,java.lang.Object handback)
|
|
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
- public java.lang.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.
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
- 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
- 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
- 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
- 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
- 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
- public void removeNotificationListener( javax.management.NotificationListener listener,
- javax.management.NotificationFilter filter,
- java.lang.Object handback)
- throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener
in interface javax.management.NotificationEmitter
Throws:
javax.management.ListenerNotFoundException
addNotificationListener
- public void addNotificationListener( javax.management.NotificationListener listener,
- javax.management.NotificationFilter filter,
- java.lang.Object handback)
- throws java.lang.IllegalArgumentException
Specified by:
addNotificationListener
in interface javax.management.NotificationBroadcaster
Throws:
java.lang.IllegalArgumentException
removeNotificationListener
- public void removeNotificationListener( javax.management.NotificationListener listener)
- throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
Throws:
javax.management.ListenerNotFoundException
getNotificationInfo
- public javax.management.MBeanNotificationInfo[] getNotificationInfo( )
Specified by:
getNotificationInfo
in interface javax.management.NotificationBroadcaster
sendNotification
- public void sendNotification(javax.management.Notification notification)
getSystemLoadAverage
- 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
- 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
- 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
- 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
- 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
- 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
Description copied from interface:
java.lang.management.OperatingSystemMXBean