public interface Monitor
JavaSysMon.setMonitor(com.jezhumble.javasysmon.Monitor)
Modifier and Type | Method and Description |
---|---|
long |
cpuFrequencyInHz()
Get the CPU frequency in Hz
|
CpuTimes |
cpuTimes()
Gets a snapshot which contains the total amount
of time the CPU has spent in user mode, kernel mode,
and idle.
|
int |
currentPid()
Gets the pid of the process that is calling this method
(assuming it is running in the same process).
|
void |
killProcess(int pid)
Attempts to kill the process identified by the integer id supplied.
|
int |
numCpus()
Get the number of CPU cores.
|
String |
osName()
Get the operating system name.
|
MemoryStats |
physical()
Gets the physical memory installed, and the amount free.
|
ProcessInfo[] |
processTable()
Get the current process table.
|
MemoryStats |
swap()
Gets the amount of swap available to the operating system,
and the amount that is free.
|
long |
uptimeInSeconds()
How long the system has been up in seconds.
|
String osName()
int numCpus()
long cpuFrequencyInHz()
long uptimeInSeconds()
CpuTimes cpuTimes()
CpuTimes.getCpuUsage(com.jezhumble.javasysmon.CpuTimes)
MemoryStats physical()
MemoryStats swap()
int currentPid()
ProcessInfo[] processTable()
void killProcess(int pid)
pid
- The id of the process to killCopyright © 2009 ThoughtWorks. All Rights Reserved.