CoreFreq – CPU monitoring for 64-bit processors
github.com
github.com
I've said it before in talks, but if you want to write a new tool in this space, please write bustop - top for system busses.
(I'd also rather this tool didn't use a kernel module, of course, and I still don't understand why it needs to).
I'm tempted to try it out and see for myself, though.
For posterity; Cpu counters for a lot of things can be gotten from userspace. The linux kernel exposes a lot of things in /proc (procfs) and /sys (sysfs). Programs like perf, slabtop (and probably others, that i can't remember now), use these informations to display more-or-less the same data as this program.
Most of the things listed there can be gotten from userspace (through cpu instructions/registers, procfs, sysfs).
Do you know which one of those things can not be gotten in userspace ? Turbo boost state ? Topology ?
This PCM looks like it provides information that the tools above can't, like pcm and memory bandwidths (unless i misunderstood what it does). Sucks that it's intel only, i'd like to watch memory bandwidth usage on my amd. Unrelated: this reminds me of mcelog, that collects hardware errors.
It would be cool if eBPF could read MSRs; then this kind of monitoring could be done though perf tracing.
eBPF can read the relevant PMCs as of Linux 4.9. eg, the llcstat tool in bcc does this. (It was something I pushed for, and Alexei delivered)
Can eBPF read non-PMC registers like IA32_PERF_STATUS? I'm not getting much by googling.
Thanks for all your work on this topic; it's really educational.
So talking about what 4.9 kernel can bring is interesting, but not everybody runs this version of kernel.
It looked really nice, but I do not need that data bad enough to load a third-party kernel module. Or mess with my grub configuration.