mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 18:12:21 +00:00
A few fixes to 2.1.20, bmips broke in some cases, that's fixed now. Also changed the
way to handle bad ARM data, when bogomips are too low, < 50, we try to get the data from /sys, but now this runs on all the cores, so it may work as well on the multicore arm if the /proc/cpuinfo has bogomip that is too low and no cpu frequency.
This commit is contained in:
parent
d473167200
commit
7e0535d4c2
14
inxi
14
inxi
|
@ -3300,7 +3300,7 @@ set_perl_python_client_data()
|
||||||
is_this_qt4_konvi()
|
is_this_qt4_konvi()
|
||||||
{
|
{
|
||||||
local konvi_qt4_client='' konvi_dbus_exist='' konvi_pid='' konvi_home_dir=''
|
local konvi_qt4_client='' konvi_dbus_exist='' konvi_pid='' konvi_home_dir=''
|
||||||
local konvi='' konvi_qt4_ver='' b_is_qt4=''
|
local konvi='' b_is_qt4=''
|
||||||
|
|
||||||
# fringe cases can throw error, always if untested app, use 2>/dev/null after testing if present
|
# fringe cases can throw error, always if untested app, use 2>/dev/null after testing if present
|
||||||
if [[ $B_QDBUS == 'true' ]];then
|
if [[ $B_QDBUS == 'true' ]];then
|
||||||
|
@ -3314,10 +3314,9 @@ is_this_qt4_konvi()
|
||||||
konvi=($konvi)
|
konvi=($konvi)
|
||||||
|
|
||||||
if [[ ${konvi[2]} == 'konversation' ]];then
|
if [[ ${konvi[2]} == 'konversation' ]];then
|
||||||
konvi_qt4_ver=$( konversation -v | grep -i 'konversation' )
|
|
||||||
# note: we need to change this back to a single dot number, like 1.3, not 1.3.2
|
# note: we need to change this back to a single dot number, like 1.3, not 1.3.2
|
||||||
konvi_qt4_client=$( echo "$konvi_qt4_ver" | gawk '{ print $2 }' | cut -d '.' -f 1,2 )
|
konvi_qt4_client=$( konversation -v | grep -i 'konversation' | \
|
||||||
|
gawk '{ print $2 }' | cut -d '.' -f 1,2 )
|
||||||
if [[ $konvi_qt4_client > 1.1 ]]; then
|
if [[ $konvi_qt4_client > 1.1 ]]; then
|
||||||
b_is_qt4='true'
|
b_is_qt4='true'
|
||||||
fi
|
fi
|
||||||
|
@ -9427,9 +9426,7 @@ print_cpu_data()
|
||||||
cpu_model="${a_cpu_working[0]}"
|
cpu_model="${a_cpu_working[0]}"
|
||||||
## assemble data for output
|
## assemble data for output
|
||||||
cpu_clock="${a_cpu_working[1]}"
|
cpu_clock="${a_cpu_working[1]}"
|
||||||
|
|
||||||
cpu_vendor=${a_cpu_working[5]}
|
cpu_vendor=${a_cpu_working[5]}
|
||||||
|
|
||||||
# set A_CPU_CORE_DATA
|
# set A_CPU_CORE_DATA
|
||||||
get_cpu_core_count
|
get_cpu_core_count
|
||||||
cpu_physical_count=${A_CPU_CORE_DATA[0]}
|
cpu_physical_count=${A_CPU_CORE_DATA[0]}
|
||||||
|
@ -9453,7 +9450,7 @@ print_cpu_data()
|
||||||
# echo $cpu_core_count $cpu_physical_count
|
# echo $cpu_core_count $cpu_physical_count
|
||||||
if [[ -n ${a_cpu_working[4]} ]];then
|
if [[ -n ${a_cpu_working[4]} ]];then
|
||||||
# new arm shows bad bogomip value, so don't use it
|
# new arm shows bad bogomip value, so don't use it
|
||||||
if [[ ${a_cpu_working[4]} > 50 ]];then
|
if [[ ${a_cpu_working[4]%.*} -gt 50 ]];then
|
||||||
bmip_data=$( calculate_multicore_data "${a_cpu_working[4]}" "$(( $cpu_core_count * $cpu_physical_count ))" )
|
bmip_data=$( calculate_multicore_data "${a_cpu_working[4]}" "$(( $cpu_core_count * $cpu_physical_count ))" )
|
||||||
fi
|
fi
|
||||||
bmip_data=${bmip_data%.*}
|
bmip_data=${bmip_data%.*}
|
||||||
|
@ -9488,7 +9485,6 @@ print_cpu_data()
|
||||||
if [[ ${a_cpu_working[6]} == 'true' ]];then
|
if [[ ${a_cpu_working[6]} == 'true' ]];then
|
||||||
flag_feature='features'
|
flag_feature='features'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cpu_flags="${C1}$flag_feature$SEP3${C2} $cpu_flags "
|
cpu_flags="${C1}$flag_feature$SEP3${C2} $cpu_flags "
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -9512,7 +9508,7 @@ print_cpu_data()
|
||||||
else
|
else
|
||||||
a_cpu_working[1]="${a_cpu_working[1]%.*} MHz"
|
a_cpu_working[1]="${a_cpu_working[1]%.*} MHz"
|
||||||
fi
|
fi
|
||||||
cpu_clock_speed=" ${C1}clocked at${C2} ${a_cpu_working[1]}"
|
cpu_clock_speed="${C1}clocked at${C2} ${a_cpu_working[1]}"
|
||||||
fi
|
fi
|
||||||
cpu_2_data="$cpu_2_data$cpu_clock_speed"
|
cpu_2_data="$cpu_2_data$cpu_clock_speed"
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 2.1.20
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2014-04-08
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
A few fixes to 2.1.20, bmips broke in some cases, that's fixed now. Also changed the
|
||||||
|
way to handle bad ARM data, when bogomips are too low, < 50, we try to get the data
|
||||||
|
from /sys, but now this runs on all the cores, so it may work as well on the multicore
|
||||||
|
arm if the /proc/cpuinfo has bogomip that is too low and no cpu frequency.
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Wed, 09 Apr 2014 00:09:49 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 2.1.20
|
Version: 2.1.20
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue