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
.info
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
java.lang.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.
|
long |
getFreePhysicalMemorySize()
Returns the amount of physical memory that is available on the
system in bytes.
|
java.lang.String |
getName()
Returns the name of the underlying operating system.
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo() |
long |
getProcessCpuTime()
Returns total amount of time the process has been scheduled or
executed so far in both kernel and user modes.
|
long |
getProcessCpuTimeByNS()
Returns total amount of time the process has been scheduled or
executed so far in both kernel and user modes.
|
int |
getProcessingCapacity()
Returns the collective capacity of the virtual processors in
the partition the VM is running in.
|
long |
getProcessPhysicalMemorySize()
Returns the amount of physical memory being used by the process
in bytes.
|
long |
getProcessPrivateMemorySize()
Returns the amount of private memory used by the process in bytes.
|
long |
getProcessVirtualMemorySize()
Returns the amount of virtual memory used by the process in bytes,
including physical memory and swap space.
|
double |
getSystemCpuLoad()
Returns the CPU utilization: fraction of the time spent in user or system/privileged
mode since the last call to getSystemCpuLoad().
|
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:
|
long |
getTotalPhysicalMemory()
Returns the total number of bytes used for physical memory.
|
java.lang.String |
getVersion()
Returns the version string for the underlying operating system.
|
void |
removeNotificationListener(javax.management.NotificationListener listener) |
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
void |
sendNotification(javax.management.Notification notification) |
getAttribute, getAttributes, getMBeanInfo, getPresentAttribute, getPresentOperation, initMBeanInfo, invoke, setAttribute, setAttributes, setMBeanInfo
public java.lang.String getArch()
java.lang.management.OperatingSystemMXBean
System.getProperty(java.lang.String)
supplying the value "os.arch" for the key.getArch
in interface java.lang.management.OperatingSystemMXBean
System.getProperty(java.lang.String)
public int getAvailableProcessors()
java.lang.management.OperatingSystemMXBean
Runtime.availableProcessors()
.getAvailableProcessors
in interface java.lang.management.OperatingSystemMXBean
public java.lang.String getName()
java.lang.management.OperatingSystemMXBean
System.getProperty(java.lang.String)
supplying the value
"os.name" for the key.getName
in interface java.lang.management.OperatingSystemMXBean
System.getProperty(java.lang.String)
public java.lang.String getVersion()
java.lang.management.OperatingSystemMXBean
System.getProperty(java.lang.String)
supplying the value
"os.version" for the key.getVersion
in interface java.lang.management.OperatingSystemMXBean
System.getProperty(java.lang.String)
public long getTotalPhysicalMemory()
OperatingSystemMXBean
public int getProcessingCapacity()
OperatingSystemMXBean
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationEmitter
javax.management.ListenerNotFoundException
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
addNotificationListener
in interface javax.management.NotificationBroadcaster
java.lang.IllegalArgumentException
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationBroadcaster
javax.management.ListenerNotFoundException
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
public void sendNotification(javax.management.Notification notification)
public double getSystemLoadAverage()
java.lang.management.OperatingSystemMXBean
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.
getSystemLoadAverage
in interface java.lang.management.OperatingSystemMXBean
public long getProcessCpuTime()
OperatingSystemMXBean
public long getFreePhysicalMemorySize()
OperatingSystemMXBean
public long getProcessVirtualMemorySize()
OperatingSystemMXBean
public long getProcessPrivateMemorySize()
OperatingSystemMXBean
public long getProcessPhysicalMemorySize()
OperatingSystemMXBean
public long getProcessCpuTimeByNS()
public double getSystemCpuLoad()
OperatingSystemMXBean
Returns the CPU utilization: fraction of the time spent in user or system/privileged mode since the last call to getSystemCpuLoad(). Other values include:
getSystemCpuLoad might not return the same value that is reported by operating system utilities such as Unix "top" or Windows task manager.