Fix cpu count when process name includes the word processor (#11911)

This commit is contained in:
Felipe Santos
2024-06-12 11:03:27 -03:00
committed by GitHub
parent 6978140492
commit e3c8901549

View File

@@ -44,7 +44,7 @@ function get_cpus() {
cpus=1
fi
else
cpus=$(grep -c processor /proc/cpuinfo)
cpus=$(grep -c ^processor /proc/cpuinfo)
fi
printf '%s' "$cpus"