The Turbostat command-line utility for reporting processor frequency and idle statistics along with other useful information for AMD and Intel CPUs can now report some L2 cache stats for recent Intel CPUs beginning with Linux 7.0.
The Turbostat utility lives within the kernel source tree and for the Linux 7.0 merge window has landed some new L2 cache reporting functionality.
With the now-merged code, there are now L2 statistics of L2MRPS for indicating the L2 Cache M-References Per Second and L2%hit for the L2 cache hit rate percentage.
This merge has all the details for those interested. These new metrics are reported when using recent generations of Intel processors due to relying on new L2 perf counters. This comes down to Intel Xeon Sapphire Rapids and newer, Intel Atom Gracemont and newer, or Intel Alder Lake and newer hybrid CPUs.
