/sys/devices/system/node/node0/cpu0/online: no such file or directory
Hello,
When I try to list cpu information that is numa related it is getting the error:
/sys/devices/system/node/node0/cpu0/online: no such file or directory
Seems that online is not available anymore on this location for some linux distros.
However with lscpu | grep -i numa we have an output listing the nodes and cpus per node. And with /sys/devices/system/cpu/online it reports the online cpus.
Maybe first check if the first path is available and if not go through the other option ti get cpus per node that are online.
@peter81git thanks for the issue! can you let us know what version of ghw you're using? thank you!
We are using version v0.13.0
One more option is to use lscpu -be that gives cpu,node,core, online info.
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ
0 0 0 0 0:0:0:0 yes 3800.0000 800.0000 2500.000
1 0 0 1 1:1:1:0 yes 3800.0000 800.0000 1300.000
2 0 0 2 2:2:2:0 yes 3800.0000 800.0000 1300.000
3 0 0 3 3:3:3:0 yes 3800.0000 800.0000 1300.000
4 0 0 4 4:4:4:0 yes 3800.0000 800.0000 1300.000
5 0 0 5 5:5:5:0 yes 3800.0000 800.0000 1300.000
6 0 0 6 6:6:6:0 yes 3800.0000 800.0000 1300.000
7 0 0 7 7:7:7:0 yes 3800.0000 800.0000 1300.000
8 0 0 8 8:8:8:0 yes 3800.0000 800.0000 1300.000
9 0 0 9 9:9:9:0 yes 3800.0000 800.0000 1300.000
10 0 0 10 10:10:10:0 yes 3800.0000 800.0000 1300.000
11 0 0 11 11:11:11:0 yes 3800.0000 800.0000 1300.000
12 0 0 12 12:12:12:0 yes 3800.0000 800.0000 1300.000
13 0 0 13 13:13:13:0 yes 3800.0000 800.0000 1300.000
14 0 0 14 14:14:14:0 yes 3800.0000 800.0000 1300.000
15 0 0 15 15:15:15:0 yes 3800.0000 800.0000 1300.000
16 0 0 16 16:16:16:0 yes 3800.0000 800.0000 1300.000
17 0 0 17 17:17:17:0 yes 3800.0000 800.0000 1300.000
18 0 0 18 18:18:18:0 yes 3800.0000 800.0000 1300.000
19 0 0 19 19:19:19:0 yes 3800.0000 800.0000 1300.000
20 0 0 20 20:20:20:0 yes 3800.0000 800.0000 1300.000
And to have only the cpu, node, core and online we can lscpu -p=cpu,node,core,online or lscpu -e=cpu,node,core,online
hi @peter81git ! which distribution version and kernel version are you running and getting this error?
@ffromani and @peter81git , seems this issue is same with https://github.com/jaypipes/ghw/issues/375
can we close this issue?
I checked the commit on the #375 issue and seems to validate if the file exists before getting the value, however it is not checking if the system is numa capable or not adapting the info retrieval.