procevents

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerIDLength is the standard length of the Container ID
	ContainerIdLength = 64

	// BpfContainerIdLength Minimum 31 chars to assume it is a Container ID
	// in case it was truncated
	BpfContainerIdLength = 31
)

Variables

This section is empty.

Functions

func GetRunningProcs

func GetRunningProcs() error

func LookupContainerId

func LookupContainerId(cgroup string, bpfSource bool, walkParent bool) (string, int)

LookupContainerId returns the container ID as a 31 character string length from the full cgroup path cgroup argument is the full cgroup path bpfSource is set to true if cgroup was obtained from BPF, otherwise false. walkParent if set then walk the parent hierarchy subdirs and try to find the container ID of the process,

this will allow to return the container id of services running inside, example: init.service etc.

Returns the container ID as a string of 31 characters and its offset on the full cgroup path, otherwise on errors an empty string and 0 as offset.

func ProcsContainerIdOffset

func ProcsContainerIdOffset(subdir string) (string, int)

ProcsContainerIdOffset Returns the container ID and its offset This can fail, better use LookupContainerId to handle different container runtimes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL