mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
fixed cpu count backup test
This commit is contained in:
parent
6037e4002f
commit
1871cef434
2
inxi
2
inxi
|
@ -734,7 +734,7 @@ get_cpu_core_count()
|
||||||
## Because of the upcoming release of cpus with core counts over 6, a count of cores is given after Deca (10)
|
## Because of the upcoming release of cpus with core counts over 6, a count of cores is given after Deca (10)
|
||||||
# count the number of processors given
|
# count the number of processors given
|
||||||
local cpu_core_count=$(grep -ic "cpu cores" /proc/cpuinfo| cut -d':' -f2)
|
local cpu_core_count=$(grep -ic "cpu cores" /proc/cpuinfo| cut -d':' -f2)
|
||||||
if [ -z "$cpu_core_count" ];then
|
if [ "$cpu_core_count" -eq 0 ];then
|
||||||
cpu_core_count=$(grep -ic "^processor" /proc/cpuinfo| cut -d':' -f2)
|
cpu_core_count=$(grep -ic "^processor" /proc/cpuinfo| cut -d':' -f2)
|
||||||
fi
|
fi
|
||||||
local cpu_alpha_count='' core_count=''
|
local cpu_alpha_count='' core_count=''
|
||||||
|
|
Loading…
Reference in a new issue