Dr-Noob / cpufetch

Simple yet fancy CPU architecture fetching tool
GNU General Public License v2.0
1.83k stars 100 forks source link

[ERROR]: Shared map length is 18 while the max is be 9 #152

Closed pkubaj closed 1 year ago

pkubaj commented 1 year ago

This is on Gentoo with Linux 5.19.0. Additionally, cache sizes are wrong. Here's a screenshot: https://imgur.com/buCa8tD.png

Here are cache sizes lscpu reports:

Caches (sum of all):   
  L1d:                 512 KiB (16 instances)
  L1i:                 512 KiB (16 instances)
  L2:                  8 MiB (16 instances)
  L3:                  160 MiB (16 instances)
Dr-Noob commented 1 year ago

That was such a big stupid check I introduced a while ago. I just removed it, but I still think it won't work on your machine. Can you try again? Also, if you find any issues, please paste the output of cat /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map

pkubaj commented 1 year ago

It now looks ok and the cache size is also ok, thanks: Przechwycenie obrazu ekranu_2022-09-06_15-42-03

pkubaj commented 1 year ago

Oh, wait, the cache size is correct for a single CPU, but this is dual CPU system, so it should actually be doubled.

Dr-Noob commented 1 year ago

Probably a bug when parsing /sys/devices/system/cpu/cpu*/cache/index0/shared_cpu_map. Would you paste the output of cat /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map?

pkubaj commented 1 year ago

00000000,0000000f

Dr-Noob commented 1 year ago

I have pushed a fix in the bugfix branch. Can you try it and see if it works?

pkubaj commented 1 year ago

Indeed, thank you!