Added cpu speed for *BSD
This commit is contained in:
parent
08ea6945fa
commit
432eb89e2d
9
fetch
9
fetch
|
@ -554,6 +554,15 @@ getcpu () {
|
||||||
|
|
||||||
*"BSD")
|
*"BSD")
|
||||||
cpu="$(sysctl -n hw.model)"
|
cpu="$(sysctl -n hw.model)"
|
||||||
|
cpu=${cpu/ @*/}
|
||||||
|
cpu=${cpu// /}
|
||||||
|
cpu=${cpu% }
|
||||||
|
|
||||||
|
speed=$(sysctl -n hw.cpuspeed)
|
||||||
|
speed=$((speed / 100))
|
||||||
|
speed=${speed:0:1}.${speed:1}
|
||||||
|
|
||||||
|
cpu="$cpu @ ${speed}GHz"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
|
|
Reference in New Issue