Simplify CPU commands
This commit is contained in:
parent
f5d59fe105
commit
7ea4aa2e82
1 changed files with 2 additions and 2 deletions
4
neofetch
4
neofetch
|
@ -728,11 +728,11 @@ getcpu() {
|
||||||
cpu="${cpu/ @*}"
|
cpu="${cpu/ @*}"
|
||||||
|
|
||||||
# Get cpu speed
|
# Get cpu speed
|
||||||
speed="$(psrinfo -v | tail -2 | head -1 | awk '{print $6}')"
|
speed="$(psrinfo -v | awk '/operates at/ {print $6}')"
|
||||||
speed="$((speed / 100))"
|
speed="$((speed / 100))"
|
||||||
|
|
||||||
# Get cpu cores
|
# Get cpu cores
|
||||||
cores="$(kstat -m cpu_info | grep "chip_id" | wc -l | tr -d ' ')"
|
cores="$(kstat -m cpu_info | grep -c "chip_id")"
|
||||||
|
|
||||||
# Fix for speeds under 1ghz
|
# Fix for speeds under 1ghz
|
||||||
if [ -z "${speed:1}" ]; then
|
if [ -z "${speed:1}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue