Next: Process exclusion, Previous: Basic statements, Up: Configuration file [Contents][Index]
Process group is a set of processes with the program name matching a
certain pattern. The process group is identified by its name and
is represented in the MIB by the processGroupTable
hierarchy, which
keeps summary statistics for all processes in the group.
Process groups are declared using the group
statement.
Create a process group name. This statement should be followed by one or more of the substatements described below, which will configure details of that group.
Defines the pattern that the name of a process must match in order
for that process to be included in the group. Defaults to the name
argument of the group
statement.
Specifies what to match against the pattern. The fn argument is one of:
Stands for the argv[0]
value. This is the default.
Full pathname of the executable file.
Entire command line.
Specifies how to match the selected field against the pattern. The argument can be one of:
Byte-to-byte comparison. This is the default.
Compare only the base names of pattern and field value.
Treat pattern as an extended regular expression.
Sets the minimum allowed number of running processes in the group.
Sets the maximum allowed number of running processes in the group.
Sets the maximum total usage of virtual memory for the group, in
kilobytes. Optional size suffixes are allowed: k
for kilobytes
(the default), m
for megabytes, and g
for gigabytes
(uppercase letters are also allowed).
If the sum of virtual memory used by each process in
the group becomes greater than size, then the corresponding
processGroupOK
instance will be set to false
.
Sets the maximum total resident set size. The size argument can
be followed by one of the suffixes k
, m
, or g
,
described above. The default is k
. If the sum of resident set
size used by all processes in the group becomes greater than
size, then the corresponding processGroupOK
instance will
be set to false
.
Sets the maximum CPU usage for the group, in percent. If total CPU
usage by all processes in the group becomes greater than pct,
then the corresponding processGroupOK
instance will be set to
false
.
An example of the group
declaration:
group prosody field cmdline match rx pattern lua .*/prosody$ min 1 max 1
For compatibility with snmpd
a simplified declaration is
allowed:
Create a process group name. The group will include processes with
the process name (argv[0]
) name. The max and
min parameters define maximum and minimum allowed number of
running processes for that group. If the number of processes in the
group becomes less than min or greater than max, then the
corresponding processGroupOK
instance will be set to false
.
If neither max nor min are specified, they will default to infinity and 1 respectively (“at least one”). If only max is specified, min will default to 0 (“no more than max”). If max is 0 and min is not, this indicates infinity (“at least min”). If both max and min are 0, this indicates a process that should not be running.
The proc
statement is equivalent to:
group name pattern name field comm match exact min min max max
Next: Process exclusion, Previous: Basic statements, Up: Configuration file [Contents][Index]