mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version; updated man page. Changed slightly the output for x server, in preparation
for adding alternate display servers, like Wayland or Mir. Rather than release all the stuff at once I'm going to do it bit by bit. Currently I have not found a wayland iso test cd that boots in virtual box so I will have to wait to really add support there.
This commit is contained in:
parent
73101b5a9d
commit
af7336ceba
291
inxi
291
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 1.9.18
|
#### Version: 1.9.19
|
||||||
#### Date: 2014-01-13
|
#### Date: 2014-03-03
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -229,8 +229,8 @@ A_CPU_DATA=''
|
||||||
A_CPU_TYPE_PCNT_CCNT=''
|
A_CPU_TYPE_PCNT_CCNT=''
|
||||||
A_DEBUG_BUFFER=''
|
A_DEBUG_BUFFER=''
|
||||||
A_GCC_VERSIONS=''
|
A_GCC_VERSIONS=''
|
||||||
A_GFX_CARD_DATA=''
|
|
||||||
A_GLX_DATA=''
|
A_GLX_DATA=''
|
||||||
|
A_GRAPHICS_CARD_DATA=''
|
||||||
A_GRAPHIC_DRIVERS=''
|
A_GRAPHIC_DRIVERS=''
|
||||||
A_HDD_DATA=''
|
A_HDD_DATA=''
|
||||||
A_INTERFACES_DATA=''
|
A_INTERFACES_DATA=''
|
||||||
|
@ -244,7 +244,7 @@ A_RAID_DATA=''
|
||||||
A_SENSORS_DATA=''
|
A_SENSORS_DATA=''
|
||||||
A_UNMOUNTED_PARTITION_DATA=''
|
A_UNMOUNTED_PARTITION_DATA=''
|
||||||
A_WEATHER_DATA=''
|
A_WEATHER_DATA=''
|
||||||
A_X_DATA=''
|
A_DISPLAY_SERVER_DATA=''
|
||||||
|
|
||||||
### Boolean true/false globals ## usage: 'B_<var>'
|
### Boolean true/false globals ## usage: 'B_<var>'
|
||||||
## Distro maintainer flags ##
|
## Distro maintainer flags ##
|
||||||
|
@ -287,6 +287,7 @@ B_PORTABLE='false'
|
||||||
B_RAID_SET='false'
|
B_RAID_SET='false'
|
||||||
B_ROOT='false'
|
B_ROOT='false'
|
||||||
B_RUN_COLOR_SELECTOR='false'
|
B_RUN_COLOR_SELECTOR='false'
|
||||||
|
B_RUNNING_IN_DISPLAY='false' # in x type display server
|
||||||
# Running in a shell? Defaults to false, and is determined later.
|
# Running in a shell? Defaults to false, and is determined later.
|
||||||
B_RUNNING_IN_SHELL='false'
|
B_RUNNING_IN_SHELL='false'
|
||||||
if tty >/dev/null;then
|
if tty >/dev/null;then
|
||||||
|
@ -302,6 +303,7 @@ B_SHOW_BASIC_CPU='false'
|
||||||
B_SHOW_BASIC_DISK='false'
|
B_SHOW_BASIC_DISK='false'
|
||||||
B_SHOW_BASIC_OPTICAL='false'
|
B_SHOW_BASIC_OPTICAL='false'
|
||||||
B_SHOW_CPU='false'
|
B_SHOW_CPU='false'
|
||||||
|
B_SHOW_DISPLAY_DATA='false'
|
||||||
B_SHOW_DISK_TOTAL='false'
|
B_SHOW_DISK_TOTAL='false'
|
||||||
B_SHOW_DISK='false'
|
B_SHOW_DISK='false'
|
||||||
# Show full hard disk output
|
# Show full hard disk output
|
||||||
|
@ -324,7 +326,6 @@ B_SHOW_RAID='false'
|
||||||
# because many systems have no mdstat file, -b/-F should not show error if no raid file found
|
# because many systems have no mdstat file, -b/-F should not show error if no raid file found
|
||||||
B_SHOW_RAID_R='false'
|
B_SHOW_RAID_R='false'
|
||||||
B_SHOW_REPOS='false'
|
B_SHOW_REPOS='false'
|
||||||
B_RUNNING_IN_X='false'
|
|
||||||
B_SHOW_SENSORS='false'
|
B_SHOW_SENSORS='false'
|
||||||
# triggers only short inxi output
|
# triggers only short inxi output
|
||||||
B_SHOW_SHORT_OUTPUT='false'
|
B_SHOW_SHORT_OUTPUT='false'
|
||||||
|
@ -332,7 +333,6 @@ B_SHOW_SYSTEM='false'
|
||||||
B_SHOW_UNMOUNTED_PARTITIONS='false'
|
B_SHOW_UNMOUNTED_PARTITIONS='false'
|
||||||
B_SHOW_UUIDS='false'
|
B_SHOW_UUIDS='false'
|
||||||
B_SHOW_WEATHER='false'
|
B_SHOW_WEATHER='false'
|
||||||
B_SHOW_X_DATA='false'
|
|
||||||
B_SYSCTL='false'
|
B_SYSCTL='false'
|
||||||
# triggers various debugging and new option testing
|
# triggers various debugging and new option testing
|
||||||
B_TESTING_1='false'
|
B_TESTING_1='false'
|
||||||
|
@ -687,7 +687,7 @@ main()
|
||||||
color_scheme=$VIRT_TERM_COLOR_SCHEME
|
color_scheme=$VIRT_TERM_COLOR_SCHEME
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ -n $IRC_X_TERM_COLOR_SCHEME && $B_CONSOLE_IRC == 'true' && -n $B_RUNNING_IN_X ]];then
|
if [[ -n $IRC_X_TERM_COLOR_SCHEME && $B_CONSOLE_IRC == 'true' && -n $B_RUNNING_IN_DISPLAY ]];then
|
||||||
color_scheme=$IRC_X_TERM_COLOR_SCHEME
|
color_scheme=$IRC_X_TERM_COLOR_SCHEME
|
||||||
elif [[ -n $IRC_CONS_COLOR_SCHEME && -z $DISPLAY ]];then
|
elif [[ -n $IRC_CONS_COLOR_SCHEME && -z $DISPLAY ]];then
|
||||||
color_scheme=$IRC_CONS_COLOR_SCHEME
|
color_scheme=$IRC_CONS_COLOR_SCHEME
|
||||||
|
@ -808,8 +808,8 @@ initialize_data()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $DISPLAY ]];then
|
if [[ -n $DISPLAY ]];then
|
||||||
B_SHOW_X_DATA='true'
|
B_SHOW_DISPLAY_DATA='true'
|
||||||
B_RUNNING_IN_X='true'
|
B_RUNNING_IN_DISPLAY='true'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e $FILE_MDSTAT ]];then
|
if [[ -e $FILE_MDSTAT ]];then
|
||||||
|
@ -964,16 +964,16 @@ check_required_apps()
|
||||||
depends="$depends sysctl lspci"
|
depends="$depends sysctl lspci"
|
||||||
fi
|
fi
|
||||||
# no need to add xprop because it will just give N/A if not there, but if we expand use of xprop,
|
# no need to add xprop because it will just give N/A if not there, but if we expand use of xprop,
|
||||||
# should add that here as a test, then use the B_SHOW_X_DATA flag to trigger the tests in de function
|
# should add that here as a test, then use the B_SHOW_DISPLAY_DATA flag to trigger the tests in de function
|
||||||
local x_apps="xrandr xdpyinfo glxinfo"
|
local x_apps="xrandr xdpyinfo glxinfo"
|
||||||
|
|
||||||
if [[ $B_RUNNING_IN_X == 'true' ]];then
|
if [[ $B_RUNNING_IN_DISPLAY == 'true' ]];then
|
||||||
for app_name in $x_apps
|
for app_name in $x_apps
|
||||||
do
|
do
|
||||||
app_path=$( type -p $app_name )
|
app_path=$( type -p $app_name )
|
||||||
if [[ -z $app_path ]];then
|
if [[ -z $app_path ]];then
|
||||||
script_debugger "Resuming in non X mode: $app_name not found. For package install advice run: $SCRIPT_NAME --recommends"
|
script_debugger "Resuming in non X mode: $app_name not found. For package install advice run: $SCRIPT_NAME --recommends"
|
||||||
B_SHOW_X_DATA='false'
|
B_SHOW_DISPLAY_DATA='false'
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -1596,7 +1596,7 @@ debug_data_collector()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $1 == 'xorg' || $1 == 'all' ]];then
|
if [[ $1 == 'xorg' || $1 == 'all' ]];then
|
||||||
if [[ $B_RUNNING_IN_X != 'true' ]];then
|
if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then
|
||||||
echo 'Warning: only some of the data collection can occur if you are not in X'
|
echo 'Warning: only some of the data collection can occur if you are not in X'
|
||||||
touch $debug_data_dir/warning-user-not-in-x
|
touch $debug_data_dir/warning-user-not-in-x
|
||||||
fi
|
fi
|
||||||
|
@ -3020,7 +3020,7 @@ set_perl_python_konvi()
|
||||||
{
|
{
|
||||||
if [[ -z $IRC_CLIENT_VERSION ]];then
|
if [[ -z $IRC_CLIENT_VERSION ]];then
|
||||||
# this is a hack to try to show konversation if inxi is running but started via /cmd
|
# this is a hack to try to show konversation if inxi is running but started via /cmd
|
||||||
if [[ -n $( grep -i 'konversation' <<< "$Ps_aux_Data" | grep -v 'grep' ) && $B_RUNNING_IN_X == 'true' ]];then
|
if [[ -n $( grep -i 'konversation' <<< "$Ps_aux_Data" | grep -v 'grep' ) && $B_RUNNING_IN_DISPLAY == 'true' ]];then
|
||||||
IRC_CLIENT='Konversation'
|
IRC_CLIENT='Konversation'
|
||||||
IRC_CLIENT_VERSION=" $( konversation --version 2>/dev/null | gawk '/^Konversation/ {print $2}' )"
|
IRC_CLIENT_VERSION=" $( konversation --version 2>/dev/null | gawk '/^Konversation/ {print $2}' )"
|
||||||
B_CONSOLE_IRC='false'
|
B_CONSOLE_IRC='false'
|
||||||
|
@ -4736,7 +4736,7 @@ get_graphics_card_data()
|
||||||
local i='' temp_array=''
|
local i='' temp_array=''
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
A_GFX_CARD_DATA=( $( gawk -F': ' '
|
A_GRAPHICS_CARD_DATA=( $( gawk -F': ' '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
busId=""
|
busId=""
|
||||||
|
@ -4750,15 +4750,15 @@ get_graphics_card_data()
|
||||||
print $NF "," busId
|
print $NF "," busId
|
||||||
}' <<< "$Lspci_v_Data" ) )
|
}' <<< "$Lspci_v_Data" ) )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
# for (( i=0; i < ${#A_GFX_CARD_DATA[@]}; i++ ))
|
# for (( i=0; i < ${#A_GRAPHICS_CARD_DATA[@]}; i++ ))
|
||||||
# do
|
# do
|
||||||
# A_GFX_CARD_DATA[i]=$( sanitize_characters BAN_LIST_NORMAL "${A_GFX_CARD_DATA[i]}" )
|
# A_GRAPHICS_CARD_DATA[i]=$( sanitize_characters BAN_LIST_NORMAL "${A_GRAPHICS_CARD_DATA[i]}" )
|
||||||
# done
|
# done
|
||||||
|
|
||||||
# GFXMEM is UNUSED at the moment, because it shows AGP aperture size, which is not necessarily equal to GFX memory..
|
# GFXMEM is UNUSED at the moment, because it shows AGP aperture size, which is not necessarily equal to GFX memory..
|
||||||
# GFXMEM="size=[$(echo "$Lspci_v_Data" | gawk '/VGA/{while (!/^$/) {getline;if (/size=[0-9][0-9]*M/) {size2=gensub(/.*\[size=([0-9]+)M\].*/,"\\1","g",$0);if (size<size2){size=size2}}}}END{print size2}')M]"
|
# GFXMEM="size=[$(echo "$Lspci_v_Data" | gawk '/VGA/{while (!/^$/) {getline;if (/size=[0-9][0-9]*M/) {size2=gensub(/.*\[size=([0-9]+)M\].*/,"\\1","g",$0);if (size<size2){size=size2}}}}END{print size2}')M]"
|
||||||
temp_array=${A_GFX_CARD_DATA[@]}
|
temp_array=${A_GRAPHICS_CARD_DATA[@]}
|
||||||
log_function_data "A_GFX_CARD_DATA: $temp_array"
|
log_function_data "A_GRAPHICS_CARD_DATA: $temp_array"
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4830,7 +4830,7 @@ get_graphics_glx_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local temp_array=''
|
local temp_array=''
|
||||||
if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
|
if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
A_GLX_DATA=( $( glxinfo | gawk -F ': ' '
|
A_GLX_DATA=( $( glxinfo | gawk -F ': ' '
|
||||||
# note: function declarations go before BEGIN? It appears so, confirm.
|
# note: function declarations go before BEGIN? It appears so, confirm.
|
||||||
|
@ -4900,7 +4900,7 @@ get_graphics_res_data()
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local screen_resolution='' xdpy_data='' screens_count=0 tty_session=''
|
local screen_resolution='' xdpy_data='' screens_count=0 tty_session=''
|
||||||
|
|
||||||
if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
|
if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
|
||||||
# Added the two ?'s , because the resolution is now reported without spaces around the 'x', as in
|
# Added the two ?'s , because the resolution is now reported without spaces around the 'x', as in
|
||||||
# 1400x1050 instead of 1400 x 1050. Change as of X.org version 1.3.0
|
# 1400x1050 instead of 1400 x 1050. Change as of X.org version 1.3.0
|
||||||
xdpy_data="$( xdpyinfo )"
|
xdpy_data="$( xdpyinfo )"
|
||||||
|
@ -4969,20 +4969,20 @@ get_graphics_res_data()
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
## create array of x vendor/version data
|
## create array of display server vendor/version data
|
||||||
get_graphics_x_data()
|
get_graphics_display_server_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local x_vendor='' x_version='' temp_array='' xdpy_info='' a_x_working=''
|
local vendor='' version='' temp_array='' xdpy_info='' a_display_vendor_working=''
|
||||||
|
|
||||||
if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
|
if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
|
||||||
# X vendor and version detection.
|
# X vendor and version detection.
|
||||||
# new method added since radeon and X.org and the disappearance of <X server name> version : ...etc
|
# new method added since radeon and X.org and the disappearance of <X server name> version : ...etc
|
||||||
# Later on, the normal textual version string returned, e.g. like: X.Org version: 6.8.2
|
# Later on, the normal textual version string returned, e.g. like: X.Org version: 6.8.2
|
||||||
# A failover mechanism is in place. (if $x_version is empty, the release number is parsed instead)
|
# A failover mechanism is in place. (if $version is empty, the release number is parsed instead)
|
||||||
# xdpy_info="$( xdpyinfo )"
|
# xdpy_info="$( xdpyinfo )"
|
||||||
IFS=","
|
IFS=","
|
||||||
a_x_working=( $( xdpyinfo | gawk -F': +' '
|
a_display_vendor_working=( $( xdpyinfo | gawk -F': +' '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
vendorString=""
|
vendorString=""
|
||||||
|
@ -5007,44 +5007,44 @@ get_graphics_x_data()
|
||||||
END {
|
END {
|
||||||
print vendorString "," version "," vendorRelease
|
print vendorString "," version "," vendorRelease
|
||||||
}' ) )
|
}' ) )
|
||||||
x_vendor=${a_x_working[0]}
|
vendor=${a_display_vendor_working[0]}
|
||||||
x_version=${a_x_working[1]}
|
version=${a_display_vendor_working[1]}
|
||||||
|
|
||||||
# this gives better output than the failure last case, which would only show:
|
# this gives better output than the failure last case, which would only show:
|
||||||
# for example: X.org: 1.9 instead of: X.org: 1.9.0
|
# for example: X.org: 1.9 instead of: X.org: 1.9.0
|
||||||
if [[ -z $x_version ]];then
|
if [[ -z $version ]];then
|
||||||
x_version=$( get_graphics_x_version )
|
version=$( get_graphics_display_server_version )
|
||||||
fi
|
fi
|
||||||
if [[ -z $x_version ]];then
|
if [[ -z $version ]];then
|
||||||
x_version=${a_x_working[2]}
|
version=${a_display_vendor_working[2]}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# some distros, like fedora, report themselves as the xorg vendor, so quick check
|
# some distros, like fedora, report themselves as the xorg vendor, so quick check
|
||||||
# here to make sure the vendor string includes Xorg in string
|
# here to make sure the vendor string includes Xorg in string
|
||||||
if [[ -z $( grep -E '(X|xorg|x\.org)' <<< $x_vendor ) ]];then
|
if [[ -z $( grep -E '(X|xorg|x\.org)' <<< $vendor ) ]];then
|
||||||
x_vendor="$x_vendor X.org"
|
vendor="$vendor X.org"
|
||||||
fi
|
fi
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
A_X_DATA[0]="$x_vendor"
|
A_DISPLAY_SERVER_DATA[0]="$vendor"
|
||||||
A_X_DATA[1]="$x_version"
|
A_DISPLAY_SERVER_DATA[1]="$version"
|
||||||
else
|
else
|
||||||
x_version=$( get_graphics_x_version )
|
version=$( get_graphics_display_server_version )
|
||||||
if [[ -n $x_version ]];then
|
if [[ -n $version ]];then
|
||||||
x_vendor='X.org'
|
vendor='X.org'
|
||||||
A_X_DATA[0]="$x_vendor"
|
A_DISPLAY_SERVER_DATA[0]="$vendor"
|
||||||
A_X_DATA[1]="$x_version"
|
A_DISPLAY_SERVER_DATA[1]="$version"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
temp_array=${A_X_DATA[@]}
|
temp_array=${A_DISPLAY_SERVER_DATA[@]}
|
||||||
log_function_data "A_X_DATA: $temp_array"
|
log_function_data "A_DISPLAY_SERVER_DATA: $temp_array"
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
# if other tests fail, try this one, this works for root, out of X also
|
# if other tests fail, try this one, this works for root, out of X also
|
||||||
get_graphics_x_version()
|
get_graphics_display_server_version()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local x_version='' x_data=''
|
local version='' x_data=''
|
||||||
# note that some users can have /usr/bin/Xorg but not /usr/bin/X
|
# note that some users can have /usr/bin/Xorg but not /usr/bin/X
|
||||||
if [[ -n $( type -p X ) ]];then
|
if [[ -n $( type -p X ) ]];then
|
||||||
# note: MUST be this syntax: X -version 2>&1
|
# note: MUST be this syntax: X -version 2>&1
|
||||||
|
@ -5056,7 +5056,7 @@ get_graphics_x_version()
|
||||||
x_data="$( Xorg -version 2>&1)"
|
x_data="$( Xorg -version 2>&1)"
|
||||||
fi
|
fi
|
||||||
if [[ -n $x_data ]];then
|
if [[ -n $x_data ]];then
|
||||||
x_version=$(
|
version=$(
|
||||||
gawk '
|
gawk '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
|
@ -5070,8 +5070,8 @@ get_graphics_x_version()
|
||||||
exit
|
exit
|
||||||
}' <<< "$x_data" )
|
}' <<< "$x_data" )
|
||||||
fi
|
fi
|
||||||
echo $x_version
|
echo $version
|
||||||
log_function_data " x_version: $x_version"
|
log_function_data " version: $version"
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5447,20 +5447,20 @@ get_lspci_data()
|
||||||
}
|
}
|
||||||
|
|
||||||
# args: $1 - busid
|
# args: $1 - busid
|
||||||
get_lspci_vendor_product()
|
get_lspci_chip_id()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
|
|
||||||
local vendor_product=''
|
local chip_id=''
|
||||||
|
|
||||||
vendor_product=$( gawk '
|
chip_id=$( gawk '
|
||||||
/^'$1'/ {
|
/^'$1'/ {
|
||||||
if ( $3 != "" ) {
|
if ( $3 != "" ) {
|
||||||
print $3
|
print $3
|
||||||
}
|
}
|
||||||
}' <<< "$Lspci_n_Data" )
|
}' <<< "$Lspci_n_Data" )
|
||||||
|
|
||||||
echo $vendor_product
|
echo $chip_id
|
||||||
|
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
@ -5815,7 +5815,7 @@ get_network_advanced_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local a_network_adv_working='' if_path='' working_path='' working_uevent_path='' dir_path=''
|
local a_network_adv_working='' if_path='' working_path='' working_uevent_path='' dir_path=''
|
||||||
local if_id='' speed='' duplex='' mac_id='' oper_state='' vendor_product=''
|
local if_id='' speed='' duplex='' mac_id='' oper_state='' chip_id=''
|
||||||
local usb_data='' usb_vendor='' usb_product='' product_path='' driver_test=''
|
local usb_data='' usb_vendor='' usb_product='' product_path='' driver_test=''
|
||||||
|
|
||||||
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
|
||||||
|
@ -5830,7 +5830,7 @@ get_network_advanced_data()
|
||||||
mac_id=''
|
mac_id=''
|
||||||
oper_state=''
|
oper_state=''
|
||||||
usb_data=''
|
usb_data=''
|
||||||
vendor_product=''
|
chip_id=''
|
||||||
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
||||||
# note although this may exist technically don't use it, it's a virtual path
|
# note although this may exist technically don't use it, it's a virtual path
|
||||||
# and causes weird cat errors when there's a missing file as well as a virtual path
|
# and causes weird cat errors when there's a missing file as well as a virtual path
|
||||||
|
@ -5929,9 +5929,9 @@ get_network_advanced_data()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${a_network_adv_working[10]} ]];then
|
if [[ -n ${a_network_adv_working[10]} ]];then
|
||||||
vendor_product=${a_network_adv_working[10]}
|
chip_id=${a_network_adv_working[10]}
|
||||||
fi
|
fi
|
||||||
A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id","$vendor_product
|
A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id","$chip_id
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -6974,7 +6974,7 @@ get_pciconf_card_data()
|
||||||
;;
|
;;
|
||||||
display)
|
display)
|
||||||
array_string="$device_string,${a_temp[4]},${a_temp[5]}"
|
array_string="$device_string,${a_temp[4]},${a_temp[5]}"
|
||||||
A_GFX_CARD_DATA[j]=$array_string
|
A_GRAPHICS_CARD_DATA[j]=$array_string
|
||||||
;;
|
;;
|
||||||
network)
|
network)
|
||||||
if [[ -n $ip_tool_command && -n ${a_temp[3]} ]];then
|
if [[ -n $ip_tool_command && -n ${a_temp[3]} ]];then
|
||||||
|
@ -8655,7 +8655,7 @@ print_it_out()
|
||||||
print_cpu_data
|
print_cpu_data
|
||||||
fi
|
fi
|
||||||
if [[ $B_SHOW_GRAPHICS == 'true' ]];then
|
if [[ $B_SHOW_GRAPHICS == 'true' ]];then
|
||||||
print_gfx_data
|
print_graphics_data
|
||||||
fi
|
fi
|
||||||
if [[ $B_SHOW_AUDIO == 'true' ]];then
|
if [[ $B_SHOW_AUDIO == 'true' ]];then
|
||||||
print_audio_data
|
print_audio_data
|
||||||
|
@ -8795,7 +8795,7 @@ print_audio_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local i='' card_id='' audio_data='' a_audio_data='' port_data='' pci_bus_id='' card_string=''
|
local i='' card_id='' audio_data='' a_audio_data='' port_data='' pci_bus_id='' card_string=''
|
||||||
local a_audio_working='' audio_driver='' alsa_data='' port_plural='' module_version=''
|
local a_audio_working='' audio_driver='' alsa_data='' port_plural='' module_version='' chip_id=''
|
||||||
local bus_usb_text='' bus_usb_id='' line_starter='Audio:' alsa='' alsa_version='' print_data=''
|
local bus_usb_text='' bus_usb_id='' line_starter='Audio:' alsa='' alsa_version='' print_data=''
|
||||||
local driver=''
|
local driver=''
|
||||||
# set A_AUDIO_DATA and get alsa data
|
# set A_AUDIO_DATA and get alsa data
|
||||||
|
@ -8843,7 +8843,8 @@ print_audio_data()
|
||||||
bus_usb_text=''
|
bus_usb_text=''
|
||||||
bus_usb_id=''
|
bus_usb_id=''
|
||||||
print_data=''
|
print_data=''
|
||||||
vendor_product=''
|
card_id=''
|
||||||
|
chip_id=''
|
||||||
|
|
||||||
if [[ ${#A_AUDIO_DATA[@]} -gt 1 ]];then
|
if [[ ${#A_AUDIO_DATA[@]} -gt 1 ]];then
|
||||||
card_id="-$(( $i + 1 ))"
|
card_id="-$(( $i + 1 ))"
|
||||||
|
@ -8876,26 +8877,26 @@ print_audio_data()
|
||||||
bus_usb_text='bus-ID'
|
bus_usb_text='bus-ID'
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ $BSD_TYPE != 'bsd' ]];then
|
if [[ $BSD_TYPE != 'bsd' ]];then
|
||||||
vendor_product=$( get_lspci_vendor_product "${a_audio_working[4]}" )
|
chip_id=$( get_lspci_chip_id "${a_audio_working[4]}" )
|
||||||
else
|
else
|
||||||
vendor_product=${a_audio_working[6]}
|
chip_id=${a_audio_working[6]}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
bus_usb_text='usb-ID'
|
bus_usb_text='usb-ID'
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
vendor_product=${a_audio_working[5]}
|
chip_id=${a_audio_working[5]}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
bus_usb_id=${a_audio_working[4]}
|
bus_usb_id=${a_audio_working[4]}
|
||||||
pci_bus_id="${C1}$bus_usb_text$SEP3${C2} $bus_usb_id "
|
pci_bus_id="${C1}$bus_usb_text$SEP3${C2} $bus_usb_id "
|
||||||
if [[ -n $vendor_product ]];then
|
if [[ -n $chip_id ]];then
|
||||||
vendor_product="${C1}chip-ID$SEP3${C2} $vendor_product "
|
chip_id="${C1}chip-ID$SEP3${C2} $chip_id "
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[0]} ]];then
|
if [[ -n ${a_audio_working[0]} ]];then
|
||||||
card_string="${C1}Card$card_id:${C2} ${a_audio_working[0]} "
|
card_string="${C1}Card$card_id:${C2} ${a_audio_working[0]} "
|
||||||
audio_data="$audio_driver$port_data$pci_bus_id$vendor_product"
|
audio_data="$audio_driver$port_data$pci_bus_id$chip_id"
|
||||||
fi
|
fi
|
||||||
# only print alsa on last line if short enough, otherwise print on its own line
|
# only print alsa on last line if short enough, otherwise print on its own line
|
||||||
if [[ $i -eq 0 ]];then
|
if [[ $i -eq 0 ]];then
|
||||||
|
@ -9115,22 +9116,22 @@ print_cpu_flags_full()
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
print_gfx_data()
|
print_graphics_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local gfx_data='' i='' card_id='' root_alert='' root_x_string='' a_gfx_working=''
|
local graphics_data='' card_id='' i='' root_alert='' root_x_string='' a_graphics_working=''
|
||||||
local b_is_mesa='false' display_full_string='' gfx_bus_id='' gfx_card_data=''
|
local b_is_mesa='false' display_full_string='' card_bus_id='' card_data=''
|
||||||
local res_tty='Resolution' xorg_data='' x_vendor_string='' vendor_product=''
|
local res_tty='Resolution' xorg_data='' display_vendor_string='' chip_id=''
|
||||||
local spacer='' x_driver='' x_driver_string='' x_driver_plural='' direct_render_string=''
|
local spacer='' driver='' driver_string='' driver_plural='' direct_render_string=''
|
||||||
local separator_loaded='' separator_unloaded='' separator_failed=''
|
local separator_loaded='' separator_unloaded='' separator_failed=''
|
||||||
local loaded='' unloaded='' failed=''
|
local loaded='' unloaded='' failed='' display_server_string=''
|
||||||
local line_starter='Graphics:'
|
local line_starter='Graphics:'
|
||||||
local screen_resolution="$( get_graphics_res_data )"
|
local screen_resolution="$( get_graphics_res_data )"
|
||||||
|
|
||||||
# set A_X_DATA
|
# set A_DISPLAY_SERVER_DATA
|
||||||
get_graphics_x_data
|
get_graphics_display_server_data
|
||||||
local x_vendor=${A_X_DATA[0]}
|
local display_vendor=${A_DISPLAY_SERVER_DATA[0]}
|
||||||
local x_version=${A_X_DATA[1]}
|
local display_version=${A_DISPLAY_SERVER_DATA[1]}
|
||||||
# set A_GLX_DATA
|
# set A_GLX_DATA
|
||||||
get_graphics_glx_data
|
get_graphics_glx_data
|
||||||
local glx_renderer="${A_GLX_DATA[0]}"
|
local glx_renderer="${A_GLX_DATA[0]}"
|
||||||
|
@ -9139,7 +9140,7 @@ print_gfx_data()
|
||||||
# note: using grep -ioE '(No|Yes)' <<< ${A_GLX_DATA[2]} did not work in Arch, no idea why
|
# note: using grep -ioE '(No|Yes)' <<< ${A_GLX_DATA[2]} did not work in Arch, no idea why
|
||||||
local glx_direct_render=$( gawk '{print $1}' <<< "${A_GLX_DATA[2]}" )
|
local glx_direct_render=$( gawk '{print $1}' <<< "${A_GLX_DATA[2]}" )
|
||||||
|
|
||||||
# set A_GFX_CARD_DATA
|
# set A_GRAPHICS_CARD_DATA
|
||||||
if [[ $BSD_TYPE == 'bsd' ]];then
|
if [[ $BSD_TYPE == 'bsd' ]];then
|
||||||
if [[ $B_PCICONF_SET == 'false' ]];then
|
if [[ $B_PCICONF_SET == 'false' ]];then
|
||||||
get_pciconf_data
|
get_pciconf_data
|
||||||
|
@ -9152,57 +9153,58 @@ print_gfx_data()
|
||||||
get_graphics_driver
|
get_graphics_driver
|
||||||
|
|
||||||
if [[ ${#A_GRAPHIC_DRIVERS[@]} -eq 0 ]];then
|
if [[ ${#A_GRAPHIC_DRIVERS[@]} -eq 0 ]];then
|
||||||
x_driver=' N/A'
|
driver=' N/A'
|
||||||
else
|
else
|
||||||
for (( i=0; i < ${#A_GRAPHIC_DRIVERS[@]}; i++ ))
|
for (( i=0; i < ${#A_GRAPHIC_DRIVERS[@]}; i++ ))
|
||||||
do
|
do
|
||||||
IFS=","
|
IFS=","
|
||||||
a_gfx_working=( ${A_GRAPHIC_DRIVERS[i]} )
|
a_graphics_working=( ${A_GRAPHIC_DRIVERS[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
case ${a_gfx_working[1]} in
|
case ${a_graphics_working[1]} in
|
||||||
loaded)
|
loaded)
|
||||||
loaded="$loaded$separator_loaded${a_gfx_working[0]}"
|
loaded="$loaded$separator_loaded${a_graphics_working[0]}"
|
||||||
separator_loaded=','
|
separator_loaded=','
|
||||||
;;
|
;;
|
||||||
unloaded)
|
unloaded)
|
||||||
unloaded="$unloaded$separator_unloaded${a_gfx_working[0]}"
|
unloaded="$unloaded$separator_unloaded${a_graphics_working[0]}"
|
||||||
separator_unloaded=','
|
separator_unloaded=','
|
||||||
;;
|
;;
|
||||||
failed)
|
failed)
|
||||||
failed="$failed$separator_failed${a_gfx_working[0]}"
|
failed="$failed$separator_failed${a_graphics_working[0]}"
|
||||||
separator_failed=','
|
separator_failed=','
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if [[ -n $loaded ]];then
|
if [[ -n $loaded ]];then
|
||||||
x_driver="${x_driver} $loaded"
|
driver="${driver} $loaded"
|
||||||
fi
|
fi
|
||||||
if [[ -n $unloaded ]];then
|
if [[ -n $unloaded ]];then
|
||||||
x_driver="${x_driver} (unloaded: $unloaded)"
|
driver="${driver} (unloaded: $unloaded)"
|
||||||
fi
|
fi
|
||||||
if [[ -n $failed ]];then
|
if [[ -n $failed ]];then
|
||||||
x_driver="${x_driver} ${RED}FAILED:${C2} $failed"
|
driver="${driver} ${RED}FAILED:${C2} $failed"
|
||||||
fi
|
fi
|
||||||
# sometimes for some reason there is no driver found but the array is started
|
# sometimes for some reason there is no driver found but the array is started
|
||||||
if [[ -z $x_driver ]];then
|
if [[ -z $driver ]];then
|
||||||
x_driver=' N/A'
|
driver=' N/A'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${#A_GRAPHIC_DRIVERS[@]} -gt 1 ]];then
|
if [[ ${#A_GRAPHIC_DRIVERS[@]} -gt 1 ]];then
|
||||||
x_driver_plural='s'
|
driver_plural='s'
|
||||||
fi
|
fi
|
||||||
x_driver_string="${C1}driver$x_driver_plural$SEP3${C2}$x_driver "
|
driver_string="${C1}driver$driver_plural$SEP3${C2}$driver "
|
||||||
|
|
||||||
# some basic error handling:
|
# some basic error handling:
|
||||||
if [[ -z $screen_resolution ]];then
|
if [[ -z $screen_resolution ]];then
|
||||||
screen_resolution='N/A'
|
screen_resolution='N/A'
|
||||||
fi
|
fi
|
||||||
if [[ -z $x_vendor || -z $x_version ]];then
|
if [[ -z $display_vendor || -z $display_version ]];then
|
||||||
x_vendor_string="${C1}X-Vendor:${C2} N/A "
|
display_vendor_string="N/A"
|
||||||
else
|
else
|
||||||
x_vendor_string="${C1}$x_vendor$SEP3${C2} $x_version "
|
display_vendor_string="$display_vendor $display_version"
|
||||||
fi
|
fi
|
||||||
|
display_server_string="${C1}Display Server$SEP3${C2}$display_vendor_string "
|
||||||
|
|
||||||
if [[ $B_ROOT == 'true' ]];then
|
if [[ $B_ROOT == 'true' ]];then
|
||||||
root_x_string='for root '
|
root_x_string='for root '
|
||||||
|
@ -9210,7 +9212,7 @@ print_gfx_data()
|
||||||
res_tty='tty size'
|
res_tty='tty size'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $B_RUNNING_IN_X != 'true' ]];then
|
if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then
|
||||||
root_x_string="${root_x_string}out of X"
|
root_x_string="${root_x_string}out of X"
|
||||||
res_tty='tty size'
|
res_tty='tty size'
|
||||||
fi
|
fi
|
||||||
|
@ -9219,68 +9221,68 @@ print_gfx_data()
|
||||||
root_x_string="${C1}Advanced Data:${C2} N/A $root_x_string"
|
root_x_string="${C1}Advanced Data:${C2} N/A $root_x_string"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
display_full_string="$x_vendor_string$x_driver_string${C1}${res_tty}$SEP3${C2} ${screen_resolution} $root_x_string"
|
display_full_string="$display_server_string$driver_string${C1}${res_tty}$SEP3${C2} ${screen_resolution} $root_x_string"
|
||||||
|
|
||||||
if [[ ${#A_GFX_CARD_DATA[@]} -gt 0 ]];then
|
if [[ ${#A_GRAPHICS_CARD_DATA[@]} -gt 0 ]];then
|
||||||
for (( i=0; i < ${#A_GFX_CARD_DATA[@]}; i++ ))
|
for (( i=0; i < ${#A_GRAPHICS_CARD_DATA[@]}; i++ ))
|
||||||
do
|
do
|
||||||
IFS=","
|
IFS=","
|
||||||
a_gfx_working=( ${A_GFX_CARD_DATA[i]} )
|
a_graphics_working=( ${A_GRAPHICS_CARD_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
gfx_bus_id=''
|
card_bus_id=''
|
||||||
gfx_card_data=${a_gfx_working[0]}
|
card_data=${a_graphics_working[0]}
|
||||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ -n ${a_gfx_working[1]} ]];then
|
if [[ -n ${a_graphics_working[1]} ]];then
|
||||||
gfx_bus_id=" ${C1}bus-ID$SEP3${C2} ${a_gfx_working[1]}"
|
card_bus_id=" ${C1}bus-ID$SEP3${C2} ${a_graphics_working[1]}"
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ $BSD_TYPE != 'bsd' ]];then
|
if [[ $BSD_TYPE != 'bsd' ]];then
|
||||||
vendor_product=$( get_lspci_vendor_product "${a_gfx_working[1]}" )
|
chip_id=$( get_lspci_chip_id "${a_graphics_working[1]}" )
|
||||||
else
|
else
|
||||||
vendor_product=${a_gfx_working[2]}
|
chip_id=${a_graphics_working[2]}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
gfx_bus_id=" ${C1}bus-ID$SEP3${C2} N/A"
|
card_bus_id=" ${C1}bus-ID$SEP3${C2} N/A"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n $vendor_product ]];then
|
if [[ -n $chip_id ]];then
|
||||||
vendor_product=" ${C1}chip-ID$SEP3${C2} $vendor_product"
|
chip_id=" ${C1}chip-ID$SEP3${C2} $chip_id"
|
||||||
fi
|
fi
|
||||||
if [[ ${#A_GFX_CARD_DATA[@]} -gt 1 ]];then
|
if [[ ${#A_GRAPHICS_CARD_DATA[@]} -gt 1 ]];then
|
||||||
card_id="Card-$(($i+1)):"
|
card_id="Card-$(($i+1)):"
|
||||||
else
|
else
|
||||||
card_id='Card:'
|
card_id='Card:'
|
||||||
fi
|
fi
|
||||||
gfx_data="${C1}$card_id${C2} $gfx_card_data$gfx_bus_id$vendor_product "
|
graphics_data="${C1}$card_id${C2} $card_data$card_bus_id$chip_id "
|
||||||
if [[ ${#A_GFX_CARD_DATA[@]} -gt 1 ]];then
|
if [[ ${#A_GRAPHICS_CARD_DATA[@]} -gt 1 ]];then
|
||||||
gfx_data=$( create_print_line "$line_starter" "${gfx_data}" )
|
graphics_data=$( create_print_line "$line_starter" "${graphics_data}" )
|
||||||
print_screen_output "$gfx_data"
|
print_screen_output "$graphics_data"
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
gfx_data=''
|
graphics_data=''
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes..
|
# handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes..
|
||||||
else
|
else
|
||||||
gfx_data="${C1}Card:${C2} Failed to Detect Video Card! "
|
graphics_data="${C1}Card:${C2} Failed to Detect Video Card! "
|
||||||
fi
|
fi
|
||||||
if [[ -n $gfx_data && $( calculate_line_length "${gfx_data}$display_full_string" ) -lt $LINE_MAX ]];then
|
if [[ -n $graphics_data && $( calculate_line_length "${graphics_data}$display_full_string" ) -lt $LINE_MAX ]];then
|
||||||
gfx_data=$( create_print_line "$line_starter" "${gfx_data}$display_full_string" )
|
graphics_data=$( create_print_line "$line_starter" "${graphics_data}$display_full_string" )
|
||||||
else
|
else
|
||||||
if [[ -n $gfx_data ]];then
|
if [[ -n $graphics_data ]];then
|
||||||
gfx_data=$( create_print_line "$line_starter" "$gfx_data" )
|
graphics_data=$( create_print_line "$line_starter" "$graphics_data" )
|
||||||
print_screen_output "$gfx_data"
|
print_screen_output "$graphics_data"
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
fi
|
fi
|
||||||
gfx_data=$( create_print_line "$line_starter" "$display_full_string" )
|
graphics_data=$( create_print_line "$line_starter" "$display_full_string" )
|
||||||
fi
|
fi
|
||||||
print_screen_output "$gfx_data"
|
print_screen_output "$graphics_data"
|
||||||
# if [[ -z $glx_renderer || -z $glx_version ]];then
|
# if [[ -z $glx_renderer || -z $glx_version ]];then
|
||||||
# b_is_mesa='true'
|
# b_is_mesa='true'
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
## note: if glx render or version have no content, then mesa is true
|
## note: if glx render or display_version have no content, then mesa is true
|
||||||
# if [[ $B_SHOW_X_DATA == 'true' ]] && [[ $b_is_mesa != 'true' ]];then
|
# if [[ $B_SHOW_DISPLAY_DATA == 'true' ]] && [[ $b_is_mesa != 'true' ]];then
|
||||||
if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
|
if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
|
||||||
if [[ -z $glx_renderer ]];then
|
if [[ -z $glx_renderer ]];then
|
||||||
glx_renderer='N/A'
|
glx_renderer='N/A'
|
||||||
fi
|
fi
|
||||||
|
@ -9293,10 +9295,10 @@ print_gfx_data()
|
||||||
if [[ $B_HANDLE_CORRUPT_DATA == 'true' || $B_EXTRA_DATA == 'true' ]];then
|
if [[ $B_HANDLE_CORRUPT_DATA == 'true' || $B_EXTRA_DATA == 'true' ]];then
|
||||||
direct_render_string=" ${C1}Direct Rendering$SEP3${C2} ${glx_direct_render}${CN}"
|
direct_render_string=" ${C1}Direct Rendering$SEP3${C2} ${glx_direct_render}${CN}"
|
||||||
fi
|
fi
|
||||||
gfx_data="${C1}GLX Renderer$SEP3${C2} ${glx_renderer} ${C1}GLX Version$SEP3${C2} ${glx_version}${CN}$direct_render_string"
|
graphics_data="${C1}GLX Renderer$SEP3${C2} ${glx_renderer} ${C1}GLX Version$SEP3${C2} ${glx_version}${CN}$direct_render_string"
|
||||||
gfx_data=$( create_print_line " " "$gfx_data" )
|
graphics_data=$( create_print_line " " "$graphics_data" )
|
||||||
|
|
||||||
print_screen_output "$gfx_data"
|
print_screen_output "$graphics_data"
|
||||||
fi
|
fi
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
@ -9460,7 +9462,7 @@ print_info_data()
|
||||||
if [[ -n $shell_data ]];then
|
if [[ -n $shell_data ]];then
|
||||||
# note, if you start this in tty, it will give 'login' as the parent, which we don't want.
|
# note, if you start this in tty, it will give 'login' as the parent, which we don't want.
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ $B_RUNNING_IN_X != 'true' ]];then
|
if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then
|
||||||
shell_parent=$( get_tty_number )
|
shell_parent=$( get_tty_number )
|
||||||
shell_parent="tty $shell_parent"
|
shell_parent="tty $shell_parent"
|
||||||
else
|
else
|
||||||
|
@ -9481,7 +9483,7 @@ print_info_data()
|
||||||
info_data="${C1}Processes$SEP3${C2} ${processes} ${C1}Uptime$SEP3${C2} ${up_time} ${C1}Memory$SEP3${C2} ${memory}${CN} "
|
info_data="${C1}Processes$SEP3${C2} ${processes} ${C1}Uptime$SEP3${C2} ${up_time} ${C1}Memory$SEP3${C2} ${memory}${CN} "
|
||||||
|
|
||||||
# this only triggers if no X data is present or if extra data switch is on
|
# this only triggers if no X data is present or if extra data switch is on
|
||||||
if [[ $B_SHOW_X_DATA != 'true' || $B_EXTRA_DATA == 'true' ]];then
|
if [[ $B_SHOW_DISPLAY_DATA != 'true' || $B_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
runlvl_default=$( get_runlevel_default )
|
runlvl_default=$( get_runlevel_default )
|
||||||
if [[ -z $runlvl_default ]];then
|
if [[ -z $runlvl_default ]];then
|
||||||
|
@ -9742,7 +9744,7 @@ print_networking_data()
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local i='' card_id='' network_data='' a_network_working='' port_data='' driver_data=''
|
local i='' card_id='' network_data='' a_network_working='' port_data='' driver_data=''
|
||||||
local card_string='' port_plural='' module_version='' pci_bus_id='' bus_usb_text=''
|
local card_string='' port_plural='' module_version='' pci_bus_id='' bus_usb_text=''
|
||||||
local bus_usb_id='' line_starter='Network:' card_string='' card_data='' vendor_product=''
|
local bus_usb_id='' line_starter='Network:' card_string='' card_data='' chip_id=''
|
||||||
local driver=''
|
local driver=''
|
||||||
# set A_NETWORK_DATA
|
# set A_NETWORK_DATA
|
||||||
if [[ $BSD_TYPE == 'bsd' ]];then
|
if [[ $BSD_TYPE == 'bsd' ]];then
|
||||||
|
@ -9772,10 +9774,11 @@ print_networking_data()
|
||||||
pci_bus_id=''
|
pci_bus_id=''
|
||||||
port_data=''
|
port_data=''
|
||||||
port_plural=''
|
port_plural=''
|
||||||
vendor_product=''
|
card_id=''
|
||||||
|
chip_id=''
|
||||||
|
|
||||||
if [[ ${#A_NETWORK_DATA[@]} -gt 1 ]];then
|
if [[ ${#A_NETWORK_DATA[@]} -gt 1 ]];then
|
||||||
card_id="-$(( $i + 1 ))"
|
chip_id="-$(( $i + 1 ))"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[1]} && $B_EXTRA_DATA == 'true' && $BSD_TYPE != 'bsd' ]];then
|
if [[ -n ${a_network_working[1]} && $B_EXTRA_DATA == 'true' && $BSD_TYPE != 'bsd' ]];then
|
||||||
module_version=$( print_module_version "${a_network_working[1]}" )
|
module_version=$( print_module_version "${a_network_working[1]}" )
|
||||||
|
@ -9801,25 +9804,25 @@ print_networking_data()
|
||||||
bus_usb_id=${a_network_working[4]}
|
bus_usb_id=${a_network_working[4]}
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ $BSD_TYPE != 'bsd' ]];then
|
if [[ $BSD_TYPE != 'bsd' ]];then
|
||||||
vendor_product=$( get_lspci_vendor_product "${a_network_working[4]}" )
|
chip_id=$( get_lspci_chip_id "${a_network_working[4]}" )
|
||||||
else
|
else
|
||||||
vendor_product=${a_network_working[10]}
|
chip_id=${a_network_working[10]}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
bus_usb_text='usb-ID'
|
bus_usb_text='usb-ID'
|
||||||
bus_usb_id=$( cut -d '-' -f '2-4' <<< ${a_network_working[4]} )
|
bus_usb_id=$( cut -d '-' -f '2-4' <<< ${a_network_working[4]} )
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
vendor_product=${a_network_working[10]}
|
chip_id=${a_network_working[10]}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
pci_bus_id="${C1}$bus_usb_text$SEP3${C2} $bus_usb_id"
|
pci_bus_id="${C1}$bus_usb_text$SEP3${C2} $bus_usb_id"
|
||||||
if [[ -n $vendor_product ]];then
|
if [[ -n $chip_id ]];then
|
||||||
vendor_product=" ${C1}chip-ID$SEP3${C2} $vendor_product"
|
chip_id=" ${C1}chip-ID$SEP3${C2} $chip_id"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
card_string="${C1}Card$card_id:${C2} ${a_network_working[0]} "
|
card_string="${C1}Card$card_id:${C2} ${a_network_working[0]} "
|
||||||
card_data="$driver_data$port_data$pci_bus_id$vendor_product"
|
card_data="$driver_data$port_data$pci_bus_id$chip_id"
|
||||||
if [[ $( calculate_line_length "$card_string$card_data" ) -gt $LINE_MAX ]];then
|
if [[ $( calculate_line_length "$card_string$card_data" ) -gt $LINE_MAX ]];then
|
||||||
network_data=$( create_print_line "$line_starter" "$card_string" )
|
network_data=$( create_print_line "$line_starter" "$card_string" )
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
|
@ -10845,7 +10848,7 @@ print_system_data()
|
||||||
local tty_session=''
|
local tty_session=''
|
||||||
|
|
||||||
# I think these will work, maybe, if logged in as root and in X
|
# I think these will work, maybe, if logged in as root and in X
|
||||||
if [[ $B_RUNNING_IN_X == 'true' ]];then
|
if [[ $B_RUNNING_IN_DISPLAY == 'true' ]];then
|
||||||
desktop_environment=$( get_desktop_environment )
|
desktop_environment=$( get_desktop_environment )
|
||||||
if [[ -z $desktop_environment ]];then
|
if [[ -z $desktop_environment ]];then
|
||||||
desktop_environment='N/A'
|
desktop_environment='N/A'
|
||||||
|
@ -10873,7 +10876,7 @@ print_system_data()
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
dm_data=$( get_display_manager )
|
dm_data=$( get_display_manager )
|
||||||
# here we only want the dm info to show N/A if in X
|
# here we only want the dm info to show N/A if in X
|
||||||
if [[ -z $dm_data && $B_RUNNING_IN_X == 'true' ]];then
|
if [[ -z $dm_data && $B_RUNNING_IN_DISPLAY == 'true' ]];then
|
||||||
dm_data='N/A'
|
dm_data='N/A'
|
||||||
fi
|
fi
|
||||||
# only print out of X if dm_data has info, then it's actually useful, but
|
# only print out of X if dm_data has info, then it's actually useful, but
|
||||||
|
|
7
inxi.1
7
inxi.1
|
@ -1,4 +1,4 @@
|
||||||
.TH INXI 1 "2014\-01\-13" inxi "inxi manual"
|
.TH INXI 1 "2014\-03\-03" 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
|
||||||
|
|
||||||
|
@ -104,7 +104,10 @@ Does not show extra verbose options like \fB\-x \-d \-f \-u \-l \-o \-p \-t \-r\
|
||||||
that argument.
|
that argument.
|
||||||
.TP
|
.TP
|
||||||
.B \-G
|
.B \-G
|
||||||
Show Graphic card information (card, x type, resolution, glx renderer, version).
|
Show Graphic card information. Card(s), Display Server (vendor and version number), for example:
|
||||||
|
\fBDisplay Server: Xorg 1.15.1 \fR
|
||||||
|
,screen resolution(s), glx renderer, version). At some point Wayland and other display servers
|
||||||
|
may be added once enough data has been collected.
|
||||||
.TP
|
.TP
|
||||||
.B \-h
|
.B \-h
|
||||||
This help menu.
|
This help menu.
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 1.9.19
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2014-03-03
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version; updated man page. Changed slightly the output for x server, in preparation
|
||||||
|
for adding alternate display servers, like Wayland or Mir. Rather than release all the
|
||||||
|
stuff at once I'm going to do it bit by bit. Currently I have not found a wayland iso
|
||||||
|
test cd that boots in virtual box so I will have to wait to really add support there.
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Mon, 03 Mar 2014 15:27:05 -0800
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 1.9.18
|
Version: 1.9.18
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue