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

  • text

    Text output plugin for scm.

  • email

    Email plugin for scm which sends emails based on client status.

  • ncurses

    Ncurses output plugin for scm which presents an interactive table of processes.

Module Configuration

etc/defaults/global.cfg
etc/defaults/scm.cfg
etc/global.cfg
etc/scm.cfg
~/.seiscomp/global.cfg
~/.seiscomp/scm.cfg

scm inherits global options.

text extension

Text output plugin for scm.

mtextplugin.outputDir

Default: @LOGDIR@/scm/

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.

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

Default: true

Type: boolean

No description available

memailplugin.reportSilentClientsTimeSpan

Default: 1

Type: double

Unit: min

No description available

memailplugin.reportRequiredClients

Default: 10

Type: double

Unit: min

No description available

memailplugin.filterMeanInterval

Default: 10

Type: double

Unit: min

No description available

memailplugin.sendEmail

Default: false

Type: boolean

Enables sending of emails using mailx shell command.

Command-Line Options

scm [options]

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. Example: 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

Set 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

Set 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

Limit the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging backend. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Execute in debug mode. Equivalent to --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.

--content-type arg

Overrides configuration parameter connection.contentType.

--start-stop-msg arg

Set sending of a start and a stop message.

Monitor

-c, --clients list

Comma separated list of clients to monitor.

--print-tags

Print available keys for accessing client info data and to build filter configurations.

--no-output-plugins

Do not use output plugins such as mncursesplugin.