update
parent
75ff0b9af3
commit
8180b3ac44
|
@ -150,16 +150,14 @@ function get_shell(){
|
||||||
|
|
||||||
function get_cpu() {
|
function get_cpu() {
|
||||||
cpu=$(lscpu | awk -F '\\s*: | @' '/Model name/ {print $2}')
|
cpu=$(lscpu | awk -F '\\s*: | @' '/Model name/ {print $2}')
|
||||||
cpu_cores=$(lscpu | awk -F '\\s*: | @' '/^CPU\(s\):/ {print $2}')
|
|
||||||
cpu_speed=$(lscpu | awk -F '\\s*: | @' '/CPU max MHz/ {print $2}')
|
cpu_speed=$(lscpu | awk -F '\\s*: | @' '/CPU max MHz/ {print $2}')
|
||||||
|
|
||||||
cpu_cores=$(trim "$cpu_cores")
|
|
||||||
cpu_speed=$(trim "$cpu_speed")
|
cpu_speed=$(trim "$cpu_speed")
|
||||||
cpu_speed=${cpu_speed%.*}
|
cpu_speed=${cpu_speed%.*}
|
||||||
cpu_speed="$((cpu_speed / 1000)).${cpu_speed:1}"
|
cpu_speed="$((cpu_speed / 1000)).${cpu_speed:1}"
|
||||||
|
|
||||||
cpu=$(trim "$cpu" | sed -e 's/ Gen//')
|
cpu=$(trim "$cpu" | sed -e 's/ Gen//')
|
||||||
cpu+=" (${cpu_cores}) ${cpu_speed}GHz"
|
cpu+=" ($(nproc)) ${cpu_speed}GHz"
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_gpu() {
|
function get_gpu() {
|
||||||
|
|
Loading…
Reference in New Issue