podcgroup

package
v0.0.0-...-37aef56 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIDFromCgroupPath

func ExtractIDFromCgroupPath(cgroupPath string) (podUID, containerID string)

ExtractIDFromCgroupPath finds the pod uid and container id from a cgroup path.

Examples of paths that can be parsed: /sys/fs/cgroup/systemd/kubepods/besteffort/pod91a8fc3a-0ecf-48b4-81bf-78a7275d348c/f75aff467357c5d0ddd47cb7ad87ed38746e018992586ff66198a5c11218f634 /sys/fs/cgroup/systemd/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod5759a1ae_36ca_48a8_b20a_b0b5c8a90fb8.slice/docker-c8b38413c88eefe063b8cd3f01c16be5e3bda9693a19a68a88807baca9feb937.scope /sys/fs/cgroup/systemd/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod12345678_1234_1234_1234_123456789012.slice/crio-f75aff467357c5d0ddd47cb7ad87ed38746e018992586ff66198a5c11218f634.scope

func ExtractIDFromCgroupProcFile

func ExtractIDFromCgroupProcFile(cgroupProcFile string) (podUID, containerID string)

ExtractIDFromCgroupProcFile finds the pod uid and container id from a cgroup proc file.

Examples of paths that can be parsed: "/proc/42/cgroup".

Types

This section is empty.

Jump to

Keyboard shortcuts

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