I am trying to find out the cache mapping scheme for all the levels of class of a Linux server, including associativity, 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?
Asked
Active
Viewed 1,425 times
3
Stephen Kitt
- 411,918
- 54
- 1,065
- 1,164
Ryan Newman
- 133
- 4
1 Answers
4
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 they’re a little harder to parse:
grep . /sys/devices/system/cpu/cpu*/cache/index*/*
(I got this from Where is the L1 memory cache of Intel x86 processors documented?)
Stephen Kitt
- 411,918
- 54
- 1,065
- 1,164