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

Add pressure stall information #126

Closed
daenney opened this issue Jan 5, 2019 · 2 comments
Closed

Add pressure stall information #126

daenney opened this issue Jan 5, 2019 · 2 comments

Comments

@daenney
Copy link
Contributor

daenney commented Jan 5, 2019

I'd like to add support for /proc/pressure/* that the Linux kernel exposes (to in turn add support for that to the node exporter).

I started looking at it but I'm stumbling on a thing; currently Proc and its path helper always assumes that what we want is /proc/<pid>/<path...> however what I need access to is /proc/pressure/{cpu,memory,io} and I can't seem to find a good way to do that.

Did I miss something in the Proc API or should I just read the contents of those three files without leveraging the Proc struct and its methods?

@SuperQ
Copy link
Member

SuperQ commented Jan 5, 2019

Related: prometheus/node_exporter#1174

You're probably looking to implement something similar to one of the other handlers like /proc/net/dev.

/cc @rtreffer

@daenney
Copy link
Contributor Author

daenney commented Jan 5, 2019

Ah yes, thanks, found it!

I'm basing most of my patch on the other collectors so it's going to look a bit different from what @rtreffer did in their procfs patch. Though if they want to send in theirs instead I'd be happy not to lift a finger 😉.

I'm going to skip cgroups2 support for a sec since I don't have a way to test that currently, but should look at adding that later.

remijouannet pushed a commit to remijouannet/procfs that referenced this issue Oct 20, 2022
Closes prometheus#126

Signed-off-by: Daniele Sluijters <daenney@users.noreply.github.com>
bobrik pushed a commit to bobrik/procfs that referenced this issue Jan 14, 2023
The functions in the `net` module all read from the `/proc/net` symlink,
which always points to the current process.

These new functions read from `/proc/pid/net`

Closes prometheus#126
Supersedes prometheus#218
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