com.palantir.opensource.sysmon.linux
Class LinuxLoadAverageJMXWrapper
java.lang.Object
java.lang.Thread
com.palantir.opensource.sysmon.linux.LinuxLoadAverageJMXWrapper
- All Implemented Interfaces:
- Monitor, Runnable
public class LinuxLoadAverageJMXWrapper
- extends Thread
- implements Monitor
Monitors load average. Requires the uptime
utility.
Reads the output from 'uptime' that looks like this:
13:22:52 up 18 days, 20:51, 3 users, load average: 0.31, 0.14, 0.10
Currently, the uptime data from uptime
is not processed.
JMX Data Path
sysmon.linux.beanpath:type=LoadAverage
Configuration parameters
Note that any value not set in the config file will use the default value.
- See Also:
Lifecycle documentation
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 |
CONFIG_KEY_UPTIME_PATH
public static final String CONFIG_KEY_UPTIME_PATH
- Config key for the path to uptime.
Key: "sysmon.linux.uptime.path"
- See Also:
- Constant Field Values
CONFIG_KEY_UPTIME_PERIOD
public static final String CONFIG_KEY_UPTIME_PERIOD
- Config key for the period, in seconds, to pass to uptime.
Key: "sysmon.linux.uptime.period"
- See Also:
- Constant Field Values
DEFAULT_UPTIME_PATH
public static final String DEFAULT_UPTIME_PATH
- Default path to find uptime. Defaults to 'uptime', so that the shell can figure it via its $PATH.
Default: "uptime"
- See Also:
for config key used to override the default path
,
Constant Field Values
DEFAULT_UPTIME_PERIOD
public static final Integer DEFAULT_UPTIME_PERIOD
- Default period, in seconds.
Default:
- See Also:
for config key used to override the default period
UPTIME_DATA
public static final Pattern UPTIME_DATA
Pattern
for parsing uptime data.
OBJECT_NAME
public static final String OBJECT_NAME
- See Also:
- Constant Field Values
LinuxLoadAverageJMXWrapper
public LinuxLoadAverageJMXWrapper(Properties config)
throws LinuxMonitoringException
- Throws:
LinuxMonitoringException
startMonitoring
public void startMonitoring()
throws SysmonException
- Specified by:
startMonitoring
in interface Monitor
- Throws:
SysmonException
stopMonitoring
public void stopMonitoring()
throws InterruptedException
- Specified by:
stopMonitoring
in interface Monitor
- Throws:
InterruptedException
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2012 Palantir Technologies. All Rights Reserved.