public class CommandMonitor extends Monitor
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
command |
cachedCPU, cachedPID, cacheTimeout, cpuDetectedAt, invalidMonitor, logger| Constructor and Description |
|---|
CommandMonitor() |
CommandMonitor(java.lang.String command) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
detectPID()
Returns the PID of Java VM.
|
protected int |
detectTotalCpuPercent()
Returns the system CPU usage, in percents, between 0 and 100.
|
java.lang.String |
getCommand() |
void |
setCommand(java.lang.String command) |
getPID, getTotalCpuPercentpublic CommandMonitor()
public CommandMonitor(java.lang.String command)
protected int detectTotalCpuPercent()
throws java.lang.Exception
detectTotalCpuPercent in class Monitorjava.lang.Exception - any I/O or missing DLL exceptionprotected long detectPID()
public java.lang.String getCommand()
public void setCommand(java.lang.String command)