[explorers] Improve *BSD support.
cpu_cores and memory did lacked support for other BSDs.
This commit is contained in:
parent
04b7f240eb
commit
678df1ec8a
2 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,10 @@ case "$os" in
|
|||
sysctl -n hw.ncpuonline
|
||||
;;
|
||||
|
||||
"freebsd"|"netbsd")
|
||||
sysctl -n hw.ncpu
|
||||
;;
|
||||
|
||||
*)
|
||||
if [ -r /proc/cpuinfo ]; then
|
||||
cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)"
|
||||
|
|
|
@ -29,7 +29,7 @@ case "$os" in
|
|||
echo "$(sysctl -n hw.memsize)/1024" | bc
|
||||
;;
|
||||
|
||||
"openbsd")
|
||||
*"bsd")
|
||||
echo "$(sysctl -n hw.physmem) / 1048576" | bc
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue