mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.41.4
This commit is contained in:
parent
d2af029be3
commit
b8cf309853
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
version=2.41.3
|
version=2.41.4
|
||||||
date="20/11/2017"
|
date="21/11/2017"
|
||||||
projet="simpledeb"
|
projet="simpledeb"
|
||||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||||
script="getInfo"
|
script="getInfo"
|
||||||
|
@ -954,7 +954,7 @@ fi_efi(){ # 20/11/2017
|
||||||
unset text
|
unset text
|
||||||
}
|
}
|
||||||
|
|
||||||
fi_graph(){ # 20/11/2017
|
fi_graph(){ # 21/11/2017
|
||||||
local slots cards cmd_cards ig
|
local slots cards cmd_cards ig
|
||||||
local stck_glxinfo stck_glxinfoOpt stck_glxinfoDri glx_dvc cmd_glx_dvc glx_dvc_temp openGl cmd_openGl
|
local stck_glxinfo stck_glxinfoOpt stck_glxinfoDri glx_dvc cmd_glx_dvc glx_dvc_temp openGl cmd_openGl
|
||||||
local providers resolutions pluriel modules cmt_modules text
|
local providers resolutions pluriel modules cmt_modules text
|
||||||
|
@ -1017,8 +1017,14 @@ fi_graph(){ # 20/11/2017
|
||||||
fi_graph_openGl(){
|
fi_graph_openGl(){
|
||||||
local iogl dri_glxinfo=""
|
local iogl dri_glxinfo=""
|
||||||
[[ "$1" == "opt" ]] && openGl+="---- \n"
|
[[ "$1" == "opt" ]] && openGl+="---- \n"
|
||||||
for iogl in 'vendor' 'renderer' 'version' 'shading language' 'extensions'; do
|
toScrut=(
|
||||||
[ "$iogl" == 'shading language' ] || iogl="OpenGL $iogl"
|
'OpenGL vendor'
|
||||||
|
'OpenGL renderer'
|
||||||
|
'OpenGL version'
|
||||||
|
'shading language'
|
||||||
|
'OpenGL extensions'
|
||||||
|
)
|
||||||
|
for iogl in "${toScrut[@]}" ; do
|
||||||
if [ "$1" == "dri" ]; then
|
if [ "$1" == "dri" ]; then
|
||||||
dri_glxinfo+=$( grep "$iogl" <<< $stck_glxinfoDri )$'\n'
|
dri_glxinfo+=$( grep "$iogl" <<< $stck_glxinfoDri )$'\n'
|
||||||
elif [ "$1" == "opt" ]; then
|
elif [ "$1" == "opt" ]; then
|
||||||
|
@ -1243,21 +1249,27 @@ fi_locale(){ # 20/11/2017
|
||||||
unset text
|
unset text
|
||||||
}
|
}
|
||||||
|
|
||||||
fi_log_xorg(){ # 20/11/2017
|
fi_log_xorg(){ # 21/11/2017
|
||||||
[ "$ENV_SSH" ] && return 0
|
[ "$ENV_SSH" ] && return 0
|
||||||
local logXorg cmd_logXorg cmt_logXorg xfile extract dateFile text nb_lignes=50
|
local toScrut logXorg cmd_logXorg="" cmt_logXorg xfile extract dateFile text nb_lignes=50 info_logs
|
||||||
# Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice,
|
# Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice,
|
||||||
# (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown (WW) warning, (EE) erreur
|
# (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown (WW) warning, (EE) erreur
|
||||||
for xfile in /var/log/Xorg.0.log /home/$user_/.local/share/xorg/Xorg.0.log ; do
|
toScrut=(
|
||||||
|
/var/log/Xorg.0.log
|
||||||
|
/home/$user_/.local/share/xorg/Xorg.0.log
|
||||||
|
/var/lib/gdm3/.local/share/xorg/Xorg.0.log
|
||||||
|
)
|
||||||
|
for xfile in "${toScrut[@]}"; do
|
||||||
if [ -e "$xfile" ]; then
|
if [ -e "$xfile" ]; then
|
||||||
dateFile=$(date -r $xfile '+%d/%m/%Y %H:%M %z')
|
dateFile=$( date -r $xfile '+%d/%m/%Y %H:%M %z' )
|
||||||
extract="$(grep -Es '\(WW\)|\(EE\)|\(\?\?\)' $xfile | sed '/(WW) warning, (EE) error,/d')"
|
extract=$( grep -Es '\(WW\)|\(EE\)|\(\?\?\)' $xfile | sed '/(WW) warning, (EE) error,/d' )
|
||||||
extract="$(sed -n 1,"$nb_lignes"p <<< $extract)"
|
extract="$(sed -n 1,"$nb_lignes"p <<< $extract)"
|
||||||
if [ "$extract" ]; then
|
if [ "$extract" ]; then
|
||||||
logXorg+=" $xfile, date de modification: $dateFile \n\n"
|
logXorg+=" $xfile, date de modification: $dateFile \n\n"
|
||||||
logXorg+=" (WW) **warning**, (EE) **erreur**, (??) inconnu, $nb_lignes premières lignes \n"
|
logXorg+=" (WW) **warning**, (EE) **erreur**, (??) inconnu, $nb_lignes premières lignes \n"
|
||||||
logXorg+="$(grep -E '\(EE\)' <<< $extract) \n"
|
logXorg+="$(grep -E '\(EE\)' <<< $extract) \n"
|
||||||
logXorg+="$(grep -E '\(WW\)' <<< $extract) "$'\n'$'\n'
|
logXorg+="$(grep -E '\(WW\)' <<< $extract) "$'\n'$'\n'
|
||||||
|
cmd_logXorg+="$xfile "
|
||||||
else
|
else
|
||||||
logXorg+=" $xfile : <vide> "$'\n'$'\n'
|
logXorg+=" $xfile : <vide> "$'\n'$'\n'
|
||||||
fi
|
fi
|
||||||
|
@ -1266,12 +1278,15 @@ fi_log_xorg(){ # 20/11/2017
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
logXorg="${logXorg::-2}"
|
logXorg="${logXorg::-2}"
|
||||||
cmd_logXorg="grep -Es '\(WW\)|\(EE\)|\(\?\?\)' /var/log/Xorg.?.log /home/<user>/.local/share/xorg/Xorg.?.log"
|
cmd_logXorg=${cmd_logXorg% } # suppression espace final
|
||||||
|
info_logs="voir les options appliquées par défaut: **cat $cmd_logXorg | grep '(\*\*)**' "
|
||||||
|
cmd_logXorg="grep -Es '\(WW\)|\(EE\)|\(\?\?\)' $cmd_logXorg" # suppression espace final
|
||||||
|
# cmd_logXorg="grep -Es '\(WW\)|\(EE\)|\(\?\?\)' ${toScrut[@]}"
|
||||||
cmt_logXorg="Xorg.log"
|
cmt_logXorg="Xorg.log"
|
||||||
###
|
###
|
||||||
text="## journaux Xorg \n\n"
|
text="## journaux Xorg \n\n"
|
||||||
f_display "logXorg" "cmd" "$cmd_logXorg" "$cmt_logXorg"
|
f_display "logXorg" "cmd" "$cmd_logXorg" "$cmt_logXorg"
|
||||||
text+="voir les options appliquées par défaut: **cat /var/log/Xorg.0.log | grep '(\*\*)**'\n\n"
|
f_dspl_alert "info_logs" "info"
|
||||||
echo -en "$text\n" >> "$fileOutput"
|
echo -en "$text\n" >> "$fileOutput"
|
||||||
unset text
|
unset text
|
||||||
}
|
}
|
||||||
|
@ -1884,7 +1899,7 @@ fi_system_analyse(){ # 20/11/2017
|
||||||
}
|
}
|
||||||
|
|
||||||
fi_systeme(){ # 19/11/2017
|
fi_systeme(){ # 19/11/2017
|
||||||
local mbr uname bootImage initDaemon xorg shells lastboot uptime charge pluriel text
|
local mbr uname bootImage initDaemon serverX shells lastboot uptime charge pluriel text
|
||||||
local alimentation alim_total ish ifs_origin ligne date_install microcode
|
local alimentation alim_total ish ifs_origin ligne date_install microcode
|
||||||
local alert_SLiM alert_microcode
|
local alert_SLiM alert_microcode
|
||||||
[ -d /sys/firmware/efi ] && mbr="EFI" || mbr="Legacy (mbr)"
|
[ -d /sys/firmware/efi ] && mbr="EFI" || mbr="Legacy (mbr)"
|
||||||
|
@ -1895,9 +1910,9 @@ fi_systeme(){ # 19/11/2017
|
||||||
[ "$initDaemon" == "systemd" ] && initDaemon=$( systemd --version )
|
[ "$initDaemon" == "systemd" ] && initDaemon=$( systemd --version )
|
||||||
initDaemon=${initDaemon%%[[:space:]]+*}
|
initDaemon=${initDaemon%%[[:space:]]+*}
|
||||||
initDaemon=${initDaemon/systemd/systemd version}
|
initDaemon=${initDaemon/systemd/systemd version}
|
||||||
[ "$ENV_SSH" ] && xorg="n/a (ssh)" || xorg="$XDG_SESSION_TYPE"
|
[ "$ENV_SSH" ] && serverX="n/a (ssh)" || serverX="$XDG_SESSION_TYPE"
|
||||||
if [ -z "$xorg" ]; then
|
if [ -z "$serverX" ]; then
|
||||||
[ "$(ps -ef | grep -c 'wayland')" -gt 1 ] && xorg="wayland" || xorg="indéterminé"
|
[ "$(ps -ef | grep -c 'wayland')" -gt 1 ] && serverX="wayland" || serverX="indéterminé"
|
||||||
fi
|
fi
|
||||||
for ish in $(f_grep_file "/etc/shells" "nofile"); do
|
for ish in $(f_grep_file "/etc/shells" "nofile"); do
|
||||||
shells+=${ish##*/}" " # conservation dernier "champs", ifs '/'
|
shells+=${ish##*/}" " # conservation dernier "champs", ifs '/'
|
||||||
|
@ -1969,9 +1984,9 @@ fi_systeme(){ # 19/11/2017
|
||||||
text+="architecture système: $architecture \n"
|
text+="architecture système: $architecture \n"
|
||||||
text+="uname: $uname \n"
|
text+="uname: $uname \n"
|
||||||
text+="$bootImage \n"
|
text+="$bootImage \n"
|
||||||
text+="date d'installation (fiable?): $date_install \n"
|
text+="date d'installation: $date_install \n"
|
||||||
text+="démon d'initialisation: $initDaemon \n"
|
text+="démon d'initialisation: $initDaemon \n"
|
||||||
text+="serveur d'affichage: $xorg \n"
|
text+="serveur d'affichage: $serverX \n"
|
||||||
text+="nombre d'écrans: $fg_nb_screen \n"
|
text+="nombre d'écrans: $fg_nb_screen \n"
|
||||||
[ "$(f__wcv "-wv" "$fg_resolution" "pixels")" -gt 1 ] && pluriel="s" || unset pluriel
|
[ "$(f__wcv "-wv" "$fg_resolution" "pixels")" -gt 1 ] && pluriel="s" || unset pluriel
|
||||||
text+="résolution"$pluriel": $fg_resolution \n"
|
text+="résolution"$pluriel": $fg_resolution \n"
|
||||||
|
@ -3198,7 +3213,7 @@ prg_1(){ # début
|
||||||
prg_2(){ # traitements principaux 20/11/2017
|
prg_2(){ # traitements principaux 20/11/2017
|
||||||
# essai détection erreur No protocol specified, Can't open display :0 (root Fedora)
|
# essai détection erreur No protocol specified, Can't open display :0 (root Fedora)
|
||||||
if [ -z "$DISPLAY" ]; then
|
if [ -z "$DISPLAY" ]; then
|
||||||
f__info "des erreurs$YELLOW Can't open display$BLUE peut indiquer un défaut de configuration système (Xorg, Wayland?)" \
|
f__info "des erreurs$YELLOW Can't open display$BLUE peut indiquer une nouvelle fonctionnalité Wayland" \
|
||||||
"lancer le script en utilisateur pour avoir toutes les informations"
|
"lancer le script en utilisateur pour avoir toutes les informations"
|
||||||
fi
|
fi
|
||||||
if [[ "$1" == all || "$1" =~ s ]]; then #systeme, matériel -cs
|
if [[ "$1" == all || "$1" =~ s ]]; then #systeme, matériel -cs
|
||||||
|
@ -3357,7 +3372,7 @@ for j in $options; do
|
||||||
case $j in
|
case $j in
|
||||||
-t | --test )
|
-t | --test )
|
||||||
prg_1 "$*"
|
prg_1 "$*"
|
||||||
fi_graph
|
fi_log_xorg
|
||||||
exit ;; # test
|
exit ;; # test
|
||||||
-c* | all )
|
-c* | all )
|
||||||
[ "$j" == "-c" ] && exec $0 "menu"
|
[ "$j" == "-c" ] && exec $0 "menu"
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
* f__wcv, f_display_grep, f_dspl_md, f__wget_test, fscript_get_version, fscript_update
|
* f__wcv, f_display_grep, f_dspl_md, f__wget_test, fscript_get_version, fscript_update
|
||||||
* ! f__requis, fscript_install, f__scandir
|
* ! f__requis, fscript_install, f__scandir
|
||||||
|
|
||||||
|
## 2.41.4 21/11/2017
|
||||||
|
|
||||||
|
* révision: fi_log_xorg, + emplacement log sous gdm3 X11 (nouveau sous buster?), cmd et info adaptés
|
||||||
|
|
||||||
## 2.41.3 20/11/2017
|
## 2.41.3 20/11/2017
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue