Added cpu speed and core count support for OS X Tiger

This commit is contained in:
Aaron Blakely 2022-07-05 01:47:00 -05:00
parent 993cfbc627
commit 55483a179d

View file

@ -2292,6 +2292,12 @@ get_cpu() {
if [[ $osx_version =~ "10.4" ]]; then
cpu="$(system_profiler SPHardwareDataType | grep CPU\ Type)"
cpu="${cpu/CPU\ Type\:/}"
speed="$(system_profiler SPHardwareDataTypes | grep CPU\ Speed)"
speed="${speed/CPU\ Speed\:/}"
cores="$(system_profiler SPHardwareDataType | grep Number\ Of\ CPUs)"
cores="${cores/Number\ Of\ CPUs\:/}"
else
cpu="$(sysctl -n machdep.cpu.brand_string)"
fi