mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
Remove linprocfs path
This commit is contained in:
parent
99533535f8
commit
69c5c9f103
1 changed files with 5 additions and 5 deletions
|
@ -30,12 +30,12 @@ __cpu_freq() {
|
|||
fpdiv $hz "1000000" 1 # 1Ghz
|
||||
freq="$_RET"
|
||||
elif [ -r "/proc/cpuinfo" ]; then
|
||||
if egrep -q -s -i -m 1 "^cpu MHz|^clock" /compat/linux/proc/cpuinfo; then
|
||||
freq=$(egrep -i -m 1 "^cpu MHz|^clock" /compat/linux/proc/cpuinfo | awk -F"[:.]" '{ printf "%01.1f", $2 / 1000 }')
|
||||
if egrep -q -s -i -m 1 "^cpu MHz|^clock" /proc/cpuinfo; then
|
||||
freq=$(egrep -i -m 1 "^cpu MHz|^clock" /proc/cpuinfo | awk -F"[:.]" '{ printf "%01.1f", $2 / 1000 }')
|
||||
else
|
||||
# Must scale frequency by number of processors, if counting bogomips
|
||||
count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /compat/linux/proc/cpuinfo)
|
||||
freq=$(egrep -i -m 1 "^bogomips" /compat/linux/proc/cpuinfo | awk -F"[:.]" '{ print $2 }')
|
||||
count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
|
||||
freq=$(egrep -i -m 1 "^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ print $2 }')
|
||||
freq=$(printf "%s %s" "$freq" "$count" | awk '{printf "%01.1f\n", $1/$2/1000}')
|
||||
fi
|
||||
elif [ $(uname -s) = 'FreeBSD' ]; then
|
||||
|
@ -53,7 +53,7 @@ __cpu_freq() {
|
|||
freq="$_RET"
|
||||
fi
|
||||
elif hz=$(sysctl -n hw.cpufrequency 2>/dev/null); then
|
||||
fpdiv $hz "1000000000" 1 # 1Ghz
|
||||
'fpdiv $hz "1000000000" 1 # 1Ghz
|
||||
freq="$_RET"
|
||||
fi
|
||||
[ -n "$freq" ] || return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue