File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ EDAC_MAX_UNCORRECTED="${EDAC_MAX_UNCORRECTED:-0}"
3030
3131# Read hardware information from /proc and /sys files.
3232function nhc_hw_gather_data() {
33- local IFS LINE CORES SIBLINGS MHZ PROCESSOR PHYS_ID PORT INDEX DEV NODES
33+ local IFS LINE CORES SIBLINGS MHZ PROCESSOR PHYS_ID PORT INDEX DEV
3434 local -a FIELD PHYS_IDS IB_PORTS
3535
3636 # Gather CPU info
@@ -74,8 +74,7 @@ function nhc_hw_gather_data() {
7474
7575 # Gather NUMA info
7676 if [[ -d /sys/devices/system/node ]]; then
77- NODES=(/sys/devices/system/node/node*)
78- HW_NUMA_NODES=${#NODES[@]}
77+ HW_NUMA_NODES=$(shopt -s nullglob; set -- /sys/devices/system/node/node* ; echo $#)
7978 HW_NUMA_NPS=$((HW_NUMA_NODES/$HW_SOCKETS))
8079 fi
8180 dbg "Got $HW_NUMA_NODES NUMA node(s) (NPS: $HW_NUMA_NPS)"
You can’t perform that action at this time.
0 commit comments