I\'m trying to get the size of different cache level in my system.
I tried two techniques.
a) Using information from /sys/device. Here is the output.
<
A few things:
index<n> name in /sys/devices/system/cpu/cpu<n>/cache does not correspond to L1/L2/L3 etc. There is a .../index<n>/level file that will tell you the level of the cache.index0 and index1), one for data, and one for instructions (see .../index<n>/type), per core. 4 cores * 2 halves * 32K matches the 256K that dmidecode reports.index2) = 1024K, which matches dmidecodes L2 number.