2

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?

  • Is the info available from cat /proc/cpuinfo useful for you? – Sree Mar 6 '15 at 5:42
  • @Sree not quite. I'm looking for more than the sizes of the cache. On dmidecode, it is the Associativity information for each cache level – Ryan Newman Mar 6 '15 at 5:49
3

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).

  • I need a bit more information than this. This jsut gives me he size of the caches when I need the Associativity information of the caches – Ryan Newman Mar 6 '15 at 6:06
  • OK, I found a way to get that too. Please edit your question so it details exactly what you're looking for. – Stephen Kitt Mar 6 '15 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.