explorer/cpu_cores: Add support for OpenBSD

This commit is contained in:
Daniel Néri 2019-03-19 23:09:01 +01:00
parent 73784b04df
commit 0fc64a951c

View file

@ -28,6 +28,10 @@ case "$os" in
sysctl -n hw.physicalcpu sysctl -n hw.physicalcpu
;; ;;
"openbsd")
sysctl -n hw.ncpuonline
;;
*) *)
if [ -r /proc/cpuinfo ]; then if [ -r /proc/cpuinfo ]; then
cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)" cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)"