-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Feature request: IPC metrics #1238
Comments
From the command line, the counters can be retrieved without root by using
I don't see a way to get to the perf events API through procfs or sysfs right now. |
Interesting.. Just saw that there is this already: https://github.com/tcolgate/perfexporter But certainly open to include that in the node-exporter, pending the implementation details. Looks like there is better support in golang in the making: golang/go#24918 |
But looks like that needs root, which would be a problem for including it in the node-exporter. |
OK, I see, but see the above about |
Ah, yeah I think if a user can run the node-exporter unprivileged by setting perf_event_paranoid, that would be a good compromise. Still need probably makes sense to wait for golang/go#24918 to land in a release. |
I've been working on a little go library that would allow you to do that, the API is not finalized but I've been thinking of implementing this feature. |
I think I pretty much have this implemented, if you want to test it out and have any opinions on configuration that would be helpful as well. |
@hodgesds @discordianfish I think #1274 definitely closes the feature request here. Let me know if you agree. |
Good point, thanks! |
I wanted to thank you both @hodgesds and @discordianfish for working on this feature. It's really useful and well implemented. |
No problem, glad it's useful to others! |
After looking at http://www.brendangregg.com/blog/2017-05-09/cpu-utilization-is-wrong.html I wanted to calculate the Instructions Per Cycle (IPC) using node_exporter. Currently neither the instructions nor the cycles counters are available through node_exporter.
Currently I can get the data with
perf stat -D 1000 -a -d -x, -c -- sleep 10
which waits 1 second, then samples for 10 seconds. I can then look forcycles
andinstructions
in the output. I don't know what the equivalent kernel APIs are, and if they are available to node_exporter through procfs or other means.The text was updated successfully, but these errors were encountered: