Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read statistics in /proc/cgroups #423

Closed
biello opened this issue Dec 1, 2021 · 5 comments
Closed

read statistics in /proc/cgroups #423

biello opened this issue Dec 1, 2021 · 5 comments

Comments

@biello
Copy link
Contributor

biello commented Dec 1, 2021

In some case, people may want to monitor statistics in /proc/cgroups on linux systems, I have already written some code for it.
will it be useful? if yes, I would like to contribute a pr. Thanks! @discordianfish

/enhancement

@discordianfish
Copy link
Member

It depends on the details, but in general we support /proc/cgroups already: https://github.com/prometheus/procfs/blob/master/proc_cgroup.go

What do you have in mind?

@biello
Copy link
Contributor Author

biello commented Dec 3, 2021

@discordianfish Current proc_cgroup.go reads /proc/[pid]/cgroup which describes infos for each process, not an overall view of control groups on the whole system. What I would like to read is the /proc/cgroups file, it contains relevant information.

https://man7.org/linux/man-pages/man7/cgroups.7.html has a clear description about this file.

@discordianfish
Copy link
Member

Ah I see, yeah that seems reasonable to me!

@biello
Copy link
Contributor Author

biello commented Dec 3, 2021

Great! please have a look at #424

@biello
Copy link
Contributor Author

biello commented Dec 10, 2021

Close this issue as #424 is merged. 🍻

@biello biello closed this as completed Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants