mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
Should be final draft before putting live
This commit is contained in:
parent
00fdc65a02
commit
2c44edebd5
12
inxi
12
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.9.8-b1-t3
|
#### version: 0.9.8-b1-t4
|
||||||
#### Date: 3 February 2009
|
#### Date: 3 February 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -2490,13 +2490,14 @@ print_short_data()
|
||||||
|
|
||||||
# set A_CPU_CORE_DATA
|
# set A_CPU_CORE_DATA
|
||||||
get_cpu_core_count
|
get_cpu_core_count
|
||||||
local cpc_plural='' cpu_count_print=''
|
local cpc_plural='' cpu_count_print='' model_plural=''
|
||||||
local cpu_physical_count=${A_CPU_CORE_DATA[0]}
|
local cpu_physical_count=${A_CPU_CORE_DATA[0]}
|
||||||
local cpu_core_count=${A_CPU_CORE_DATA[1]}
|
local cpu_core_count=${A_CPU_CORE_DATA[1]}
|
||||||
local cpu_type=${A_CPU_CORE_DATA[2]}
|
local cpu_type=${A_CPU_CORE_DATA[2]}
|
||||||
|
|
||||||
if [ "$cpu_physical_count" -gt 1 ];then
|
if [ "$cpu_physical_count" -gt 1 ];then
|
||||||
cpc_plural='(s)'
|
cpc_plural='(s)'
|
||||||
|
model_plural='s'
|
||||||
cpu_count_print="$cpu_physical_count "
|
cpu_count_print="$cpu_physical_count "
|
||||||
fi
|
fi
|
||||||
local cores_per_cpu=$(( $cpu_core_count / $cpu_physical_count ))
|
local cores_per_cpu=$(( $cpu_core_count / $cpu_physical_count ))
|
||||||
|
@ -2550,7 +2551,7 @@ print_short_data()
|
||||||
#C1="${C1},1"; C2="${C2},1"; CN="${CN},1"
|
#C1="${C1},1"; C2="${C2},1"; CN="${CN},1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
short_data="${C1}CPU$cpc_plural${CN}[${cpu_model}${C2} ${cpu_data_string} ${C1}clocked at${C2} ${min_max_clock}${CN}] ${C1}Kernel${CN}[${C2} ${current_kernel}${CN}] ${C1}Up${CN}[${C2}${FL2}${FL1}${up_time}${FL1}${CN}] ${C1}Mem${CN}[${C2}${FL2}${FL1}${memory}${FL1}${CN}] ${C1}HDD${CN}[${C2}${FL2}${FL1}${hdd_capacity}($hdd_used)${FL1}${CN}] ${C1}Procs${CN}[${C2}${FL2}${FL1}${processes}${FL1}${CN}]"
|
short_data="${C1}CPU$cpc_plural${CN}[${C2} ${cpu_data_string} ${cpu_model}$model_plural ${C1}clocked at${C2} ${min_max_clock}${CN}] ${C1}Kernel${CN}[${C2} ${current_kernel}${CN}] ${C1}Up${CN}[${C2}${FL2}${FL1}${up_time}${FL1}${CN}] ${C1}Mem${CN}[${C2}${FL2}${FL1}${memory}${FL1}${CN}] ${C1}HDD${CN}[${C2}${FL2}${FL1}${hdd_capacity}($hdd_used)${FL1}${CN}] ${C1}Procs${CN}[${C2}${FL2}${FL1}${processes}${FL1}${CN}]"
|
||||||
|
|
||||||
if [[ $SHOW_IRC -gt 0 ]];then
|
if [[ $SHOW_IRC -gt 0 ]];then
|
||||||
short_data="${short_data} ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]"
|
short_data="${short_data} ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]"
|
||||||
|
@ -2663,7 +2664,7 @@ print_cpu_data()
|
||||||
|
|
||||||
# set A_CPU_CORE_DATA
|
# set A_CPU_CORE_DATA
|
||||||
get_cpu_core_count
|
get_cpu_core_count
|
||||||
local cpc_plural='' cpu_count_print=''
|
local cpc_plural='' cpu_count_print='' model_plural=''
|
||||||
local cpu_physical_count=${A_CPU_CORE_DATA[0]}
|
local cpu_physical_count=${A_CPU_CORE_DATA[0]}
|
||||||
local cpu_core_count=${A_CPU_CORE_DATA[1]}
|
local cpu_core_count=${A_CPU_CORE_DATA[1]}
|
||||||
local cpu_type=${A_CPU_CORE_DATA[2]}
|
local cpu_type=${A_CPU_CORE_DATA[2]}
|
||||||
|
@ -2671,6 +2672,7 @@ print_cpu_data()
|
||||||
if [ "$cpu_physical_count" -gt 1 ];then
|
if [ "$cpu_physical_count" -gt 1 ];then
|
||||||
cpc_plural='(s)'
|
cpc_plural='(s)'
|
||||||
cpu_count_print="$cpu_physical_count "
|
cpu_count_print="$cpu_physical_count "
|
||||||
|
model_plural='s'
|
||||||
fi
|
fi
|
||||||
local cores_per_cpu=$(( $cpu_core_count / $cpu_physical_count ))
|
local cores_per_cpu=$(( $cpu_core_count / $cpu_physical_count ))
|
||||||
local cpu_data_string="${cpu_count_print}${cpu_core_count} core ${cpu_type}"
|
local cpu_data_string="${cpu_count_print}${cpu_core_count} core ${cpu_type}"
|
||||||
|
@ -2686,7 +2688,7 @@ print_cpu_data()
|
||||||
a_cpu_working[2]="unknown"
|
a_cpu_working[2]="unknown"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cpu_data=$( create_print_line "CPU$cpc_plural:" "${C1}${cpu_data_string}${C2} ${a_cpu_working[0]}" )
|
cpu_data=$( create_print_line "CPU$cpc_plural:" "${C1}${cpu_data_string}${C2} ${a_cpu_working[0]}$model_plural" )
|
||||||
if [[ $VERBOSITY_LEVEL -ge 3 || $B_SHOW_CPU == 'true' ]];then
|
if [[ $VERBOSITY_LEVEL -ge 3 || $B_SHOW_CPU == 'true' ]];then
|
||||||
# update for multicore, bogomips x core count.
|
# update for multicore, bogomips x core count.
|
||||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||||
|
|
Loading…
Reference in a new issue