scm¶
Process monitor.
Description¶
scm monitors client activity. scm connects to a certain master and periodically processes the status messages sent by the clients.
Each client status if forwarded to the plugins loaded by scm. By default the mncursesplugin is loaded which presents an interface similar to the gnu program top.
Filters¶
Plugins might support filtering client status information. To configure filters
each plugin supports a configuration value $name.filter
. This filter
is a string which can be constructed from available status info tags and logical
and numerical operators.
List of tags:
time
privategroup
hostname
clientname
ips
programname
pid
cpuusage
totalmemory
clientmemoryusage
memoryusage
sentmessages
receivedmessages
messagequeuesize
summedmessagequeuesize
averagemessagequeuesize
summedmessagesize
averagemessagesize
objectcount
uptime
responsetime
A filter might look like this:
memailplugin.filter = "(cpuusage>100 || totalmemory>1000) && hostname==proc-machine"
Numerical operators¶
Numerical operators are applied to a tag name and a constant value.
Operator | Description |
---|---|
== | equal |
!= | not equal |
< | less than |
> | greater than |
<= | less or equal |
>= | greater or equal |
Logical operators¶
Logical operators are applied to a group (might be enclosed in brackets) or numerical expressions.
Operator | Description |
---|---|
! | not |
&& | and |
|| | or |
Multiple instances¶
To monitor different clients sets with different criteria and different plugins it is common practice to create aliases of scm and to configure each instance separately
seiscomp alias create scm_level1 scm
seiscomp alias create scm_level2 scm
where scm_level1 could monitor all mandatory clients whereas scm_level2 monitors all clients which are not crucial for operation.
Plugins¶
Configuration¶
etc/defaults/global.cfg
etc/defaults/scm.cfg
etc/global.cfg
etc/scm.cfg
~/.seiscomp3/global.cfg
~/.seiscomp3/scm.cfg
scm inherits global options.
text extension¶
Text output plugin for scm.
-
mtextplugin.outputDir
¶ Type: string
Output directory where [client].txt is written to. Additionally an file description.txt will be created to show the order of tags used in the client status file. Default is
@LOGDIR@/scm/
.
email extension¶
Email plugin for scm which sends emails based on client status.
-
memailplugin.recipients
¶ Type: list:string
Defines a comma separated list of email addresses to send notifications to.
-
memailplugin.template
¶ Type: string
Configures a custom message text that is appended to each message when clients passed the filter.
-
memailplugin.filter
¶ Type: string
Defines the filter for each client status. A filter is an expression that can be constructed with all available status tags (scm –print-tags) and logical and numerical operators. See scm for more information.
-
memailplugin.requiredClients
¶ Type: list:string
No description available
-
memailplugin.reportSilentClients
¶ Type: boolean
Default is
true
.
-
memailplugin.reportSilentClientsTimeSpan
¶ Type: double
Unit: min
Default is
1
.
-
memailplugin.reportRequiredClients
¶ Type: double
Unit: min
Default is
10
.
-
memailplugin.filterMeanInterval
¶ Type: double
Unit: min
Default is
10
.
-
memailplugin.sendEmail
¶ Type: boolean
Enables sending of emails using mailx shell command. Default is
false
.
Command-line¶
Generic¶
-
-h
,
--help
¶
show help message.
-
-V
,
--version
¶
show version information
-
--config-file
arg
¶ Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it, eg scautopick -> scautopick2.
-
--plugins
arg
¶ Load given plugins.
-
-D
,
--daemon
¶
Run as daemon. This means the application will fork itself and doesn’t need to be started with &.
-
--auto-shutdown
arg
¶ Enable/disable self-shutdown because a master module shutdown. This only works when messaging is enabled and the master module sends a shutdown message (enabled with –start-stop-msg for the master module).
-
--shutdown-master-module
arg
¶ Sets the name of the master-module used for auto-shutdown. This is the application name of the module actually started. If symlinks are used then it is the name of the symlinked application.
-
--shutdown-master-username
arg
¶ Sets the name of the master-username of the messaging used for auto-shutdown. If “shutdown-master-module” is given as well this parameter is ignored.
Verbosity¶
-
--verbosity
arg
¶ Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug
-
-v
,
--v
¶
Increase verbosity level (may be repeated, eg. -vv)
-
-q
,
--quiet
¶
Quiet mode: no logging output
-
--component
arg
¶ Limits the logging to a certain component. This option can be given more than once.
-
-s
,
--syslog
¶
Use syslog logging back end. The output usually goes to /var/lib/messages.
-
-l
,
--lockfile
arg
¶ Path to lock file.
-
--console
arg
¶ Send log output to stdout.
-
--debug
¶
Debug mode: –verbosity=4 –console=1
-
--log-file
arg
¶ Use alternative log file.
Messaging¶
-
-u
,
--user
arg
¶ Overrides configuration parameter
connection.username
.
-
-H
,
--host
arg
¶ Overrides configuration parameter
connection.server
.
-
-t
,
--timeout
arg
¶ Overrides configuration parameter
connection.timeout
.
-
-g
,
--primary-group
arg
¶ Overrides configuration parameter
connection.primaryGroup
.
-
-S
,
--subscribe-group
arg
¶ A group to subscribe to. This option can be given more than once.
-
--encoding
arg
¶ Overrides configuration parameter
connection.encoding
.
-
--start-stop-msg
arg
¶ Sets sending of a start- and a stop message.