ProcEnviron - File /proc/<PID>/environ
¶
Parser for parsing the environ
file under /proc/<PID>
directory.
-
class
insights.parsers.proc_environ.
OpenshiftFluentdEnviron
(context)[source]¶ Bases:
insights.parsers.proc_environ.ProcEnviron
Class for parsing the
environ
file of thefluentd
process.
-
class
insights.parsers.proc_environ.
OpenshiftRouterEnviron
(context)[source]¶ Bases:
insights.parsers.proc_environ.ProcEnviron
Class for parsing the
environ
file of theopenshift-route
process.
-
class
insights.parsers.proc_environ.
ProcEnviron
(context)[source]¶ Bases:
insights.core.Parser
,insights.core.LegacyItemAccess
Base class for parsing the
environ
file under special/proc/<PID>
directory into a dictionaries with environment variable name as key and containing environment variable value.Typical content looks like:
REGISTRIES=--add-registry registry.access.redhat.com OPTIONS= --selinux-enabled --signature-verification=FalseDOCKER_HTTP_HOST_COMPAT=1ADD_REGISTRY=--add-registry registry.access.redhat.comPATH=/usr/libexec/docker:/usr/bin:/usr/sbinPWD=/run/docker/libcontainerd/containerd/135240dbd15a834acb21d68867930917afcc84c5f006ba65004acd88dccab756/initLANG=en_US.UTF-8GOTRACEBACK=crashDOCKER_NETWORK_OPTIONS= --mtu=1450DOCKER_CERT_PATH=/etc/dockerSHLVL=0DOCKER_STORAGE_OPTIONS=--storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=/dev/mapper/docker--vg-docker--pool --storage-opt dm.use_deferred_removal=true --storage-opt dm.use_deferred_deletion=true
Examples
>>> proc_environ['REGISTRIES'] '--add-registry registry.access.redhat.com' >>> 'OPTIONS' in proc_environ True
Raises: insights.core.exceptions.SkipComponent
-- if theenviron
file is empty or doesn’t exist.insights.core.exceptions.ParseException
-- if theenviron
file content is incorrect.