github.com/quay/limits (go): Package limits implements introspecting a process' environment for configured limits and quotas.  On linux systems, the limits are implemented by inspecting the process' cgroup. Both version 1 and version 2 are supported, version 2 being preferred. See also cgroups(7), https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cgroups.html, and https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html for additional information.  The "quota" and "period" values are "cpu.cfs_quota_us" and "cpu.cfs_period_us".  The "quota" and "period" values are parsed out of the "cpu.max" file.  The "high" and "max" values are "memory.soft_limit_in_bytes" and "memory.limit_in_bytes".  The "high" and "max" values are "memory.high" and "memory.max".
Keywords: cgroups|golang