| Constructor and Description |
|---|
CentralProcessor(int procNo)
Create a Processor with the given number
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFamily() |
String |
getIdentifier()
Identifier, eg.
|
float |
getLoad()
Deprecated.
|
String |
getModel() |
String |
getName()
Name, eg.
|
double |
getProcessorCpuLoadBetweenTicks()
Returns the "recent cpu usage" for this processor by counting ticks for
this processor from
Processor.getProcessorCpuLoadTicks() between
successive calls of this method, with a minimum interval slightly less
than 1 second. |
long[] |
getProcessorCpuLoadTicks()
Get this Processor's CPU Load tick counters.
|
int |
getProcessorNumber()
Gets the processor number of this object, passed as an arg in the
constructor.
|
String |
getStepping() |
double |
getSystemCpuLoad()
Returns the "recent cpu usage" for the whole system from
com.sun.management.OperatingSystemMXBean#getSystemCpuLoad() if a
user is running the Oracle JVM. |
double |
getSystemCpuLoadBetweenTicks()
Returns the "recent cpu usage" for the whole system by counting ticks
from
Processor.getSystemCpuLoadTicks() between successive calls of this
method, with a minimum interval slightly less than 1 second. |
long[] |
getSystemCpuLoadTicks()
Get System-wide CPU Load tick counters.
|
double |
getSystemLoadAverage()
Returns the system load average for the last minute from
OperatingSystemMXBean.getSystemLoadAverage()
. |
String |
getVendor()
Vendor identifier, eg.
|
long |
getVendorFreq()
Vendor frequency (in Hz), eg.
|
boolean |
isCpu64bit()
Is CPU 64bit?
|
void |
setCpu64(boolean cpu64)
Set flag is cpu is 64bit.
|
void |
setFamily(String family) |
void |
setIdentifier(String identifier)
Set processor identifier.
|
void |
setModel(String model) |
void |
setName(String name)
Set processor name.
|
void |
setStepping(String stepping) |
void |
setVendor(String vendor)
Set processor vendor.
|
void |
setVendorFreq(long freq)
Set vendor frequency.
|
String |
toString() |
public CentralProcessor(int procNo)
procNo - public int getProcessorNumber()
getProcessorNumber in interface Processorpublic String getVendor()
public void setVendor(String vendor)
public String getName()
public void setName(String name)
public long getVendorFreq()
getVendorFreq in interface Processorpublic void setVendorFreq(long freq)
setVendorFreq in interface Processorfreq - Frequency.public String getIdentifier()
getIdentifier in interface Processorpublic void setIdentifier(String identifier)
setIdentifier in interface Processoridentifier - Identifier.public boolean isCpu64bit()
isCpu64bit in interface Processorpublic void setCpu64(boolean cpu64)
public String getStepping()
getStepping in interface Processorpublic void setStepping(String stepping)
setStepping in interface Processorstepping - the _stepping to setpublic void setModel(String model)
public String getFamily()
public void setFamily(String family)
@Deprecated public float getLoad()
Processor.getSystemCpuLoadTicks() between successive calls of this
method, with a minimum interval slightly less than 1 second.
If less than one second has elapsed since the last call of this method,
it will return a calculation based on the tick counts and times of the
previous two calls. If at least a second has elapsed, it will return the
average CPU load for the interval and update the "last called" times.
This method is intended to be used for periodic polling at intervals of 1
second or longer.public double getSystemCpuLoadBetweenTicks()
Processor.getSystemCpuLoadTicks() between successive calls of this
method, with a minimum interval slightly less than 1 second.
If less than one second has elapsed since the last call of this method,
it will return a calculation based on the tick counts and times of the
previous two calls. If at least a second has elapsed, it will return the
average CPU load for the interval and update the "last called" times.
This method is intended to be used for periodic polling at intervals of 1
second or longer.getSystemCpuLoadBetweenTicks in interface Processorpublic long[] getSystemCpuLoadTicks()
getSystemCpuLoadTicks in interface Processorpublic double getSystemCpuLoad()
com.sun.management.OperatingSystemMXBean#getSystemCpuLoad() if a
user is running the Oracle JVM. This value is a double in the [0.0,1.0]
interval. A value of 0.0 means that all CPUs were idle during the recent
period of time observed, while a value of 1.0 means that all CPUs were
actively running 100% of the time during the recent period being
observed. All values between 0.0 and 1.0 are possible depending of the
activities going on in the system. If the system recent cpu usage is not
available, the method returns a negative value.
Calling this method immediately upon instantiating the Processor
may give unreliable results.
If a user is not running the Oracle JVM, this method will default to the
behavior and return value of Processor.getSystemCpuLoadBetweenTicks().getSystemCpuLoad in interface Processorpublic double getSystemLoadAverage()
OperatingSystemMXBean.getSystemLoadAverage()
. The system load average is the sum of the number of runnable entities
queued to the available processors and the number of runnable entities
running on the available processors averaged over a period of time. The
way in which the load average is calculated is operating system specific
but is typically a damped time-dependent average.
If the load average is not available, a negative value is returned.
This method is designed to provide a hint about the system load and may
be queried frequently. The load average may be unavailable on some
platforms (e.g., Windows) where it is expensive to implement this method.getSystemLoadAverage in interface Processorpublic double getProcessorCpuLoadBetweenTicks()
Processor.getProcessorCpuLoadTicks() between
successive calls of this method, with a minimum interval slightly less
than 1 second.
If less than one second has elapsed since the last call of this method,
it will return a calculation based on the tick counts and times of the
previous two calls. If at least a second has elapsed, it will return the
average CPU load for the interval and update the "last called" times.
This method is intended to be used for periodic polling (iterating over
all processors) at intervals of 1 second or longer.getProcessorCpuLoadBetweenTicks in interface Processorpublic long[] getProcessorCpuLoadTicks()
getProcessorCpuLoadTicks in interface ProcessorCopyright © 2010-2015 com.github.dblock. All Rights Reserved.