public class WindowsCentralProcessor extends AbstractCentralProcessor
cpu64, cpuFamily, cpuIdentifier, cpuModel, cpuName, cpuSerialNumber, cpuStepping, cpuVendor, cpuVendorFreq, curProcTicks, curTicks, jsonFactory, logicalProcessorCount, physicalProcessorCount, prevProcTicks, prevTicks, procTickTime, tickTime| Constructor and Description |
|---|
WindowsCentralProcessor()
Create a Processor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateProcessorCounts()
Updates logical and physical processor counts from /proc/cpuinfo
|
OSProcess |
getProcess(int pid)
Gets information on a currently running process
|
int |
getProcessCount()
Get the number of processes currently running
|
OSProcess[] |
getProcesses()
Gets currently running processes
|
int |
getProcessId()
Gets the current process ID
|
long[][] |
getProcessorCpuLoadTicks()
Get Processor CPU Load tick counters.
|
long[] |
getSystemCpuLoadTicks()
Get System-wide CPU Load tick counters.
|
long |
getSystemIOWaitTicks()
Get System IOWait tick counters (if available on that Operating System).
|
long[] |
getSystemIrqTicks()
Get System IRQ tick counters (if available on that Operating System).
|
double[] |
getSystemLoadAverage(int nelem)
Returns the system load average for the number of elements specified, up
to 3, representing 1, 5, and 15 minutes.
|
String |
getSystemSerialNumber()
Get the System/CPU Serial Number, if available.
|
long |
getSystemUptime()
Get the System uptime (time since boot).
|
int |
getThreadCount()
Get the number of threads currently running
|
getFamily, getIdentifier, getLogicalProcessorCount, getModel, getName, getPhysicalProcessorCount, getProcessorCpuLoadBetweenTicks, getStepping, getSystemCpuLoad, getSystemCpuLoadBetweenTicks, getSystemLoadAverage, getVendor, getVendorFreq, initTicks, isCpu64bit, setCpu64, setFamily, setIdentifier, setModel, setName, setStepping, setVendor, setVendorFreq, toJSON, toString, updateProcessorTicks, updateSystemTicksprotected void calculateProcessorCounts()
calculateProcessorCounts in class AbstractCentralProcessorpublic long[] getSystemCpuLoadTicks()
CentralProcessor.getSystemIOWaitTicks(). The system time
includes system time spent servicing Hardware and Software IRQ requests
as reported by CentralProcessor.getSystemIrqTicks() as well as executing other
virtual hosts (steal) or running a virtual cpu (guest).getSystemCpuLoadTicks in interface CentralProcessorgetSystemCpuLoadTicks in class AbstractCentralProcessorpublic long getSystemIOWaitTicks()
CentralProcessor.getSystemCpuLoadTicks() but is provided separately
for more detail.getSystemIOWaitTicks in interface CentralProcessorgetSystemIOWaitTicks in class AbstractCentralProcessorpublic long[] getSystemIrqTicks()
CentralProcessor.getSystemCpuLoadTicks() but is provided separately for more
detail.getSystemIrqTicks in interface CentralProcessorgetSystemIrqTicks in class AbstractCentralProcessorpublic double[] getSystemLoadAverage(int nelem)
getSystemLoadAverage in interface CentralProcessorgetSystemLoadAverage in class AbstractCentralProcessornelem - Number of elements to return.public long[][] getProcessorCpuLoadTicks()
CentralProcessor.getLogicalProcessorCount() arrays, each containing four
elements representing clock ticks or milliseconds (platform dependent)
spent in User (0), Nice (1), System (2), and Idle (3) states. By
measuring the difference between ticks across a time interval, CPU load
over that interval may be calculated.
The Idle time for this method includes processor time spent idle waiting
for IO as reported by CentralProcessor.getSystemIOWaitTicks(). The system time
includes processor time spent servicing Hardware IRQ requests as reported
by CentralProcessor.getSystemIrqTicks() as well as Software IRQ requests
(softirq), executing other virtual hosts (steal) or running a virtual cpu
(guest).getProcessorCpuLoadTicks in interface CentralProcessorgetProcessorCpuLoadTicks in class AbstractCentralProcessorpublic long getSystemUptime()
getSystemUptime in interface CentralProcessorgetSystemUptime in class AbstractCentralProcessorpublic String getSystemSerialNumber()
getSystemSerialNumber in interface CentralProcessorgetSystemSerialNumber in class AbstractCentralProcessorpublic OSProcess[] getProcesses()
OSProcess objects for
currently running processespublic OSProcess getProcess(int pid)
pid - A process IDOSProcess object for the specified
process id if it is running; null otherwise currently running
processespublic int getProcessId()
public int getProcessCount()
getProcessCount in interface CentralProcessorgetProcessCount in class AbstractCentralProcessorpublic int getThreadCount()
getThreadCount in interface CentralProcessorgetThreadCount in class AbstractCentralProcessorCopyright © 2010–2016 com.github.dblock. All rights reserved.