com.palantir.opensource.sysmon.linux
Class LinuxMonitor

java.lang.Object
  extended by com.palantir.opensource.sysmon.linux.LinuxMonitor
All Implemented Interfaces:
SystemMonitor

public class LinuxMonitor
extends Object
implements SystemMonitor

Implementation of Linux monitoring, this class monitors a Linux host system, starts and stops monitors.


Field Summary
static String CONFIG_KEY_JMX_BEAN_PATH
           
static String CONFIG_KEY_PREFIX
          Prefix for configuration key for the LinuxMonitor.
static String DEFAULT_JMX_BEAN_PATH
          Default path for JMX Beans for this monitor.
 
Constructor Summary
LinuxMonitor()
           
 
Method Summary
 void startPlatformSpecificMonitoring(Properties config)
          Starts up monitoring for a Linux VM.
 void stopPlatformSpecificMonitoring()
          Shuts down and cleans up all the Linux monitors mananged by this class.
 void verifyExecutionEnvironment(Properties config)
          Runs any tests to verify that the currently running VM is appropriate for this monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_KEY_PREFIX

public static final String CONFIG_KEY_PREFIX
Prefix for configuration key for the LinuxMonitor. Prefix: "sysmon.linux"

See Also:
Constant Field Values

DEFAULT_JMX_BEAN_PATH

public static final String DEFAULT_JMX_BEAN_PATH
Default path for JMX Beans for this monitor. Path: "sysmon.linux"

See Also:
Constant Field Values

CONFIG_KEY_JMX_BEAN_PATH

public static final String CONFIG_KEY_JMX_BEAN_PATH
See Also:
Constant Field Values
Constructor Detail

LinuxMonitor

public LinuxMonitor()
Method Detail

startPlatformSpecificMonitoring

public void startPlatformSpecificMonitoring(Properties config)
                                     throws SysmonException,
                                            LinuxMonitoringException
Starts up monitoring for a Linux VM. The failure of any monitor during configuration and startup results in a fatal error and all monitors will be shutdown.

Specified by:
startPlatformSpecificMonitoring in interface SystemMonitor
Parameters:
config - configuration information for the specific monitor implementations. Must empty and/or null Properties objects as a way of signalling that default values should be used.
Throws:
SysmonException - if this platform doesn't match this monitor. The method verifyExecutionEnvironment(Properties)
LinuxMonitoringException - - on error with configuration or startup of a specific monitor. should be called first to check for potential mismatches between platform and monitor.

stopPlatformSpecificMonitoring

public void stopPlatformSpecificMonitoring()
Shuts down and cleans up all the Linux monitors mananged by this class.

Specified by:
stopPlatformSpecificMonitoring in interface SystemMonitor

verifyExecutionEnvironment

public void verifyExecutionEnvironment(Properties config)
                                throws SysmonException
Runs any tests to verify that the currently running VM is appropriate for this monitor. In particular, this monitors checks that the VM is running on os.name of 'Linux' and that the os.version starts with '2.6'.

Specified by:
verifyExecutionEnvironment in interface SystemMonitor
Parameters:
config - configuration parameters to be used with this monitor. Currently ignored by this particular implementation.
Throws:
SysmonException - if the execution environment is not apropriate for this monitor.


Copyright © 2012 Palantir Technologies. All Rights Reserved.