|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.palantir.opensource.sysmon.linux.LinuxEntropyLevelJMXWrapper
public class LinuxEntropyLevelJMXWrapper
Monitors entropy pools that feed secure random number generation.
Entropy pool size is reported in bytes and is read out of the /proc filesystem on a configurable period.
sysmon.linux.beanpath:type=EntropyLevel
Config Key | Description | Default Value | Constant |
---|---|---|---|
sysmon.linux.entropyLevel.period | Period, in seconds, between checks of the entropy pool | 10 |
CONFIG_KEY_ENTROPY_LEVEL_PERIOD |
Lifecycle documentation
,
the random(4) man page for more information on entropy poolsNested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String |
CONFIG_KEY_ENTROPY_LEVEL_PERIOD
Set this value in the configuration file to set how often (in seconds) the entropy levels are checked. |
static int |
DEFAULT_ENTROPY_LEVEL_PERIOD
Default value for how often (in seconds) the entropy levels are checked. |
static String |
OBJECT_NAME
Path where this bean publishes its values. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LinuxEntropyLevelJMXWrapper(Properties config)
Constructs a new LinuxEntropyLevel object. |
Method Summary | |
---|---|
void |
run()
|
void |
startMonitoring()
Start background thread to monitor entropy levels. |
void |
stopMonitoring()
Signals for the background thread to shutdown and waits for its execution to finish. |
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_ENTROPY_LEVEL_PERIOD
for default value for the configuration parameter.
,
Constant Field Valuespublic static final int DEFAULT_ENTROPY_LEVEL_PERIOD
for instructions on overriding the default value.
,
Constant Field Valuespublic static final String OBJECT_NAME
Constructor Detail |
---|
public LinuxEntropyLevelJMXWrapper(Properties config) throws LinuxMonitoringException
LinuxEntropyLevel
object. You must call
startMonitoring()
to start the background thread that will
continually update the entropy pool values.
Note that the constructor will do a single read of the entropy to verify that everything
will work in the background thread. Therefore, constructing one of these object is a valid
way to take a one-time reading of the entropy pool size.
config
- configuration for this JMX wrapper. Passing null or an empty
Properties
object will just use the default config values.
LinuxMonitoringException
- on configuration or data read error.Method Detail |
---|
public void startMonitoring()
startMonitoring
in interface Monitor
LinuxMonitoringException
public void stopMonitoring() throws InterruptedException
stopMonitoring
in interface Monitor
InterruptedException
- if the calling thread is interrupted while waiting for
the background thread to Thread.join()
.public void run()
run
in interface Runnable
run
in class Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |