Added cpu speed for *BSD
This commit is contained in:
parent
08ea6945fa
commit
432eb89e2d
1 changed files with 9 additions and 0 deletions
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")
|
||||||
|
|
Loading…
Reference in a new issue