mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version, tarball, man page. This corrects many 80 column width line wraps, including on:
-o, -p, -l, -u, -P, -S, -G, -N, -A Now most output should tend to not wrap, though some strings are unpredictable and will have to be trimmed by adding them to the min size trimmers one by one. But it's much better than it was. Note the following changes required to make the wraps more consistent: -S - the gcc/bits have been made separate, like: bits: 32 gcc: 5.3 -C - the new microarchitecture -x option now is: arch: K7 [for example] cache wraps to next line with arch. with -f, bmips now shows on same line as arch/cache
This commit is contained in:
parent
e8dabe0b6b
commit
78f12378b9
311
inxi
311
inxi
|
@ -2,8 +2,8 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
SELF_NAME='inxi'
|
SELF_NAME='inxi'
|
||||||
# don't quote the following, parsers grab these too
|
# don't quote the following, parsers grab these too
|
||||||
SELF_VERSION=2.3.30
|
SELF_VERSION=2.3.31
|
||||||
SELF_DATE=2017-07-29
|
SELF_DATE=2017-07-30
|
||||||
SELF_PATCH=00
|
SELF_PATCH=00
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -3965,6 +3965,10 @@ get_audio_data()
|
||||||
# The doublequotes are necessary because of the pipes in the variable.
|
# The doublequotes are necessary because of the pipes in the variable.
|
||||||
gsub(/'"$BAN_LIST_NORMAL"'/, "", audioCard)
|
gsub(/'"$BAN_LIST_NORMAL"'/, "", audioCard)
|
||||||
gsub(/'"$BAN_LIST_ARRAY"'/, " ", audioCard)
|
gsub(/'"$BAN_LIST_ARRAY"'/, " ", audioCard)
|
||||||
|
if ( '$COLS_INNER' < 100 ){
|
||||||
|
sub(/Series Family/,"Series", audioCard)
|
||||||
|
sub(/High Definition/,"High Def.", audioCard)
|
||||||
|
}
|
||||||
gsub(/^ +| +$/, "", audioCard)
|
gsub(/^ +| +$/, "", audioCard)
|
||||||
gsub(/ [ \t]+/, " ", audioCard)
|
gsub(/ [ \t]+/, " ", audioCard)
|
||||||
aPciBusId[audioCard] = gensub(/(^[0-9a-f:\.]+) [^:]+: .+$/,"\\1","g",$0)
|
aPciBusId[audioCard] = gensub(/(^[0-9a-f:\.]+) [^:]+: .+$/,"\\1","g",$0)
|
||||||
|
@ -6577,6 +6581,9 @@ get_graphics_card_data()
|
||||||
driver=""
|
driver=""
|
||||||
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF)
|
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF)
|
||||||
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $NF)
|
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $NF)
|
||||||
|
if ( '$COLS_INNER' < 100 ){
|
||||||
|
sub(/Core Processor Family/,"Core", $NF)
|
||||||
|
}
|
||||||
gsub(/^ +| +$/, "", $NF)
|
gsub(/^ +| +$/, "", $NF)
|
||||||
gsub(/ [ \t]+/, " ", $NF)
|
gsub(/ [ \t]+/, " ", $NF)
|
||||||
card=$NF
|
card=$NF
|
||||||
|
@ -8133,6 +8140,9 @@ get_networking_data()
|
||||||
# The doublequotes are necessary because of the pipes in the variable.
|
# The doublequotes are necessary because of the pipes in the variable.
|
||||||
gsub(/'"$BAN_LIST_NORMAL"'/, "", aNic[counter])
|
gsub(/'"$BAN_LIST_NORMAL"'/, "", aNic[counter])
|
||||||
gsub(/'"$BAN_LIST_ARRAY"'/, " ", aNic[counter])
|
gsub(/'"$BAN_LIST_ARRAY"'/, " ", aNic[counter])
|
||||||
|
if ( '$COLS_INNER' < 100 ){
|
||||||
|
sub(/PCI Express/,"PCIE", aNic[counter])
|
||||||
|
}
|
||||||
gsub(/^ +| +$/, "", aNic[counter])
|
gsub(/^ +| +$/, "", aNic[counter])
|
||||||
gsub(/ [ \t]+/, " ", aNic[counter])
|
gsub(/ [ \t]+/, " ", aNic[counter])
|
||||||
aPciBusId[counter] = gensub(/(^[0-9a-f:\.]+) [^:]+: .+$/,"\\1","g",$0)
|
aPciBusId[counter] = gensub(/(^[0-9a-f:\.]+) [^:]+: .+$/,"\\1","g",$0)
|
||||||
|
@ -8938,7 +8948,7 @@ get_partition_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
|
|
||||||
local a_partition_working='' dev_item='' a_temp='' dev_working_item=''
|
local a_part_working='' dev_item='' a_temp='' dev_working_item=''
|
||||||
local swap_data='' df_string='' main_partition_data='' fs_type=''
|
local swap_data='' df_string='' main_partition_data='' fs_type=''
|
||||||
local mount_data='' dev_bsd_item=''
|
local mount_data='' dev_bsd_item=''
|
||||||
#local excluded_file_types='--exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660'
|
#local excluded_file_types='--exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660'
|
||||||
|
@ -9119,11 +9129,11 @@ get_partition_data()
|
||||||
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
||||||
do
|
do
|
||||||
IFS=","
|
IFS=","
|
||||||
a_partition_working=( ${A_PARTITION_DATA[i]} )
|
a_part_working=( ${A_PARTITION_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
|
|
||||||
dev_item=${a_partition_working[6]} # reset each loop
|
dev_item=${a_part_working[6]} # reset each loop
|
||||||
fs_type=${a_partition_working[5]}
|
fs_type=${a_part_working[5]}
|
||||||
# older bsds have df minus -T so can't get fs type easily, try using mount instead
|
# older bsds have df minus -T so can't get fs type easily, try using mount instead
|
||||||
if [[ $BSD_TYPE == 'bsd' ]] && [[ -z $fs_type && -n $dev_item ]];then
|
if [[ $BSD_TYPE == 'bsd' ]] && [[ -z $fs_type && -n $dev_item ]];then
|
||||||
dev_bsd_item=$( sed -e 's/non-dev-//' -e 's|/|\\/|g' <<< "$dev_item" )
|
dev_bsd_item=$( sed -e 's/non-dev-//' -e 's|/|\\/|g' <<< "$dev_item" )
|
||||||
|
@ -9175,7 +9185,7 @@ get_partition_data()
|
||||||
if [[ -n $dev_item ]];then
|
if [[ -n $dev_item ]];then
|
||||||
# assemble everything we could get for dev/h/dx, label, and uuid
|
# assemble everything we could get for dev/h/dx, label, and uuid
|
||||||
IFS=","
|
IFS=","
|
||||||
A_PARTITION_DATA[i]=${a_partition_working[0]}","${a_partition_working[1]}","${a_partition_working[2]}","${a_partition_working[3]}","${a_partition_working[4]}","$fs_type","$dev_item
|
A_PARTITION_DATA[i]=${a_part_working[0]}","${a_part_working[1]}","${a_part_working[2]}","${a_part_working[3]}","${a_part_working[4]}","$fs_type","$dev_item
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -9192,7 +9202,7 @@ get_partition_data()
|
||||||
get_partition_data_advanced()
|
get_partition_data_advanced()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local a_partition_working='' dev_partition_data=''
|
local a_part_working='' dev_partition_data=''
|
||||||
local dev_item='' dev_label='' dev_uuid='' a_temp=''
|
local dev_item='' dev_label='' dev_uuid='' a_temp=''
|
||||||
local mount_point=''
|
local mount_point=''
|
||||||
# set dev disk label/mapper/uuid data globals
|
# set dev disk label/mapper/uuid data globals
|
||||||
|
@ -9204,13 +9214,13 @@ get_partition_data_advanced()
|
||||||
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
||||||
do
|
do
|
||||||
IFS=","
|
IFS=","
|
||||||
a_partition_working=( ${A_PARTITION_DATA[i]} )
|
a_part_working=( ${A_PARTITION_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
|
|
||||||
# note: for swap this will already be set
|
# note: for swap this will already be set
|
||||||
if [[ -z ${a_partition_working[6]} ]];then
|
if [[ -z ${a_part_working[6]} ]];then
|
||||||
|
|
||||||
mount_point=$( sed 's|/|\\/|g' <<< ${a_partition_working[0]} )
|
mount_point=$( sed 's|/|\\/|g' <<< ${a_part_working[0]} )
|
||||||
#echo mount_point $mount_point
|
#echo mount_point $mount_point
|
||||||
dev_partition_data=$( gawk '
|
dev_partition_data=$( gawk '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
@ -9266,21 +9276,21 @@ get_partition_data_advanced()
|
||||||
|
|
||||||
# assemble everything we could get for dev/h/dx, label, and uuid
|
# assemble everything we could get for dev/h/dx, label, and uuid
|
||||||
IFS=","
|
IFS=","
|
||||||
A_PARTITION_DATA[i]=${a_partition_working[0]}","${a_partition_working[1]}","${a_partition_working[2]}","${a_partition_working[3]}","${a_partition_working[4]}","${a_partition_working[5]}","$dev_partition_data
|
A_PARTITION_DATA[i]=${a_part_working[0]}","${a_part_working[1]}","${a_part_working[2]}","${a_part_working[3]}","${a_part_working[4]}","${a_part_working[5]}","$dev_partition_data
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
fi
|
fi
|
||||||
## now we're ready to proceed filling in the data
|
## now we're ready to proceed filling in the data
|
||||||
IFS=","
|
IFS=","
|
||||||
a_partition_working=( ${A_PARTITION_DATA[i]} )
|
a_part_working=( ${A_PARTITION_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
# get the mapper actual dev item first, in case it's mapped
|
# get the mapper actual dev item first, in case it's mapped
|
||||||
dev_item=$( get_dev_processed_item "${a_partition_working[6]}" )
|
dev_item=$( get_dev_processed_item "${a_part_working[6]}" )
|
||||||
# make sure not to slice off rest if it's a network mounted file system
|
# make sure not to slice off rest if it's a network mounted file system
|
||||||
if [[ -n $dev_item && -z $( grep -E '(^//|:/)' <<< $dev_item ) ]];then
|
if [[ -n $dev_item && -z $( grep -E '(^//|:/)' <<< $dev_item ) ]];then
|
||||||
dev_item=${dev_item##*/} ## needed to avoid error in case name still has / in it
|
dev_item=${dev_item##*/} ## needed to avoid error in case name still has / in it
|
||||||
fi
|
fi
|
||||||
dev_label=${a_partition_working[7]}
|
dev_label=${a_part_working[7]}
|
||||||
dev_uuid=${a_partition_working[8]}
|
dev_uuid=${a_part_working[8]}
|
||||||
# then if dev data/uuid is incomplete, try to get missing piece
|
# then if dev data/uuid is incomplete, try to get missing piece
|
||||||
# it's more likely we'll get a uuid than a label. But this should get the
|
# it's more likely we'll get a uuid than a label. But this should get the
|
||||||
# dev item set no matter what, so then we can get the rest of any missing data
|
# dev item set no matter what, so then we can get the rest of any missing data
|
||||||
|
@ -9326,7 +9336,7 @@ get_partition_data_advanced()
|
||||||
|
|
||||||
# assemble everything we could get for dev/h/dx, label, and uuid
|
# assemble everything we could get for dev/h/dx, label, and uuid
|
||||||
IFS=","
|
IFS=","
|
||||||
A_PARTITION_DATA[i]=${a_partition_working[0]}","${a_partition_working[1]}","${a_partition_working[2]}","${a_partition_working[3]}","${a_partition_working[4]}","${a_partition_working[5]}","$dev_item","$dev_label","$dev_uuid
|
A_PARTITION_DATA[i]=${a_part_working[0]}","${a_part_working[1]}","${a_part_working[2]}","${a_part_working[3]}","${a_part_working[4]}","${a_part_working[5]}","$dev_item","$dev_label","$dev_uuid
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
done
|
done
|
||||||
log_function_data 'cat' "$FILE_MOUNTS"
|
log_function_data 'cat' "$FILE_MOUNTS"
|
||||||
|
@ -9345,16 +9355,16 @@ get_partition_data_advanced_bsd()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local gpart_data="$( gpart list 2>/dev/null )"
|
local gpart_data="$( gpart list 2>/dev/null )"
|
||||||
local a_partition_working='' label_uuid='' dev_item=''
|
local a_part_working='' label_uuid='' dev_item=''
|
||||||
|
|
||||||
if [[ -n $gpart_data ]];then
|
if [[ -n $gpart_data ]];then
|
||||||
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
||||||
do
|
do
|
||||||
IFS=","
|
IFS=","
|
||||||
a_partition_working=( ${A_PARTITION_DATA[i]} )
|
a_part_working=( ${A_PARTITION_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
# no need to use the rest of the name if it's not a straight /dev/item
|
# no need to use the rest of the name if it's not a straight /dev/item
|
||||||
dev_item=${a_partition_working[6]##*/}
|
dev_item=${a_part_working[6]##*/}
|
||||||
|
|
||||||
label_uuid=$( gawk -F ':' '
|
label_uuid=$( gawk -F ':' '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
@ -9379,7 +9389,7 @@ get_partition_data_advanced_bsd()
|
||||||
|
|
||||||
# assemble everything we could get for dev/h/dx, label, and uuid
|
# assemble everything we could get for dev/h/dx, label, and uuid
|
||||||
IFS=","
|
IFS=","
|
||||||
A_PARTITION_DATA[i]=${a_partition_working[0]}","${a_partition_working[1]}","${a_partition_working[2]}","${a_partition_working[3]}","${a_partition_working[4]}","${a_partition_working[5]}","${a_partition_working[6]}","$label_uuid
|
A_PARTITION_DATA[i]=${a_part_working[0]}","${a_part_working[1]}","${a_part_working[2]}","${a_part_working[3]}","${a_part_working[4]}","${a_part_working[5]}","${a_part_working[6]}","$label_uuid
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -12800,7 +12810,8 @@ print_cpu_data()
|
||||||
local cpu_physical_count='' cpu_core_count='' cpu_core_alpha='' cpu_type=''
|
local cpu_physical_count='' cpu_core_count='' cpu_core_alpha='' cpu_type=''
|
||||||
local cpu_2_data='' working_cpu='' temp1='' per_cpu_cores='' current_max_clock_nu=''
|
local cpu_2_data='' working_cpu='' temp1='' per_cpu_cores='' current_max_clock_nu=''
|
||||||
local line_starter="CPU:" multi_cpu_starter="${C1}clock speeds$SEP3${C2} "
|
local line_starter="CPU:" multi_cpu_starter="${C1}clock speeds$SEP3${C2} "
|
||||||
local speed_starter='speed' arch='' arm=' (ARM)' rev=''
|
local speed_starter='speed' arch_data='' arm=' (ARM)' rev='' arch_cache='' cache_data=''
|
||||||
|
local flags_bmip=''
|
||||||
|
|
||||||
##print_screen_output "A_CPU_DATA[0]=\"${A_CPU_DATA[0]}\""
|
##print_screen_output "A_CPU_DATA[0]=\"${A_CPU_DATA[0]}\""
|
||||||
# Array A_CPU_DATA always has one extra element: max clockfreq found.
|
# Array A_CPU_DATA always has one extra element: max clockfreq found.
|
||||||
|
@ -12814,18 +12825,22 @@ print_cpu_data()
|
||||||
a_cpu_info=(${A_CPU_DATA[$current_max_clock_nu]})
|
a_cpu_info=(${A_CPU_DATA[$current_max_clock_nu]})
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
|
|
||||||
if [[ $B_EXTRA_DATA == 'true' && ${a_cpu_info[3]} != '' ]];then
|
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||||
get_cpu_architecture "${a_cpu_info[3]}" "${a_cpu_info[4]}" "${a_cpu_info[5]}"
|
if [[ ${a_cpu_info[3]} != '' ]];then
|
||||||
# note: arm model names usually say what revision it is
|
get_cpu_architecture "${a_cpu_info[3]}" "${a_cpu_info[4]}" "${a_cpu_info[5]}"
|
||||||
if [[ ${a_cpu_info[3]} != 'arm' && "${a_cpu_info[6]}" != '' ]];then
|
# note: arm model names usually say what revision it is
|
||||||
if [[ -n "${ARCH/*rev*/}" ]];then
|
if [[ ${a_cpu_info[3]} != 'arm' && "${a_cpu_info[6]}" != '' ]];then
|
||||||
rev=" rev.${a_cpu_info[6]}"
|
if [[ -n "${ARCH/*rev*/}" ]];then
|
||||||
|
rev=" rev.${a_cpu_info[6]}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "$ARCH" != '' ]];then
|
if [[ $ARCH == '' ]];then
|
||||||
arch=" ($ARCH$rev)"
|
ARCH='N/A'
|
||||||
|
else
|
||||||
arm='' # note: to avoid redundant output, only show this without -x option
|
arm='' # note: to avoid redundant output, only show this without -x option
|
||||||
fi
|
fi
|
||||||
|
arch_data="${C1}arch$SEP3${C2} $ARCH$rev "
|
||||||
fi
|
fi
|
||||||
# Strange (and also some expected) behavior encountered. If print_screen_output() uses $1
|
# Strange (and also some expected) behavior encountered. If print_screen_output() uses $1
|
||||||
# as the parameter to output to the screen, then passing "<text1> ${ARR[@]} <text2>"
|
# as the parameter to output to the screen, then passing "<text1> ${ARR[@]} <text2>"
|
||||||
|
@ -12855,7 +12870,7 @@ print_cpu_data()
|
||||||
line_starter="CPU$cpc_plural:"
|
line_starter="CPU$cpc_plural:"
|
||||||
if [[ -z $BSD_TYPE ]];then
|
if [[ -z $BSD_TYPE ]];then
|
||||||
cpu_data_string="$cpu_count_print$cpu_core_alpha core"
|
cpu_data_string="$cpu_count_print$cpu_core_alpha core"
|
||||||
cpu_data="${C1}$cpu_data_string${C2} ${a_cpu_working[0]}$model_plural$arch ($cpu_type)"
|
cpu_data="${C1}$cpu_data_string${C2} $cpu_model$model_plural ($cpu_type) "
|
||||||
else
|
else
|
||||||
if [[ $cpu_physical_count -gt 1 ]];then
|
if [[ $cpu_physical_count -gt 1 ]];then
|
||||||
per_cpu_cores=$(($cpu_core_count/$cpu_physical_count))
|
per_cpu_cores=$(($cpu_core_count/$cpu_physical_count))
|
||||||
|
@ -12866,7 +12881,7 @@ print_cpu_data()
|
||||||
if [[ -n $cpu_type ]];then
|
if [[ -n $cpu_type ]];then
|
||||||
cpu_type=" ($cpu_type)"
|
cpu_type=" ($cpu_type)"
|
||||||
fi
|
fi
|
||||||
cpu_data="$cpu_data_string${C1}model$SEP3${C2} ${a_cpu_working[0]}$cpu_type"
|
cpu_data="$cpu_data_string${C1}model$SEP3${C2} $cpu_model$cpu_type "
|
||||||
fi
|
fi
|
||||||
if [[ $B_SHOW_CPU == 'true' ]];then
|
if [[ $B_SHOW_CPU == 'true' ]];then
|
||||||
# update for multicore, bogomips x core count.
|
# update for multicore, bogomips x core count.
|
||||||
|
@ -12921,8 +12936,9 @@ print_cpu_data()
|
||||||
fi
|
fi
|
||||||
# arm cpus do not have flags or cache
|
# arm cpus do not have flags or cache
|
||||||
if [[ ${a_cpu_working[6]} != 'true' ]];then
|
if [[ ${a_cpu_working[6]} != 'true' ]];then
|
||||||
cpu_data="$cpu_data${C2} ${C1}cache$SEP3${C2} $cpu_cache"
|
cpu_data="$cpu_data${C2}"
|
||||||
cpu_2_data="$cpu_flags$bmip_data"
|
cache_data="${C1}cache$SEP3${C2} $cpu_cache "
|
||||||
|
flags_bmip="$cpu_flags$bmip_data"
|
||||||
else
|
else
|
||||||
cpu_data="$cpu_data${C2}$arm $bmip_data"
|
cpu_data="$cpu_data${C2}$arm $bmip_data"
|
||||||
fi
|
fi
|
||||||
|
@ -12956,7 +12972,13 @@ print_cpu_data()
|
||||||
fi
|
fi
|
||||||
cpu_clock_speed="${C1}$speed_starter$SEP3${C2} ${a_cpu_working[1]}"
|
cpu_clock_speed="${C1}$speed_starter$SEP3${C2} ${a_cpu_working[1]}"
|
||||||
fi
|
fi
|
||||||
cpu_2_data="$cpu_2_data$cpu_clock_speed"
|
if [[ $B_CPU_FLAGS_FULL == 'true' ]];then
|
||||||
|
cpu_2_data=""
|
||||||
|
arch_cache="$arch_data$cache_data$bmip_data"
|
||||||
|
else
|
||||||
|
cpu_2_data="$flags_bmip$cpu_clock_speed"
|
||||||
|
arch_cache="$arch_data$cache_data"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [[ $BSD_TYPE == 'bsd' && $B_ROOT != 'true' ]];then
|
if [[ $BSD_TYPE == 'bsd' && $B_ROOT != 'true' ]];then
|
||||||
cpu_null_error=' No permissions for sysctl use?'
|
cpu_null_error=' No permissions for sysctl use?'
|
||||||
|
@ -12969,16 +12991,38 @@ print_cpu_data()
|
||||||
# echo icols: $COLS_INNER
|
# echo icols: $COLS_INNER
|
||||||
# echo tc: $TERM_COLUMNS
|
# echo tc: $TERM_COLUMNS
|
||||||
# echo :${cpu_2_data}:
|
# echo :${cpu_2_data}:
|
||||||
calculate_line_length "$cpu_data $cpu_2_data"
|
calculate_line_length "$cpu_data $arch_cache"
|
||||||
if [[ -n $cpu_2_data && $LINE_LENGTH -gt $COLS_INNER ]];then
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
|
#echo one
|
||||||
cpu_data=$( create_print_line "$line_starter" "$cpu_data" )
|
cpu_data=$( create_print_line "$line_starter" "$cpu_data" )
|
||||||
line_starter=' '
|
|
||||||
print_screen_output "$cpu_data"
|
print_screen_output "$cpu_data"
|
||||||
cpu_data=$( create_print_line " " "$cpu_2_data" )
|
cpu_data=$( create_print_line " " "$arch_cache" )
|
||||||
|
print_screen_output "$cpu_data"
|
||||||
|
line_starter=' '
|
||||||
|
cpu_data=''
|
||||||
|
arch_cache=''
|
||||||
|
fi
|
||||||
|
calculate_line_length "$cpu_data$arch_cache$cpu_2_data"
|
||||||
|
if [[ -n $cpu_2_data && $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
|
#echo two
|
||||||
|
calculate_line_length "$cpu_data$arch_cache"
|
||||||
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
|
cpu_data=$( create_print_line "$line_starter" "$cpu_data" )
|
||||||
|
print_screen_output "$cpu_data"
|
||||||
|
else
|
||||||
|
cpu_data=$( create_print_line "$line_starter" "$cpu_data$arch_cache" )
|
||||||
|
print_screen_output "$cpu_data"
|
||||||
|
arch_cache=''
|
||||||
|
fi
|
||||||
|
line_starter=' '
|
||||||
|
cpu_data=$( create_print_line " " "$arch_cache$cpu_2_data" )
|
||||||
print_screen_output "$cpu_data"
|
print_screen_output "$cpu_data"
|
||||||
else
|
else
|
||||||
cpu_data=$( create_print_line "$line_starter" "$cpu_data" )
|
#echo three
|
||||||
print_screen_output "$cpu_data $cpu_2_data"
|
if [[ -n "$cpu_data$arch_cache$cpu_2_data" ]];then
|
||||||
|
cpu_data=$( create_print_line "$line_starter" "$cpu_data$arch_cache$cpu_2_data" )
|
||||||
|
print_screen_output "$cpu_data"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# we don't do this printing out extra line unless > 1 cpu core
|
# we don't do this printing out extra line unless > 1 cpu core
|
||||||
# note the numbering, the last array item is the min/max/not found for cpu speeds
|
# note the numbering, the last array item is the min/max/not found for cpu speeds
|
||||||
|
@ -13099,13 +13143,13 @@ print_dmidecode_error()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $2 == 'dmidecode-error-requires-root' ]];then
|
if [[ $2 == 'dmidecode-error-requires-root' ]];then
|
||||||
error_message="${sysDmiError}dmidecode: you must be root to run dmidecode"
|
error_message="${sysDmiError}dmidecode: root required for dmidecode"
|
||||||
elif [[ $2 == 'dmidecode-error-not-installed' ]];then
|
elif [[ $2 == 'dmidecode-error-not-installed' ]];then
|
||||||
error_message="${sysDmiError}dmidecode: dmidecode is not installed."
|
error_message="${sysDmiError}dmidecode: dmidecode is not installed."
|
||||||
elif [[ $2 == 'dmidecode-error-no-smbios-dmi-data' ]];then
|
elif [[ $2 == 'dmidecode-error-no-smbios-dmi-data' ]];then
|
||||||
error_message="${sysDmiError}dmidecode: no smbios data available. Old system?"
|
error_message="${sysDmiError}dmidecode: no smbios data. Old system?"
|
||||||
elif [[ $2 == 'dmidecode-error-no-battery-data' ]];then
|
elif [[ $2 == 'dmidecode-error-no-battery-data' ]];then
|
||||||
error_message="${sysDmiError}dmidecode: no battery data available."
|
error_message="${sysDmiError}dmidecode: no battery data."
|
||||||
elif [[ $2 == 'dmidecode-error-unknown-error' ]];then
|
elif [[ $2 == 'dmidecode-error-unknown-error' ]];then
|
||||||
error_message="${sysDmiError}dmidecode: unknown error occurred"
|
error_message="${sysDmiError}dmidecode: unknown error occurred"
|
||||||
fi
|
fi
|
||||||
|
@ -13120,7 +13164,7 @@ print_graphics_data()
|
||||||
local b_is_mesa='false' display_full_string='' card_bus_id='' card_data=''
|
local b_is_mesa='false' display_full_string='' card_bus_id='' card_data=''
|
||||||
local res_tty='Resolution' xorg_data='' display_server_string='' chip_id='' sep_pci=''
|
local res_tty='Resolution' xorg_data='' display_server_string='' chip_id='' sep_pci=''
|
||||||
local spacer='' driver='' driver_string='' driver_plural='' direct_render_string=''
|
local spacer='' driver='' driver_string='' driver_plural='' direct_render_string=''
|
||||||
local sep_loaded='' sep_unloaded='' sep_failed='' b_pci_driver='false'
|
local sep_loaded='' sep_unloaded='' sep_failed='' b_pci_driver='false' res_string=''
|
||||||
local loaded='' unloaded='' failed='' display_server_string='' b_force_tty='false'
|
local loaded='' unloaded='' failed='' display_server_string='' b_force_tty='false'
|
||||||
local line_starter='Graphics:' part_1_data='' part_2_data='' b_advanced='true'
|
local line_starter='Graphics:' part_1_data='' part_2_data='' b_advanced='true'
|
||||||
local screen_resolution="$( get_graphics_res_data 'reg' )"
|
local screen_resolution="$( get_graphics_res_data 'reg' )"
|
||||||
|
@ -13211,13 +13255,14 @@ print_graphics_data()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# note: fix this, we may find a display server that has no version
|
# note: fix this, we may find a display server that has no version
|
||||||
if [[ -z $display_vendor || -z $display_version ]];then
|
if [[ -z "${display_vendor// }" || -z "${display_version// }" ]];then
|
||||||
display_server_string="N/A"
|
display_server_string="N/A "
|
||||||
else
|
else
|
||||||
display_server_string="$display_vendor $display_version"
|
# note: sometimes display vendor has leading whitespace
|
||||||
|
display_server_string="${display_vendor##*[ ]} $display_version "
|
||||||
fi
|
fi
|
||||||
if [[ $display_server != '' ]];then
|
if [[ $display_server != '' ]];then
|
||||||
display_server_string="$display_server ($display_server_string)"
|
display_server_string="$display_server ($display_server_string) "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == '' && $compositor != '' ]] &&\
|
if [[ $B_EXTRA_EXTRA_DATA == '' && $compositor != '' ]] &&\
|
||||||
|
@ -13329,23 +13374,40 @@ print_graphics_data()
|
||||||
if [[ $driver == '' ]];then
|
if [[ $driver == '' ]];then
|
||||||
driver=' N/A'
|
driver=' N/A'
|
||||||
fi
|
fi
|
||||||
|
res_string="${C1}$res_tty$SEP3${C2} $screen_resolution "
|
||||||
display_server_string="${C1}Display Server${SEP3}${C2} $display_server_string $compositor_string"
|
display_server_string="${C1}Display Server${SEP3}${C2} $display_server_string$compositor_string"
|
||||||
driver_string="${C1}driver$driver_plural$SEP3${C2}$driver "
|
driver_string="${C1}driver$driver_plural$SEP3${C2}$driver "
|
||||||
|
part_2_data="$res_string$root_x_string"
|
||||||
part_1_data="$display_server_string$driver_string"
|
calculate_line_length "$display_server_string$driver_string$part_2_data"
|
||||||
part_2_data="${C1}$res_tty$SEP3${C2} $screen_resolution $root_x_string"
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
calculate_line_length "$part_1_data $part_2_data"
|
calculate_line_length "$display_server_string$driver_string"
|
||||||
if [[ -n $( grep -vE '^[[:space:]]*$' <<< $part_1_data$part_2_data ) && \
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
$LINE_LENGTH -gt $COLS_INNER ]];then
|
#echo one
|
||||||
graphics_data=$( create_print_line "$line_starter" "$part_1_data" )
|
graphics_data=$( create_print_line "$line_starter" "$display_server_string" )
|
||||||
|
print_screen_output "$graphics_data"
|
||||||
|
graphics_data=$( create_print_line " " "$driver_string" )
|
||||||
|
print_screen_output "$graphics_data"
|
||||||
|
else
|
||||||
|
#echo two
|
||||||
|
graphics_data=$( create_print_line "$line_starter" "$display_server_string$driver_string" )
|
||||||
|
print_screen_output "$graphics_data"
|
||||||
|
fi
|
||||||
|
line_starter=' '
|
||||||
|
display_server_string=''
|
||||||
|
driver_string=''
|
||||||
|
else
|
||||||
|
#echo three
|
||||||
|
graphics_data=$( create_print_line "$line_starter" "$display_server_string$driver_string$part_2_data" )
|
||||||
print_screen_output "$graphics_data"
|
print_screen_output "$graphics_data"
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
part_1_data=''
|
display_server_string=''
|
||||||
graphics_data=$part_2_data
|
driver_string=''
|
||||||
|
part_2_data=''
|
||||||
fi
|
fi
|
||||||
if [[ -n $( grep -vE '^[[:space:]]*$' <<< $part_1_data$part_2_data ) ]];then
|
graphics_data=$display_server_string$driver_string$part_2_data
|
||||||
graphics_data=$( create_print_line "$line_starter" "$part_1_data$part_2_data" )
|
if [[ -n "${graphics_data// }" ]];then
|
||||||
|
#echo four
|
||||||
|
graphics_data=$( create_print_line "$line_starter" "$display_server_string$driver_string$part_2_data" )
|
||||||
print_screen_output "$graphics_data"
|
print_screen_output "$graphics_data"
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
fi
|
fi
|
||||||
|
@ -14448,11 +14510,11 @@ print_optical_drive_data()
|
||||||
print_partition_data()
|
print_partition_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local a_partition_working='' partition_used='' partition_data=''
|
local a_part_working='' part_used='' partition_data=''
|
||||||
local counter=0 i=0 part_id=0 a_partition_data='' line_starter=''
|
local counter=0 i=0 part_id=0 a_part_data='' line_starter=''
|
||||||
local partitionIdClean='' part_dev='' full_dev='' part_label='' full_label=''
|
local part_id_clean='' part_dev='' full_dev='' part_label='' full_label=''
|
||||||
local part_uuid='' full_uuid='' dev_remote='' full_fs=''
|
local part_uuid='' full_uuid='' dev_remote='' full_fs=''
|
||||||
local b_non_dev='false' holder=''
|
local b_non_dev='false' holder='' id_size_used='' label_uuid='' fs_dev=''
|
||||||
|
|
||||||
# set A_PARTITION_DATA
|
# set A_PARTITION_DATA
|
||||||
get_partition_data
|
get_partition_data
|
||||||
|
@ -14460,33 +14522,33 @@ print_partition_data()
|
||||||
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_PARTITION_DATA[@]}; i++ ))
|
||||||
do
|
do
|
||||||
IFS=","
|
IFS=","
|
||||||
a_partition_working=(${A_PARTITION_DATA[i]})
|
a_part_working=(${A_PARTITION_DATA[i]})
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
full_label=''
|
full_label=''
|
||||||
full_uuid=''
|
full_uuid=''
|
||||||
|
|
||||||
if [[ $B_SHOW_PARTITIONS_FULL == 'true' ]] || [[ ${a_partition_working[4]} == 'main' ]];then
|
if [[ $B_SHOW_PARTITIONS_FULL == 'true' ]] || [[ ${a_part_working[4]} == 'main' ]];then
|
||||||
if [[ -n ${a_partition_working[2]} ]];then
|
if [[ -n ${a_part_working[2]} ]];then
|
||||||
partition_used="${C1}used$SEP3${C2} ${a_partition_working[2]} (${a_partition_working[3]}) "
|
part_used="${C1}used$SEP3${C2} ${a_part_working[2]} (${a_part_working[3]}) "
|
||||||
else
|
else
|
||||||
partition_used='' # reset partition used to null
|
part_used='' # reset partition used to null
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_partition_working[5]} ]];then
|
if [[ -n ${a_part_working[5]} ]];then
|
||||||
full_fs="${a_partition_working[5]}"
|
full_fs="${a_part_working[5]}"
|
||||||
else
|
else
|
||||||
full_fs='N/A' # reset partition fs type
|
full_fs='N/A' # reset partition fs type
|
||||||
fi
|
fi
|
||||||
full_fs="${C1}fs$SEP3${C2} $full_fs "
|
full_fs="${C1}fs$SEP3${C2} $full_fs "
|
||||||
if [[ -n ${a_partition_working[6]} ]];then
|
if [[ -n ${a_part_working[6]} ]];then
|
||||||
if [[ -z $( grep -E '(^//|:/|non-dev)' <<< ${a_partition_working[6]} ) ]];then
|
if [[ -z $( grep -E '(^//|:/|non-dev)' <<< ${a_part_working[6]} ) ]];then
|
||||||
part_dev="/dev/${a_partition_working[6]}"
|
part_dev="/dev/${a_part_working[6]}"
|
||||||
dev_remote='dev'
|
dev_remote='dev'
|
||||||
elif [[ -n $( grep '^non-dev' <<< ${a_partition_working[6]} ) ]];then
|
elif [[ -n $( grep '^non-dev' <<< ${a_part_working[6]} ) ]];then
|
||||||
holder=$( sed 's/non-dev-//' <<< ${a_partition_working[6]} )
|
holder=$( sed 's/non-dev-//' <<< ${a_part_working[6]} )
|
||||||
part_dev="$holder"
|
part_dev="$holder"
|
||||||
dev_remote='raid'
|
dev_remote='raid'
|
||||||
else
|
else
|
||||||
part_dev="${a_partition_working[6]}"
|
part_dev="${a_part_working[6]}"
|
||||||
dev_remote='remote'
|
dev_remote='remote'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -14496,16 +14558,16 @@ print_partition_data()
|
||||||
full_dev="${C1}$dev_remote$SEP3${C2} $part_dev "
|
full_dev="${C1}$dev_remote$SEP3${C2} $part_dev "
|
||||||
if [[ $B_SHOW_LABELS == 'true' || $B_SHOW_UUIDS == 'true' ]];then
|
if [[ $B_SHOW_LABELS == 'true' || $B_SHOW_UUIDS == 'true' ]];then
|
||||||
if [[ $B_SHOW_LABELS == 'true' && $dev_remote != 'remote' ]];then
|
if [[ $B_SHOW_LABELS == 'true' && $dev_remote != 'remote' ]];then
|
||||||
if [[ -n ${a_partition_working[7]} ]];then
|
if [[ -n ${a_part_working[7]} ]];then
|
||||||
part_label="${a_partition_working[7]}"
|
part_label="${a_part_working[7]}"
|
||||||
else
|
else
|
||||||
part_label='N/A'
|
part_label='N/A'
|
||||||
fi
|
fi
|
||||||
full_label="${C1}label$SEP3${C2} $part_label "
|
full_label="${C1}label$SEP3${C2} $part_label "
|
||||||
fi
|
fi
|
||||||
if [[ $B_SHOW_UUIDS == 'true' && $dev_remote != 'remote' ]];then
|
if [[ $B_SHOW_UUIDS == 'true' && $dev_remote != 'remote' ]];then
|
||||||
if [[ -n ${a_partition_working[8]} ]];then
|
if [[ -n ${a_part_working[8]} ]];then
|
||||||
part_uuid="${a_partition_working[8]}"
|
part_uuid="${a_part_working[8]}"
|
||||||
else
|
else
|
||||||
part_uuid='N/A'
|
part_uuid='N/A'
|
||||||
fi
|
fi
|
||||||
|
@ -14514,26 +14576,42 @@ print_partition_data()
|
||||||
fi
|
fi
|
||||||
# don't show user names in output
|
# don't show user names in output
|
||||||
if [[ $B_OUTPUT_FILTER == 'true' ]];then
|
if [[ $B_OUTPUT_FILTER == 'true' ]];then
|
||||||
partitionIdClean=$( sed $SED_RX "s|/home/([^/]+)/(.*)|/home/$FILTER_STRING/\2|" <<< ${a_partition_working[0]} )
|
part_id_clean=$( sed $SED_RX "s|/home/([^/]+)/(.*)|/home/$FILTER_STRING/\2|" <<< ${a_part_working[0]} )
|
||||||
else
|
else
|
||||||
partitionIdClean=${a_partition_working[0]}
|
part_id_clean=${a_part_working[0]}
|
||||||
fi
|
fi
|
||||||
id_size_fs="${C1}ID-$((part_id+1))$SEP3${C2} $partitionIdClean ${C1}size$SEP3${C2} ${a_partition_working[1]} $partition_used$full_fs$full_dev"
|
id_size_used="${C1}ID-$((part_id+1))$SEP3${C2} $part_id_clean ${C1}size$SEP3${C2} ${a_part_working[1]} $part_used"
|
||||||
|
fs_dev="$full_fs$full_dev"
|
||||||
label_uuid="$full_label$full_uuid"
|
label_uuid="$full_label$full_uuid"
|
||||||
|
calculate_line_length "${a_part_data[$counter]}$id_size_used$fs_dev"
|
||||||
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
|
a_part_data[$counter]="$id_size_used"
|
||||||
|
((counter++))
|
||||||
|
calculate_line_length "$fs_dev$label_uuid"
|
||||||
|
if [[ $LINE_LENGTH -le $COLS_INNER ]];then
|
||||||
|
a_part_data[$counter]="$fs_dev$label_uuid"
|
||||||
|
label_uuid=''
|
||||||
|
else
|
||||||
|
a_part_data[$counter]="$fs_dev"
|
||||||
|
fi
|
||||||
|
((counter++))
|
||||||
|
id_size_used=''
|
||||||
|
fs_dev=''
|
||||||
|
fi
|
||||||
# label/uuid always print one per line, so only wrap if it's very long
|
# label/uuid always print one per line, so only wrap if it's very long
|
||||||
calculate_line_length "${a_partition_data[$counter]}$id_size_fs$label_uuid"
|
calculate_line_length "${a_part_data[$counter]}$id_size_used$fs_dev$label_uuid"
|
||||||
if [[ $B_SHOW_UUIDS == 'true' || $B_SHOW_LABELS == 'true' ]] && \
|
if [[ $B_SHOW_UUIDS == 'true' || $B_SHOW_LABELS == 'true' ]] && \
|
||||||
[[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
[[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
a_partition_data[$counter]="$id_size_fs"
|
a_part_data[$counter]="$id_size_used$fs_dev"
|
||||||
((counter++))
|
((counter++))
|
||||||
a_partition_data[$counter]="$label_uuid"
|
a_part_data[$counter]="$label_uuid"
|
||||||
else
|
else
|
||||||
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
a_partition_data[$counter]="${a_partition_data[$counter]}"
|
a_part_data[$counter]="${a_part_data[$counter]}"
|
||||||
((counter++))
|
((counter++))
|
||||||
a_partition_data[$counter]="$id_size_fs$label_uuid"
|
a_part_data[$counter]="$id_size_used$fs_dev$label_uuid"
|
||||||
else
|
else
|
||||||
a_partition_data[$counter]="${a_partition_data[$counter]}$id_size_fs$label_uuid"
|
a_part_data[$counter]="${a_part_data[$counter]}$id_size_used$fs_dev$label_uuid"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
((counter++))
|
((counter++))
|
||||||
|
@ -14541,15 +14619,15 @@ print_partition_data()
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# print out all lines, line starter on first line
|
# print out all lines, line starter on first line
|
||||||
for (( i=0; i < ${#a_partition_data[@]};i++ ))
|
for (( i=0; i < ${#a_part_data[@]};i++ ))
|
||||||
do
|
do
|
||||||
if [[ $i -eq 0 ]];then
|
if [[ $i -eq 0 ]];then
|
||||||
line_starter='Partition:'
|
line_starter='Partition:'
|
||||||
else
|
else
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_partition_data[$i]} ]];then
|
if [[ -n ${a_part_data[$i]} ]];then
|
||||||
partition_data=$( create_print_line "$line_starter" "${a_partition_data[$i]}" )
|
partition_data=$( create_print_line "$line_starter" "${a_part_data[$i]}" )
|
||||||
print_screen_output "$partition_data"
|
print_screen_output "$partition_data"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -15440,7 +15518,7 @@ print_system_data()
|
||||||
local system_data='' bits='' desktop_environment='' dm_data='' de_extra_data=''
|
local system_data='' bits='' desktop_environment='' dm_data='' de_extra_data=''
|
||||||
local de_string='' distro_string='' line_starter='System:'
|
local de_string='' distro_string='' line_starter='System:'
|
||||||
local host_kernel_string='' host_string='' desktop_type='Desktop'
|
local host_kernel_string='' host_string='' desktop_type='Desktop'
|
||||||
local host_name=$HOSTNAME
|
local host_name=$HOSTNAME bit_comp=''
|
||||||
local distro="$( get_distro_data )"
|
local distro="$( get_distro_data )"
|
||||||
local tty_session='' compiler_string='' distro_os='Distro'
|
local tty_session='' compiler_string='' distro_os='Distro'
|
||||||
|
|
||||||
|
@ -15494,7 +15572,7 @@ print_system_data()
|
||||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||||
compiler_string=$( get_kernel_compiler_version )
|
compiler_string=$( get_kernel_compiler_version )
|
||||||
if [[ -n $compiler_string ]];then
|
if [[ -n $compiler_string ]];then
|
||||||
compiler_string=" ${C1}${compiler_string%^*}$SEP3${C2} ${compiler_string#*^}"
|
compiler_string="${C1}${compiler_string%^*}$SEP3${C2} ${compiler_string#*^} "
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# check for 64 bit first
|
# check for 64 bit first
|
||||||
|
@ -15503,7 +15581,8 @@ print_system_data()
|
||||||
else
|
else
|
||||||
bits="32"
|
bits="32"
|
||||||
fi
|
fi
|
||||||
bits=" ($bits bit$compiler_string)"
|
bits="${C1}bits$SEP3${C2} $bits "
|
||||||
|
|
||||||
if [[ $B_SHOW_HOST == 'true' ]];then
|
if [[ $B_SHOW_HOST == 'true' ]];then
|
||||||
if [[ -z $HOSTNAME ]];then
|
if [[ -z $HOSTNAME ]];then
|
||||||
if [[ -n $( type p hostname ) ]];then
|
if [[ -n $( type p hostname ) ]];then
|
||||||
|
@ -15515,27 +15594,43 @@ print_system_data()
|
||||||
fi
|
fi
|
||||||
host_string="${C1}Host$SEP3${C2} $host_name "
|
host_string="${C1}Host$SEP3${C2} $host_name "
|
||||||
fi
|
fi
|
||||||
host_kernel_string="$host_string${C1}Kernel$SEP3${C2} $CURRENT_KERNEL$bits "
|
host_kernel_string="$host_string${C1}Kernel$SEP3${C2} $CURRENT_KERNEL "
|
||||||
|
bits_comp="$bits$compiler_string"
|
||||||
de_string="${C1}$desktop_type$SEP3${C2} $desktop_environment$de_extra_data$dm_data "
|
de_string="${C1}$desktop_type$SEP3${C2} $desktop_environment$de_extra_data$dm_data "
|
||||||
distro_string="${C1}$distro_os$SEP3${C2} $distro "
|
distro_string="${C1}$distro_os$SEP3${C2} $distro "
|
||||||
calculate_line_length "$host_kernel_string$de_string"
|
calculate_line_length "$host_kernel_string$bits_comp$de_string"
|
||||||
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
system_data=$( create_print_line "$line_starter" "$host_kernel_string" )
|
calculate_line_length "$host_kernel_string$bits_comp"
|
||||||
print_screen_output "$system_data"
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
|
#echo one
|
||||||
|
system_data=$( create_print_line "$line_starter" "$host_kernel_string" )
|
||||||
|
print_screen_output "$system_data"
|
||||||
|
system_data=$( create_print_line " " "$bits_comp" )
|
||||||
|
print_screen_output "$system_data"
|
||||||
|
else
|
||||||
|
#echo two
|
||||||
|
system_data=$( create_print_line "$line_starter" "$host_kernel_string$bits_comp" )
|
||||||
|
print_screen_output "$system_data"
|
||||||
|
|
||||||
|
fi
|
||||||
host_kernel_string=''
|
host_kernel_string=''
|
||||||
|
bits_comp=''
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
fi
|
fi
|
||||||
calculate_line_length "$host_kernel_string$de_string$distro_string"
|
calculate_line_length "$host_kernel_string$bits_comp$de_string$distro_string"
|
||||||
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
system_data=$( create_print_line "$line_starter" "$host_kernel_string$de_string" )
|
#echo three
|
||||||
|
system_data=$( create_print_line "$line_starter" "$host_kernel_string$bits_comp$de_string" )
|
||||||
print_screen_output "$system_data"
|
print_screen_output "$system_data"
|
||||||
host_kernel_string=''
|
host_kernel_string=''
|
||||||
de_string=''
|
de_string=''
|
||||||
|
bits_comp=''
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
fi
|
fi
|
||||||
system_data="$host_kernel_string$de_string$distro_string"
|
system_data="$host_kernel_string$bits_comp$de_string$distro_string"
|
||||||
if [[ -n $system_data ]];then
|
if [[ -n $system_data ]];then
|
||||||
system_data="$host_kernel_string$de_string$distro_string"
|
#echo four
|
||||||
|
system_data="$host_kernel_string$bits_comp$de_string$distro_string"
|
||||||
system_data=$( create_print_line "$line_starter" "$system_data" )
|
system_data=$( create_print_line "$line_starter" "$system_data" )
|
||||||
print_screen_output "$system_data"
|
print_screen_output "$system_data"
|
||||||
fi
|
fi
|
||||||
|
@ -15596,8 +15691,8 @@ print_unmounted_partition_data()
|
||||||
if [[ $BSD_TYPE == 'bsd' ]];then
|
if [[ $BSD_TYPE == 'bsd' ]];then
|
||||||
full_string=$bsd_unsupported
|
full_string=$bsd_unsupported
|
||||||
else
|
else
|
||||||
full_string="$full_dev$full_size"
|
full_string="$full_dev$full_size$full_fs"
|
||||||
part_2_data="$full_fs$full_label$full_uuid"
|
part_2_data="$full_label$full_uuid"
|
||||||
fi
|
fi
|
||||||
calculate_line_length "$full_string$part_2_data"
|
calculate_line_length "$full_string$part_2_data"
|
||||||
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
if [[ $LINE_LENGTH -gt $COLS_INNER ]];then
|
||||||
|
|
6
inxi.1
6
inxi.1
|
@ -1,4 +1,4 @@
|
||||||
.TH INXI 1 "2017\-07\-28" inxi "inxi manual"
|
.TH INXI 1 "2017\-07\-30" inxi "inxi manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
inxi \- Command line system information script for console and IRC
|
inxi \- Command line system information script for console and IRC
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -100,7 +100,7 @@ Setting specific color type removes the global color selection.
|
||||||
Show full CPU output, including per CPU clockspeed and CPU max speed (if available). If max speed data
|
Show full CPU output, including per CPU clockspeed and CPU max speed (if available). If max speed data
|
||||||
present, shows \fB(max)\fR in short output formats (\fB\inxi\fR, \fB\inxi \-b\fR) if CPU actual speed
|
present, shows \fB(max)\fR in short output formats (\fB\inxi\fR, \fB\inxi \-b\fR) if CPU actual speed
|
||||||
matches CPU max speed. If CPU max speed does not match CPU actual speed, shows both actual and max speed
|
matches CPU max speed. If CPU max speed does not match CPU actual speed, shows both actual and max speed
|
||||||
information. See \fB\-x\fR and \fB\-xx\fR for more options.
|
information. See \fB\-x\fR and \fB\-xx\fR for more options. With \-x shows microarchitecture.
|
||||||
.TP
|
.TP
|
||||||
.B \-d
|
.B \-d
|
||||||
Shows optical drive data. Same as \fB\-Dd\fR. With \fB\-x\fR, adds features line to output. Also shows
|
Shows optical drive data. Same as \fB\-Dd\fR. With \fB\-x\fR, adds features line to output. Also shows
|
||||||
|
@ -370,7 +370,7 @@ The following shows which lines / items get extra information with each extra da
|
||||||
\- CPU microarchitecture + revision (like Sandy Bridge, K8, ARMv8, P6, and so on). Only shows if detected. Newer
|
\- CPU microarchitecture + revision (like Sandy Bridge, K8, ARMv8, P6, and so on). Only shows if detected. Newer
|
||||||
microarchitectures will have to be added as they appear, and require the CPU family id and model id.
|
microarchitectures will have to be added as they appear, and require the CPU family id and model id.
|
||||||
|
|
||||||
Example: \fB(Sandy Bridge rev.2)\fR, \fB(K8 rev.F+)\fR
|
Example: \fBarch: Sandy Bridge rev.2\fR, \fBarch: K8 rev.F+\fR
|
||||||
.TP
|
.TP
|
||||||
.B \-x \-d
|
.B \-x \-d
|
||||||
\- Adds items to features line of optical drive; adds rev version to optical drive.
|
\- Adds items to features line of optical drive; adds rev version to optical drive.
|
||||||
|
|
|
@ -1,3 +1,28 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 2.3.31
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2017-07-30
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version, tarball, man page. This corrects many 80 column width line wraps, including on:
|
||||||
|
-o, -p, -l, -u, -P, -S, -G, -N, -A
|
||||||
|
|
||||||
|
Now most output should tend to not wrap, though some strings are unpredictable and
|
||||||
|
will have to be trimmed by adding them to the min size trimmers one by one.
|
||||||
|
|
||||||
|
But it's much better than it was.
|
||||||
|
|
||||||
|
Note the following changes required to make the wraps more consistent:
|
||||||
|
|
||||||
|
-S - the gcc/bits have been made separate, like: bits: 32 gcc: 5.3
|
||||||
|
-C - the new microarchitecture -x option now is: arch: K7 [for example]
|
||||||
|
cache wraps to next line with arch. with -f, bmips now shows on same line as
|
||||||
|
arch/cache
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Sun, 30 Jul 2017 14:02:33 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 2.3.30
|
Version: 2.3.30
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue