intel / pcm

Intel® Performance Counter Monitor (Intel® PCM)
BSD 3-Clause "New" or "Revised" License
2.78k stars 474 forks source link

PCI ids path is `/usr/share/misc/pci.ids` in Debian #810

Closed paulmenzel closed 2 months ago

paulmenzel commented 2 months ago

Debian uses a different location for the PCI ids text file:

$ git log --oneline --no-decorate -1
db66fd7 Merge pull request #809 from intel/push-2024-08-09
$ ./bin/pcm-lspci
/usr/share/hwdata/pci.ids file is not available. Ensure that the "hwdata" package is properly installed or download https://raw.githubusercontent.com/pciutils/pciids/master/pci.ids and copy it to the current directory.

=====  Processor information  =====
Linux arch_perfmon flag  : yes
Hybrid processor         : no
IBRS and IBPB supported  : yes
STIBP supported          : yes
Spec arch caps supported : yes
Max CPUID level          : 22
CPU model number         : 142
PCM Error: can't open MSR handle for core 0 (No such file or directory)
Try no-MSR mode by setting env variable PCM_NO_MSR=1
Can not access CPUs Model Specific Registers (MSRs).
execute 'modprobe msr' as root user, then execute pcm as root user.
PCI tree display is currently not supported for processor model 142
Scanning all devices in group 0

$ dpkg -S /usr/share/misc/pci.ids
pci.ids: /usr/share/misc/pci.ids
$ LANG= dpkg -l pci.ids
[…]
ii  pci.ids        0.0~2024.06.23-1 all          PCI ID Repository
ogbrugge commented 2 months ago

Hi Paul,

in this case you could easily make a workaround: ln -sf /usr/share/misc/ /usr/share/hwdata

We could add the Debian specific path to a kind of search list and keep adding paths to it for each different distribution out there. Perhaps you could submit a pull request for a minor change like this?

Cheers, Otto

paulmenzel commented 2 months ago

Dear Otto, thank you for the quick reply.

in this case you could easily make a workaround: ln -sf /usr/share/misc/ /usr/share/hwdata

Yeah, I know.

We could add the Debian specific path to a kind of search list and keep adding paths to it for each different distribution out there. Perhaps you could submit a pull request for a minor change like this?

What distribution do you target?

I am not good C++ coder, and would pass on this task to somebody doing this in a minute. Sorry.

ogbrugge-work commented 2 months ago

No problem, i made a quick fix and pushed it to the internal repo, on the next sync to public github it should become available. Leaving this open until the code is merged here.