How to get all CPU cache information without SU access

cachecpucpu-architecturedmidecode

I am trying to find out the cache mapping scheme for all the levels of class of a linux server, however I do not have root access. I would just use DMIdecode for this but you need root access. Is there another way of getting the same information without root?

Best Answer

lscpu, in util-linux, describes the cache layout without requiring root:

[...]
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K

The files in /sys/devices/system/cpu/cpu*/cache/ should contain all the information you're looking for, including associativity, and are readable without being root, but it's a little harder to parse:

grep . /sys/devices/system/cpu/cpu*/cache/index*/*

(I got this on https://stackoverflow.com/questions/716145/l1-memory-cache-on-intel-x86-processors).

Related Question