adams.flow.standalone.MemoryMonitor
Monitors the memory (used/committed heap vs maximum heap).Every number of seconds ('sampleInterval'), the memory consumption, i.e., 'heap used', is sampled, keeping the specified number of latest samples ('numSamples').
Once the specified number of samples have been reached, it is checked whether the specified percentage of samples ('coverage') reaches or exceeds the threshold percentage of the maximum heap has been exceeded ('threshold'). If that should be the case, a notification is sent.
After a notification has been sent out, a minimum wait time in seconds is imposed before sending out another one ('notificationWait').
Also skips coverage tests, if the number if samples reaching/exceeding the threshold is in decline.
Available placeholders for the message template:
- {threshold_perc}: user-provided parameter
- {threshold_bytes}: calculated bytes
- {num_samples}: user-provided parameter
- {coverage_perc}: user-provided parameter
- {coverage_num}: calculated number
- {max_bytes}: obtained from running system
Flow input/output:
-standalone-
The logging level for outputting errors and debugging output.
command-line | -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> |
default | WARNING |
min-user-mode | Expert |
The name of the actor.
command-line | -name <java.lang.String> |
default | MemoryMonitor |
The annotations to attach to this actor.
command-line | -annotation <adams.core.base.BaseAnnotation> |
default |
|
If set to true, transformation is skipped and the input token is just forwarded as it is.
command-line | -skip <boolean> |
default | false |
If set to true, the flow execution at this level gets stopped in case this actor encounters an error; the error gets propagated; useful for critical actors.
command-line | -stop-flow-on-error <boolean> |
default | false |
min-user-mode | Expert |
If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well.
command-line | -silent <boolean> |
default | false |
min-user-mode | Expert |
The type of memory to monitor.
command-line | -memory-type <HEAP_USED|HEAP_COMMITTED> |
default | HEAP_USED |
The sample interval in seconds.
command-line | -sample-interval <int> |
default | 10 |
minimum | 1 |
The number of samples to use for making a decision.
command-line | -num-samples <int> |
default | 100 |
minimum | 1 |
The percentage of the maximum heap that the used heap must reach/exceed (0-100).
command-line | -threshold <double> |
default | 80.0 |
minimum | 0.0 |
maximum | 100.0 |
The percentage of samples that reach/exceed the threshold (0-100).
command-line | -coverage <double> |
default | 75.0 |
minimum | 0.0 |
maximum | 100.0 |
The notification to use.
command-line | -notification <adams.flow.sink.sendnotification.AbstractNotification> |
default | adams.flow.sink.sendnotification.Null |
The message template to use.
command-line | -message-template <adams.core.base.BaseText> |
default | {coverage_perc}% of {num_samples} samples have exceeded the threshold of {threshold_perc}% (= {threshold_bytes}) of the maximum heap of {max_bytes}. |
The number of seconds to wait before sending out another notification.
command-line | -notification-wait <int> |
default | 86400 |
minimum | 1 |