|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.palantir.opensource.sysmon.linux.LinuxVMStatJMXWrapper
public class LinuxVMStatJMXWrapper
Monitors system performance statistics as generated by vmstat.
vmstat reports information about processes, memory, paging, block IO,
traps, and cpu activity.
sysmon.linux.beanpath:type=linux-vmstat
| Config Key | Description | Default Value | Constant |
|---|---|---|---|
| sysmon.linux.vmstat.path | path to vmstat binary |
vmstat |
CONFIG_KEY_VMSTAT_PATH |
| sysmon.linux.vmstat.opts | options passed to vmstat |
-n |
CONFIG_KEY_VMSTAT_OPTIONS |
| sysmon.linux.vmstat.period | period in seconds between vmstat data runs |
60 |
CONFIG_KEY_VMSTAT_PERIOD |
Lifecycle documentation,
vmstat(8) man page| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static String |
BEAN_TYPE
This bean will be mounted at the passed path with type of ":type=linux-vmstat" |
static String |
CONFIG_KEY_VMSTAT_OPTIONS
Options passed to vmstat (other than period argument). |
static String |
CONFIG_KEY_VMSTAT_PATH
Path to vmstat executable. |
static String |
CONFIG_KEY_VMSTAT_PERIOD
Period for vmstat. |
static String |
DEFAULT_VMSTAT_OPTIONS
Default options for vmstat. |
static String |
DEFAULT_VMSTAT_PATH
Defaults to using a bare path to allow $PATH to find the vmstat executable. |
static Integer |
DEFAULT_VMSTAT_PERIOD
Default for vmstat reporting period. |
static String |
OBJECT_NAME
Added to the bean path to find the place to hang the vmstat data. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
LinuxVMStatJMXWrapper(Properties config)
Constructs (but does not start) a new instance of this monitor. |
|
| Method Summary | |
|---|---|
void |
run()
|
void |
startMonitoring()
|
void |
stopMonitoring()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIG_KEY_VMSTAT_PATH
default value for this config parameter,
vmstat(8) on your local linux box,
Constant Field Valuespublic static final String CONFIG_KEY_VMSTAT_OPTIONS
DEFAULT_VMSTAT_OPTIONS,
vmstat(8) on your local linux box,
Constant Field Valuespublic static final String CONFIG_KEY_VMSTAT_PERIOD
DEFAULT_VMSTAT_PERIOD,
vmstat(8) on your local linux box,
Constant Field Valuespublic static final String DEFAULT_VMSTAT_PATH
how to override the default,
Constant Field Valuespublic static final String DEFAULT_VMSTAT_OPTIONS
how to override the default,
Constant Field Valuespublic static final Integer DEFAULT_VMSTAT_PERIOD
how to override the default config valuepublic static final String OBJECT_NAME
for information on the bean path.,
Constant Field Valuespublic static final String BEAN_TYPE
| Constructor Detail |
|---|
public LinuxVMStatJMXWrapper(Properties config)
throws LinuxMonitoringException
startMonitoring() to start the monitor and start taking data.
config - configuration for this monitor. Will not be modified.
JMException - on an error with JMX server operations (usually related to MXBean naming).
LinuxMonitoringException - on misconfiguration of the monitor itself.| Method Detail |
|---|
public void startMonitoring()
throws LinuxMonitoringException
startMonitoring in interface MonitorLinuxMonitoringExceptionpublic void run()
run in interface Runnablerun in class Thread
public void stopMonitoring()
throws InterruptedException
stopMonitoring in interface MonitorInterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||