Skip to content

Add inspection for cgroup v2 CPU quota and period #377

@dagood

Description

@dagood

I see this function, and essentially, I want to somehow use it in a Go application that runs inside a cpu-limited container so the app can understand its environment better:

func (c CPUMax) extractQuotaAndPeriod() (int64, uint64, error) {

quota, period, err := resources.CPU.Max.extractQuotaAndPeriod()

I don't see any way to get at this information from the current public API.


Is this something that would make sense to include in this module? The readme says "inspecting" cgroups is one of its goals, so my guess is that it would be a good feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions