Next: , Previous: , Up: Overview   [Contents][Index]

2.2 Process Exclusion Groups

The widespread use of containerization techniques makes simple process grouping insufficient for monitoring purposes. Quite often the question is not simply “how many ‘X’ processes are running”, but rather “how many ‘X’ processes are running on the host itself, not in containers”. To answer this question, hostproc introduces the notion of process exclusion group.

Process exclusion group is a set of processes that descend from a common set of ancestors. These ancestor processes are selected by their name or command line, as for normal process groups. Descendants of these ancestors are excluded from both the processTable and processGroupTable, and their summary statistics is collected in the exclusion group.

Process exclusion group is defined by the exclude configuration statement. This statement allows for the same substatements as the group statement. The only important difference is that the field, pattern and match statements select ancestors of the group members, not the members themselves.

Given this notion, the question posed at the beginning of this section can be answered by observing that all processes that run within docker containers are descendants of containerd-shim processes. Thus, if we define the following exclusion group:

  exclude containers
    field comm
    pattern containerd-shim

then this group will contain all processes run from the docker containers. All these processes will be excluded both from the detailed listing and from the group table, so that these two tables will contain only those processes that are run directly on the host.

The summary statistics about processes in the exclusion groups is returned in the processExcludedTable table. This table is similar to processGroupTable:

processExcludedName.0 = STRING: containers
processExcludedPattern.0 = STRING: containerd-shim
processExcludedField.0 = INTEGER: ProcessComm(0)
processExcludedMatch.0 = INTEGER: exact(0)
processExcludedOK.0 = INTEGER: true(1)
processExcludedMinCount.0 = INTEGER: 0
processExcludedMaxCount.0 = INTEGER: 0
processExcludedMaxVSZ.0 = Gauge32: 0 kB
processExcludedMaxRSS.0 = Gauge32: 0 kB
processExcludedMaxCPU.0 = Gauge32: 0
processExcludedCount.0 = INTEGER: 88
processExcludedCPUMax.0 = Gauge32: 3
processExcludedCPUAvg.0 = Gauge32: 1
processExcludedCPUInst.0 = Gauge32: 5
processExcludedVSZ.0 = Gauge32: 20444900 kB
processExcludedRSS.0 = Gauge32: 275948 kB

Next: , Previous: , Up: Overview   [Contents][Index]