NetBSD: cpu speed
This commit is contained in:
parent
45f0204d7b
commit
0b8587cc24
1 changed files with 9 additions and 0 deletions
9
fetch
9
fetch
|
@ -577,6 +577,15 @@ getcpu () {
|
||||||
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
||||||
cpu=${cpu/model name*: /}
|
cpu=${cpu/model name*: /}
|
||||||
cpu=${cpu/ @*/}
|
cpu=${cpu/ @*/}
|
||||||
|
|
||||||
|
# Get cpu speed
|
||||||
|
speed="$(grep -F 'cpu MHz' /proc/cpuinfo)"
|
||||||
|
speed=${speed/cpu MHz*: /}
|
||||||
|
speed=${speed/'.'/}
|
||||||
|
speed=$((speed / 100))
|
||||||
|
speed=${speed:0:1}.${speed:1}
|
||||||
|
|
||||||
|
cpu="$cpu @ ${speed}GHz"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue