Hacker News new | ask | show | jobs
by m82labs 3341 days ago
I was wondering the same. No way I would load a module just to monitor CPU.
2 comments

FreeBSD already comes with cpuctl.ko which is used by Intel's pcm.x tools. No way Linux doesn't have something similar…
Linux has MSR module or one can use perf.
Maybe for the real-time cache usage display ? Or performance (in the sense of less noise while measuring) ?

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.