mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
CPU [IRIX]: Fix CPU speed.... kinda.
This commit is contained in:
13
neofetch
13
neofetch
@@ -983,13 +983,18 @@ get_cpu() {
|
|||||||
|
|
||||||
"IRIX")
|
"IRIX")
|
||||||
# Get CPU name.
|
# Get CPU name.
|
||||||
cpu="$(hinv -c | awk -F':' '/CPU:/ {printf $2}')"
|
cpu="$(hinv -c processor | awk -F':' '/CPU:/ {printf $2}')"
|
||||||
|
|
||||||
# Get CPU speed.
|
# Get CPU speed.
|
||||||
cpu="$(hinv -c | awk 'NR==1{printf $2}')"
|
cpu="$(hinv -c processor | awk '/MHZ/ {printf $2}')"
|
||||||
|
|
||||||
|
# Note: This is an inaccurate way to count CPU speed.
|
||||||
|
# Most of them use MHZ, I'm yet to see if they have
|
||||||
|
# anything above 1 GHZ. So this will have to do as a
|
||||||
|
# place holder.
|
||||||
|
|
||||||
# Get CPU cores.
|
# Get CPU cores.
|
||||||
cores="$(sysconf NPROC_ONLN)" # Does this even work?
|
cores="$(sysconf NPROC_ONLN)"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -1069,7 +1074,7 @@ get_cpu_usage() {
|
|||||||
"Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;;
|
"Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;;
|
||||||
"iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;;
|
"iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;;
|
||||||
"AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;;
|
"AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;;
|
||||||
"IRIX") cores="$(sysconf NPROC_ONLN)" # Does this even work?
|
"IRIX") cores="$(sysconf NPROC_ONLN)"
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user