Skip to content

Commit

Permalink
fix HW_NUMA_NODES glob issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kcgthb committed Apr 7, 2021
1 parent ec8bce1 commit 2cc5f7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/lbnl_hw.nhc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EDAC_MAX_UNCORRECTED="${EDAC_MAX_UNCORRECTED:-0}"

# Read hardware information from /proc and /sys files.
function nhc_hw_gather_data() {
local IFS LINE CORES SIBLINGS MHZ PROCESSOR PHYS_ID PORT INDEX DEV NODES
local IFS LINE CORES SIBLINGS MHZ PROCESSOR PHYS_ID PORT INDEX DEV
local -a FIELD PHYS_IDS IB_PORTS

# Gather CPU info
Expand Down Expand Up @@ -74,8 +74,7 @@ function nhc_hw_gather_data() {

# Gather NUMA info
if [[ -d /sys/devices/system/node ]]; then
NODES=(/sys/devices/system/node/node*)
HW_NUMA_NODES=${#NODES[@]}
HW_NUMA_NODES=$(shopt -s nullglob; set -- /sys/devices/system/node/node* ; echo $#)
HW_NUMA_NPS=$((HW_NUMA_NODES/$HW_SOCKETS))
fi
dbg "Got $HW_NUMA_NODES NUMA node(s) (NPS: $HW_NUMA_NPS)"
Expand Down

0 comments on commit 2cc5f7c

Please sign in to comment.