Commit 98821656 authored by Dylan Araps's avatar Dylan Araps

Add support for Solaris

parent 15ccabc5
...@@ -893,8 +893,11 @@ getcpu() { ...@@ -893,8 +893,11 @@ getcpu() {
speed="$(psrinfo -v | awk '/operates at/ {print $6}')" speed="$(psrinfo -v | awk '/operates at/ {print $6}')"
speed="$((speed / 100))" speed="$((speed / 100))"
# Get cpu cores # Show/hide hyperthreaded cores
cores="$(kstat -m cpu_info | grep -c "chip_id")" case "$cpu_cores" in
"logical" | "on") cores="$(kstat -m cpu_info | grep -c "chip_id")" ;;
"physical") cores="$(psrinfo -p)" ;;
esac
# Fix for speeds under 1ghz # Fix for speeds under 1ghz
if [ -z "${speed:1}" ]; then if [ -z "${speed:1}" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment