getInfo 2.66.2

This commit is contained in:
kyodev 2017-12-15 01:18:35 +01:00
parent 708254bc73
commit 1244c697c4
2 changed files with 264 additions and 250 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
version=2.66.1
version=2.66.2
date="14/12/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
@ -514,10 +514,10 @@ toDisplay=(
echo -e "$STD\n plus d'infos: $GREEN$urlNotice\n$STD"
}
# f_prnt "1||2|3|l1|l2|l3|titre1|titre2|titre3|hl|quote|flush|code" "texte" '[CONDITION test]'
# f_prnt "1||2|3|l1|l2|l3|tit1|tit2|tit3|hl|quote|flush|code" "texte" '[CONDITION test]'
# $1: 1|2|3 indentation, liste à puce, une puce par ligne
# l1|l2|l3 ligne, indentation, avec espaces
# titre1|titre2|titre3
# tit1|tit2|tit3
# quote|hl|flush
# $2 texte à afficher
# $3 test éventuel, Si CONDITION ok -> affichage
@ -528,19 +528,19 @@ toDisplay=(
f_prnt(){ # 11/12/2017
local preline='' line='' endline=" \n"
[[ "$1" =~ titre ]] && preline="\n\n"
[[ "$1" == 'titre1' ]] && preline+="# "
[[ "$1" == 'titre2' ]] && preline+="## "
[[ "$1" == 'titre3' ]] && preline+="### "
[[ "$1" =~ titre ]] && endline+="\n"
[[ "$1" == '1' ]] && line="$( sed -E 's/(.*)/* \1 /' <<<$2 )"
[[ "$1" == '2' ]] && line="$( sed -E 's/(.*)/ * \1 /' <<<$2 )"
[[ "$1" == '3' ]] && line="$( sed -E 's/(.*)/ * \1 /' <<<$2 )"
[[ "$1" == 'l1' ]] && line="$( sed -E 's/(.*)/\1/ ' <<<$2 )"
[[ "$1" == 'l2' ]] && line="$( sed -E 's/(.*)/ \1/ ' <<<$2 )"
[[ "$1" == 'l3' ]] && line="$( sed -E 's/(.*)/ \1/ ' <<<$2 )"
[[ "$1" =~ titre ]] && preline="\n\n"
[[ "$1" == 'tit1' ]] && preline+="# "
[[ "$1" == 'tit2' ]] && preline+="## "
[[ "$1" == 'tit3' ]] && preline+="### "
[[ "$1" =~ titre ]] && endline+="\n"
[[ "$1" == '1' ]] && line="$( sed -E 's/(.*)/* \1 /' <<<$2 )"
[[ "$1" == '2' ]] && line="$( sed -E 's/(.*)/ * \1 /' <<<$2 )"
[[ "$1" == '3' ]] && line="$( sed -E 's/(.*)/ * \1 /' <<<$2 )"
[[ "$1" == 'l1' ]] && line="$( sed -E 's/(.*)/\1/ ' <<<$2 )"
[[ "$1" == 'l2' ]] && line="$( sed -E 's/(.*)/ \1/ ' <<<$2 )"
[[ "$1" == 'l3' ]] && line="$( sed -E 's/(.*)/ \1/ ' <<<$2 )"
[[ "$1" == 'quote' ]] && preline="> "
[[ "$line" ]] || line="$2" # utilisation $2 sans traitement à faire
[[ "$line" ]] || line="$2" # utilisation $2 sans traitement à faire
if [[ "$3" ]]; then
eval $3 || return 0 # évaluation de la CONDITION, si erreur: sortie
@ -687,16 +687,16 @@ fi_audio(){ # 14/12/2017
cmt_modAudio="$( f__wcv -wv "$modAudio" "^[[:alnum:]]" ) module"$pluriel" utilisé"$pluriel
fi
###
f_prnt titre2 "audio"
f_prnt l "$(sed -E 's/(.*)/**\1** /' <<< $fe_cards_audio)" # en gras
f_prnt tit2 "audio"
f_prnt 1 "$( sed -E 's/(.*)/**\1** /' <<< $fe_cards_audio )" # en gras
f_prnt
# lspci -nnv
f_dspl cmd "$cardsAudio" "$cmd_cards"
f_dspl cmd "$cardsAudio" "$cmd_cards"
f_dspl_alrt "$alert_alsa" "alert"
f_dspl cmd "$version_alsa" "/proc/asound/version" "driver alsa (Advanced Linux Sound Architecture)"
f_dspl cmd "$card_alsa" "$cmd_card_alsa" "$cmt_card_alsa"
f_dspl cmd "$mod_alsa" "$cmd_card_alsa" "$cmt_card_alsa"
f_dspl cmd "$modAudio" "$cmd_modAudio" "$cmt_modAudio"
f_dspl cmd "$version_alsa" "/proc/asound/version" "driver alsa (Advanced Linux Sound Architecture)"
f_dspl cmd "$card_alsa" "$cmd_card_alsa" "$cmt_card_alsa"
f_dspl cmd "$mod_alsa" "$cmd_card_alsa" "$cmt_card_alsa"
f_dspl cmd "$modAudio" "$cmd_modAudio" "$cmt_modAudio"
}
fi_batt(){ # 14/12/2017
@ -706,8 +706,8 @@ fi_batt(){ # 14/12/2017
[ "$fg_batt" ] || return 0 # pas de batterie
[ "$fg_nb_batt" -gt 1 ] && pluriel="s" || unset pluriel
###
f_prnt titre2 "batterie"$pluriel
f_dspl sans "$fg_batt"
f_prnt tit2 "batterie"$pluriel
f_dspl sans "$fg_batt"
}
# [$1=silent], assigne $fe_nb_bluez, $fe_cards_bluez
@ -739,9 +739,9 @@ fi_bluez(){ # 14/12/2017
cmt_mod="$( f__wcv -l "$mod" ) module"$pluriel" utilisé"$pluriel
fg_mod_motif=${fg_mod_motif//|/ } # fg_mod_motif motif de recherche, avec |
###
f_prnt titre2 "Bluetooth"
f_dspl cmd "$bluez" "$cmd_bluez" "$cmt_bluez"
f_dspl cmd "$mod" "$cmd_mod" "$cmt_mod"
f_prnt tit2 "Bluetooth"
f_dspl cmd "$bluez" "$cmd_bluez" "$cmt_bluez"
f_dspl cmd "$mod" "$cmd_mod" "$cmt_mod"
[ "$mod" ] || f_dspl sans "$fg_mod_motif" "" "pas de modules en mémoire parmi:"
}
@ -770,8 +770,8 @@ fi_conf(){ # 13/12/2017
confs=$( f_grep_file "${toScrut[*]}" "noinexist" )
###
f_prnt titre2 "fichiers configuration divers"
f_dspl cmd "$confs" "grep -Ersv '^#|^$' <fichiers désirés>"
f_prnt tit2 "fichiers configuration divers"
f_dspl cmd "$confs" "grep -Ersv '^#|^$' <fichiers désirés>"
}
fi_cpu(){ # 14/12/2017
@ -801,14 +801,14 @@ fi_cpu(){ # 14/12/2017
[ "$(( ${fg_cpu:0:1} ))" -gt 1 ] && pluriel="s" || unset pluriel
unset CPU_FLAGS x_cpu_flags
###
f_prnt titre2 "processeur"$pluriel
f_dspl cmd "$fg_cpu" "lscpu" # affichage proc
f_dspl var "$fg_uarch" "µarchitecture processeur"
f_prnt tit2 "processeur"$pluriel
f_dspl cmd "$fg_cpu" "lscpu" # affichage proc
f_dspl var "$fg_uarch" "µarchitecture processeur"
f_dspl_alrt "$alert_microcode" "info"
f_prnt 1 "$fg_ucode" '[[ -z "$alert_microcode" && "$fg_ucode" ]]'
f_prnt 1 "$fg_ucode" '[[ -z "$alert_microcode" && "$fg_ucode" ]]'
f_prnt
f_dspl var "$cpu_flags" "$qte_flags flags cpu" # flags cpu bruts
f_dspl sans "$text_flags" # flags cpu texte
f_dspl var "$cpu_flags" "$qte_flags flags cpu" # flags cpu bruts
f_dspl sans "$text_flags" # flags cpu texte
}
fi_disk(){ # 14/12/2017
@ -866,55 +866,55 @@ fi_disk(){ # 14/12/2017
fi
[ "$fg_nb_disk" -gt 1 ] && pluriel="s" || unset pluriel
###
f_prnt titre2 "disque"$pluriel
f_prnt tit2 "disque"$pluriel
# espace des partitions fixes montées
f_prnt 1 "$(gawk -F': ' '{print $1": **"$2"**"}' <<< $fg_disk_part_fix_tot)"
f_prnt 1 "$(gawk -F': ' '{print $1": **"$2"**"}' <<< $fg_disk_part_fix_tot)"
f_prnt
f_prnt l '```'
f_prnt code
# disques fixes et amovibles
[ "$(wc -w <<< $fg_disk_fixe)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-17s: %s' "disque$pluriel fixe$pluriel" "$fg_disk_fixe")"
[ "$(wc -w <<< $fg_disk_amov)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-17s: %s' "disque$pluriel amovible$pluriel" "$fg_disk_amov")"
[ "$(wc -w <<< $fg_disk_fixe)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-17s: %s' "disque$pluriel fixe$pluriel" "$fg_disk_fixe")"
[ "$(wc -w <<< $fg_disk_amov)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-17s: %s' "disque$pluriel amovible$pluriel" "$fg_disk_amov")"
f_prnt
# partitions fixes montées / swap / non montées
[ "$(wc -w <<< $fg_disk_part_fixe_m)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-24s: %s' "partition$pluriel fixe$pluriel montée$pluriel" "$fg_disk_part_fixe_m")"
[ "$(wc -w <<< $fg_disk_part_swap)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-24s: %s' "partition$pluriel swap$pluriel" "$fg_disk_part_swap")"
[ "$(wc -w <<< $fg_disk_part_fixe_nm)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-28s: %s' "partition$pluriel fixe$pluriel non montée$pluriel" "$fg_disk_part_fixe_nm")"
[ "$(wc -w <<< $fg_disk_part_fixe_m)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-24s: %s' "partition$pluriel fixe$pluriel montée$pluriel" "$fg_disk_part_fixe_m")"
[ "$(wc -w <<< $fg_disk_part_swap)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-24s: %s' "partition$pluriel swap$pluriel" "$fg_disk_part_swap")"
[ "$(wc -w <<< $fg_disk_part_fixe_nm)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-28s: %s' "partition$pluriel fixe$pluriel non montée$pluriel" "$fg_disk_part_fixe_nm")"
f_prnt
# partitions amovibles montées / non montées
[ "$(wc -w <<< $fg_disk_part_amov_m)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-32s: %s' "partition$pluriel amovible$pluriel montée$pluriel" "$fg_disk_part_amov_m")"
[ "$(wc -w <<< $fg_disk_part_amov_nm)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-32s: %s' "partition$pluriel amovible$pluriel non montée$pluriel" "$fg_disk_part_amov_nm")"
[ "$(wc -w <<< $fg_disk_part_amov_m)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-32s: %s' "partition$pluriel amovible$pluriel montée$pluriel" "$fg_disk_part_amov_m")"
[ "$(wc -w <<< $fg_disk_part_amov_nm)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "$(printf '%-32s: %s' "partition$pluriel amovible$pluriel non montée$pluriel" "$fg_disk_part_amov_nm")"
f_prnt
# détails des disques par type
f_prnt l "$fg_disk_table"
f_prnt l '```'
f_prnt l "$fg_disk_table"
f_prnt code
f_prnt
[ "$fg_nb_disk" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt 1 "**types de disque"$pluriel"** "
[ "$fg_nb_disk" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt 1 "**types de disque"$pluriel"** "
f_prnt
f_prnt l "| sata | usb | mmc | nvme |"
f_prnt l "| :---: | :---: | :---: | :---: |"
f_prnt l "| $fg_disk_ata | $fg_disk_usb | $fg_disk_mmc | $fg_disk_nvme |"
f_prnt l1 "| sata | usb | mmc | nvme |"
f_prnt l1 "| :---: | :---: | :---: | :---: |"
f_prnt l1 "| $fg_disk_ata | $fg_disk_usb | $fg_disk_mmc | $fg_disk_nvme |"
f_prnt
# éventuellement hddtemp
f_dspl cmd "$dd_temp" "$cmd_dd_temp" "température disque"$pluriel
f_dspl cmd "$dd_temp" "$cmd_dd_temp" "température disque"$pluriel
f_dspl_alrt "$alert_dd_temp" "info"
# df, espaces des partitions montées seules
f_dspl cmd "$disk_df" "$cmd_dfh" "utilisation disque"$pluriel
f_dspl cmd "$disk_df" "$cmd_dfh" "utilisation disque"$pluriel
# df -i, inoeuds
f_dspl cmd "$disk_df_i" "$cmd_dfi" "utilisation inoeuds"
f_dspl cmd "$disk_df_i" "$cmd_dfi" "utilisation inoeuds"
# lsblk répertoire disques & partitions
f_dspl cmd "$disk_lsblk" "lsblk -o NAME,FSTYPE,SIZE,LABEL,MOUNTPOINT,UUID" "disque"$pluriel" & partitions"
f_dspl cmd "$disk_lsblk" "lsblk -o NAME,FSTYPE,SIZE,LABEL,MOUNTPOINT,UUID" "disque"$pluriel" & partitions"
# fstab
f_dspl cmd "$fstab" "grep -Ev '^#|^$' /etc/fstab" "fstab"
f_dspl cmd "$fstab" "grep -Ev '^#|^$' /etc/fstab" "fstab"
# resume
f_dspl cmd "$resume" "grep -Evs '^#|^$' /etc/initramfs-tools/conf.d/resume" "resume"
f_dspl cmd "$resume" "grep -Evs '^#|^$' /etc/initramfs-tools/conf.d/resume" "resume"
f_dspl_alrt "$alert_file_resume" "info"
f_dspl_alrt "$alert_uuidResume" "alert"
}
@ -958,13 +958,13 @@ fi_dmesg(){ # 2/12/2017
# suppression fichier de transfert
rm "$file-"*
###
f_prnt titre2 "dmesg kernel (emergency, alerte, erreur, warning ou critique)"
f_dspl cmd "$dmesg_emerg" "dmesg -l emerg" "emergency, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_alert" "dmesg -l alert" "alerte, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_crit" "dmesg -l crit" "critique, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_err" "dmesg -l err" "erreur, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_warn" "dmesg -l warn" "warning, $nb_lignes premières lignes"
f_prnt l "**les $nb_lignes premières lignes commencent à la date la plus ancienne encore dans les logs kernel**"
f_prnt tit2 "dmesg kernel (emergency, alerte, erreur, warning ou critique)"
f_dspl cmd "$dmesg_emerg" "dmesg -l emerg" "emergency, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_alert" "dmesg -l alert" "alerte, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_crit" "dmesg -l crit" "critique, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_err" "dmesg -l err" "erreur, $nb_lignes premières lignes"
f_dspl cmd "$dmesg_warn" "dmesg -l warn" "warning, $nb_lignes premières lignes"
f_prnt l "**les $nb_lignes premières lignes commencent à la date la plus ancienne encore dans les logs kernel**"
f_prnt flush
f_dspl_alrt "$info_ucode" "info"
f_dspl_alrt "$alert_firmBug" "alert"
@ -979,8 +979,8 @@ fi_efi(){ # 6/12/2017
! /^Boot0/ { print $0 }
' <<< $( efibootmgr -v 2>/dev/null ) )
###
f_prnt titre2 "EFI boot"
f_dspl cmd "$efiboot" "efibootmgr -v" "config EFI boot"
f_prnt tit2 "EFI boot"
f_dspl cmd "$efiboot" "efibootmgr -v" "config EFI boot"
}
# [$1=silent|xorgOnly], assigne $fe_gpu (liste des gpu), $fe_nb_gpu, fe_Xorg
@ -1119,32 +1119,32 @@ fi_gpu(){ # 14/12/2017
# fonctions externes
(( x_screen )) || figet_screen
###
f_prnt titre2 "vidéo"
f_prnt l "$( sed -E 's/(.*)/**\1** /' <<< $fe_gpu )" # mise en gras
f_prnt tit2 "vidéo"
f_prnt 1 "$( sed -E 's/(.*)/**\1** /' <<< $fe_gpu )" # mise en gras
f_prnt
# nb écran & résolution(s) active(s)
f_prnt l "nombre d'écrans: **$fg_nb_screen**"
[ "$( f__wcv "-wv" "$fg_resolution" "pixels" )" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l "résolution"$pluriel" active"$pluriel": **$fg_resolution**"
f_prnt 1 "nombre d'écrans: **$fg_nb_screen**"
[ "$( f__wcv "-wv" "$fg_resolution" "pixels" )" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt 1 "résolution"$pluriel" active"$pluriel": **$fg_resolution**"
f_prnt
# lspci -nnv
f_dspl cmd "$cards" "$cmd_cards"
f_dspl cmd "$cards" "$cmd_cards"
f_dspl_alrt "$alert_hybrid" "alert"
# wayland
f_dspl_alrt "$alert_Wayland" "info"
# openGl
f_dspl cmd "$glx_dvc" "$cmd_glx_dvc" "devices OpenGl"
f_dspl cmd "$glx_dvc" "$cmd_glx_dvc" "devices OpenGl"
f_dspl_alrt "$alert_3D" "info"
f_dspl cmd "$openGl" "$cmd_openGl" "OpenGl"
f_dspl cmd "$openGl" "$cmd_openGl" "OpenGl"
# liste providers, preferred & current
f_dspl cmd "$current_preferred" "$cmd_current_preferred" "$cmt_current_preferred"
f_dspl cmd "$providers" "$cmd_providers"
f_dspl cmd "$current_preferred" "$cmd_current_preferred" "$cmt_current_preferred"
f_dspl cmd "$providers" "$cmd_providers"
# résolutions possibles, pas d'affichage si mode (ssh) ou xrandr pas accessible
f_dspl cmd "$resolutions" "$cmd_resolutions" "$cmt_resolutions"
f_dspl cmd "$resolutions" "$cmd_resolutions" "$cmt_resolutions"
# modules vidéo
f_dspl cmd "$modGpu" "$cmd_modGpu" "$cmt_modGpu"
f_dspl cmd "$modGpu" "$cmd_modGpu" "$cmt_modGpu"
# Xorg config
f_dspl cmd "$confs" "$cmd_confs" "$cmt_confs"
f_dspl cmd "$confs" "$cmd_confs" "$cmt_confs"
f_dspl_alrt "$info_config" "info"
}
@ -1179,9 +1179,9 @@ fi_gpu_openGl(){ # 28/11/2017
fi_hw(){ # 14/12/2017
(( x_hw == 1 )) || figet_hw
###
f_prnt titre2 "hardware monitor"
f_dspl sans "$fg_hw" "sans"
f_prnt 1 "pas d'informations détectées" '[ -z "$fg_hw" ]'
f_prnt tit2 "hardware monitor"
f_dspl sans "$fg_hw" "sans"
f_prnt 1 "pas d'informations détectées" '[ -z "$fg_hw" ]'
f_prnt flush
}
@ -1272,38 +1272,38 @@ fi_journal(){ # 10/12/2017
# suppression fichier de transfert
rm "$file-"*
###
f_prnt titre2 "journalctl kernel (emergency, alert, erreur, warning ou critique)"
f_prnt 1 "**journaux persistants**" '[ -z "$alert_jctl_persist" ]'
f_prnt 1 "Début des log: **$jctl_boot**"
f_prnt tit2 "journalctl kernel (emergency, alert, erreur, warning ou critique)"
f_prnt 1 "**journaux persistants**" '[ -z "$alert_jctl_persist" ]'
f_prnt 1 "Début des log: **$jctl_boot**"
f_prnt
f_dspl_alrt "$alert_jctl_persist" "info"
# journaux kernel
f_dspl cmd "$jctl_alert_k" "journalctl --no-hostname -b0 -k -p1" \
f_dspl cmd "$jctl_alert_k" "journalctl --no-hostname -b0 -k -p1" \
"**kernel emergency 0 & alerte 1**, $nb_lignes premières lignes"
f_dspl cmd "$jctl_crit_k" "journalctl --no-hostname -b 0 -k -p 2..2" \
f_dspl cmd "$jctl_crit_k" "journalctl --no-hostname -b 0 -k -p 2..2" \
"**kernel critique**, $nb_lignes premières lignes"
f_dspl cmd "$jctl_err_k" "journalctl --no-hostname -b0 -k -p 3..3" \
f_dspl cmd "$jctl_err_k" "journalctl --no-hostname -b0 -k -p 3..3" \
"**kernel erreur**, $nb_lignes premières lignes)"
f_dspl cmd "$jctl_warn_k" "journalctl --no-hostname -b0 -k -p 4..4" \
f_dspl cmd "$jctl_warn_k" "journalctl --no-hostname -b0 -k -p 4..4" \
"**kernel warning**, $nb_lignes premières lignes"
# journaux hors kernel
f_prnt titre2 "journalctl hors kernel (emergency, alert, erreur, warning ou critique)"
f_prnt 1 "Début des log: **$jctl_boot**"
f_prnt tit2 "journalctl hors kernel (emergency, alert, erreur, warning ou critique)"
f_prnt 1 "Début des log: **$jctl_boot**"
f_prnt
f_dspl cmd "$jctl_alert_nok" "journalctl --no-hostname -b0 -p 1 | grep -v kernel" \
f_dspl cmd "$jctl_alert_nok" "journalctl --no-hostname -b0 -p 1 | grep -v kernel" \
"**hors kernel, emergency 0 & alerte 1**, $nb_lignes premières lignes"
f_dspl cmd "$jctl_crit_nok" "journalctl --no-hostname -b0 -p 2..2 | grep -v kernel" \
f_dspl cmd "$jctl_crit_nok" "journalctl --no-hostname -b0 -p 2..2 | grep -v kernel" \
"**hors kernel, critique**, $nb_lignes premières lignes"
f_dspl cmd "$jctl_err_nok" "journalctl --no-hostname -b0 -p 3..3 | grep -v kernel" \
f_dspl cmd "$jctl_err_nok" "journalctl --no-hostname -b0 -p 3..3 | grep -v kernel" \
"**hors kernel, erreur**, $nb_lignes premières lignes"
f_dspl cmd "$jctl_warn_nok" "journalctl --no-hostname -b0 -p 4..4 | grep -v kernel" \
f_dspl cmd "$jctl_warn_nok" "journalctl --no-hostname -b0 -p 4..4 | grep -v kernel" \
"**hors kernel, warning**, $nb_lignes premières lignes"
#informations
f_prnt 1 "les $nb_lignes premières lignes commencent à la date du dernier boot"
f_prnt 1 "les $nb_lignes premières lignes commencent à la date du dernier boot"
f_prnt
f_dspl cmd "$jctl_size" "journalctl --disk-usage " "taille des journaux"
f_dspl cmd "$jctl_size" "journalctl --disk-usage " "taille des journaux"
# dernières lignes
f_dspl cmd "$jctl_last" "journalctl --no-hostname -b0 -p 4 -n25" \
f_dspl cmd "$jctl_last" "journalctl --no-hostname -b0 -p 4 -n25" \
"**toutes provenance, emergency-warning**, $nb_lignes lignes les plus **récentes**"
f_dspl_alrt "$alert_firmBug" "alert"
f_dspl_alrt "$info_ucode" "info"
@ -1343,19 +1343,19 @@ fi_locale(){ # 10/12/2017
[ $( f__which setxkbmap ) ] && xKeyboardMap="$(setxkbmap -query)"
fi
###
f_prnt titre2 "localisation"
f_prnt tit2 "localisation"
# locale
f_dspl cmd "$localeConf" "grep -Esv '#|^$' /etc/default/locale* /etc/locale.conf"
f_dspl cmd "$localeCtl" "localectl status"
f_dspl cmd "$locale" "locale"
f_dspl cmd "$localeConf" "grep -Esv '#|^$' /etc/default/locale* /etc/locale.conf"
f_dspl cmd "$localeCtl" "localectl status"
f_dspl cmd "$locale" "locale"
# timezone
f_dspl cmd "$timezone" "grep -EHsv '#|^$' /etc/timezone*"
f_dspl cmd "$timedatectl" "timedatectl status"
f_dspl_alrt "$alert_ntp" "info"
f_dspl_alrt "$alert_rtc" "alert"
f_dspl cmd "$timezone" "grep -EHsv '#|^$' /etc/timezone*"
f_dspl cmd "$timedatectl" "timedatectl status"
f_dspl_alrt "$alert_ntp" "info"
f_dspl_alrt "$alert_rtc" "alert"
# keyboard layout
f_dspl cmd "$keyboard" "grep -EHv '#|^$' /etc/default/keyboard*"
f_dspl cmd "$xKeyboardMap" "setxkbmap -query"
f_dspl cmd "$keyboard" "grep -EHv '#|^$' /etc/default/keyboard*"
f_dspl cmd "$xKeyboardMap" "setxkbmap -query"
}
# [$1=notitre]
@ -1401,8 +1401,8 @@ fi_log_xorg(){ # 3/12/2017
cmd_logXorg="grep -Es '\(WW\)|\(EE\)|\(\?\?\)' $cmd_logXorg"
cmt_logXorg="Xorg.log"
###
f_prnt titre2 "journaux Xorg" "[ \"$1\" != \"notitre\" ]"
f_dspl cmd "$logXorg" "$cmd_logXorg" "$cmt_logXorg"
f_prnt tit2 "journaux Xorg" "[ \"$1\" != \"notitre\" ]"
f_dspl cmd "$logXorg" "$cmd_logXorg" "$cmt_logXorg"
f_dspl_alrt "$info_logs" "info"
}
@ -1415,9 +1415,9 @@ fi_mem(){ # 5/12/2017
memoire+="$fg_mem"
swappiness=$( cat /proc/sys/vm/swappiness 2>/dev/null )
###
f_prnt titre2 "mémoire"
f_dspl cmd "$memoire" "free -h"
f_dspl cmd "$swappiness" "cat /proc/sys/vm/swappiness" "Seuil bas de RAM libre où le swap est utilisé"
f_prnt tit2 "mémoire"
f_dspl cmd "$memoire" "free -h"
f_dspl cmd "$swappiness" "cat /proc/sys/vm/swappiness" "Seuil bas de RAM libre où le swap est utilisé"
}
# [$1=silent], assigne fe_nb_reseau, fe_cards_reseau
@ -1462,14 +1462,14 @@ fi_net(){ # 14/12/2017 ( matériel )
alert_wlx+="https://kyodev.frama.io/kyopages/trucs/interfaces-nommage-classique/"
fi
###
f_prnt titre2 "réseau"
f_prnt l "$(sed -E 's/(.*)/**\1** /' <<< $fe_cards_reseau)" # mise en gras
f_prnt tit2 "réseau"
f_prnt 1 "$( sed -E 's/(.*)/**\1** /' <<< $fe_cards_reseau )" # mise en gras
f_prnt
# lspci -nnv
f_dspl cmd "$cards" "$cmd_cards"
f_dspl cmd "$cards" "$cmd_cards"
# modules réseau
f_dspl cmd "$modEth" "$cmd_modEth" "$cmt_modEth"
f_dspl cmd "$modWln" "$cmd_modWln" "$cmt_modWln"
f_dspl cmd "$modEth" "$cmd_modEth" "$cmt_modEth"
f_dspl cmd "$modWln" "$cmd_modWln" "$cmt_modWln"
f_dspl_alrt "$alert_wlx" "alert"
}
@ -1490,10 +1490,10 @@ fi_nm(){ # 5/12/2017
[ "$(f__wcv "-l" "$nm_wifis")" -eq 1 ] && unset nm_wifis
nm_connected=$( LC_ALL=C nmcli -f SSID,ACTIVE,IN-USE device wifi list | gawk '/yes[[:space:]]+\*/ {print $1}' )
###
f_prnt titre2 "NetworkManager"
f_dspl cmd "$nm_etat" "$cmd_nm_etat" "$cmt_nm_etat"
f_dspl cmd "$nm_conf" "$cmd_nm_conf" "$cmt_nm_conf"
f_dspl cmd "$nm_wifis" "$cmd_nm_wifis" "$cmt_nm_wifis"
f_prnt tit2 "NetworkManager"
f_dspl cmd "$nm_etat" "$cmd_nm_etat" "$cmt_nm_etat"
f_dspl cmd "$nm_conf" "$cmd_nm_conf" "$cmt_nm_conf"
f_dspl cmd "$nm_wifis" "$cmd_nm_wifis" "$cmt_nm_wifis"
}
fi_packagers(){ #v2 23/11/2017
@ -1789,38 +1789,38 @@ fi_pkg_apt(){ #v3 12/12/2017
cmd_kernel="dpkg -l | grep -i -E \"linux-(headers|image)-$(uname -r)\""
cmt_kernel="noyau"
###
f_prnt titre2 "gestion de paquets ${1#*:}"
f_prnt 1 "nombre de paquets installés: **$nb_packages**"
f_prnt 1 "dernière mise à jour apt: **$dateMaj**"
f_prnt 1 "version apt: **$apt_version**"
f_prnt tit2 "gestion de paquets ${1#*:}"
f_prnt 1 "nombre de paquets installés: **$nb_packages**"
f_prnt 1 "dernière mise à jour apt: **$dateMaj**"
f_prnt 1 "version apt: **$apt_version**"
f_prnt
f_dspl_alrt "$info_update" "info"
f_dspl cmd "$sources" "$cmd_sources" "$cmt_sources"
f_dspl cmd "$sources" "$cmd_sources" "$cmt_sources"
f_dspl_alrt "$alert_https" "info"
f_dspl_alrt "$alert_httpsPossible" "info"
f_dspl_alrt "$alert_non_list" "info"
f_dspl_alrt "$alert_httpredir" "info"
f_dspl cmd "$apt_prefs" "$cmd_apt_prefs" "$cmt_apt_prefs"
f_dspl cmd:vide "$upgrade" "$cmd_upgrade" "$cmt_upgrade"
f_dspl cmd "$apt_prefs" "$cmd_apt_prefs" "$cmt_apt_prefs"
f_dspl cmd:vide "$upgrade" "$cmd_upgrade" "$cmt_upgrade"
f_dspl_alrt "$alert_upgrade" "info"
f_dspl_alrt "$alert_apt" "alerte"
f_dspl var "$notUpgraded" "" "$cmt_notUpgraded"
f_dspl var "$notUpgraded" "" "$cmt_notUpgraded"
f_dspl_alrt "$alert_full_upgrade" "info"
f_dspl cmd:vide "$toRemove" "$cmd_toRemove" "$cmt_toRemove"
f_dspl cmd:vide "$toRemove" "$cmd_toRemove" "$cmt_toRemove"
f_dspl_alrt "$alert_remove" "info"
f_dspl cmd:vide "$autoclean" "$cmd_autoclean" "$cmt_autoclean"
f_dspl cmd:vide "$autoclean" "$cmd_autoclean" "$cmt_autoclean"
f_dspl_alrt "$alert_autoclean" "info"
f_dspl cmd "$clean" "$cmd_clean" "$cmt_clean"
f_dspl cmd "$clean" "$cmd_clean" "$cmt_clean"
f_dspl_alrt "$alert_clean" "info"
f_dspl cmd:vide "$non_ii" "$cmd_non_ii" "$cmt_non_ii"
f_dspl cmd:vide "$non_ii" "$cmd_non_ii" "$cmt_non_ii"
f_dspl_alrt "$alert_non_ii" "info"
if [ $( f__which deborphan ) ]; then
f_dspl cmd "$deborphan" "$cmd_deborphan" "$cmt_deborphan"
f_dspl cmd "$deborphan" "$cmd_deborphan" "$cmt_deborphan"
f_dspl_alrt "$alert_deborphan" "info"
fi
f_dspl cmd:vide "$holded" "$cmd_holded" "$cmt_holded"
f_dspl cmd "$metaPkg" "$cmd_metaPkg" "$cmt_metaPkg"
f_dspl cmd "$kernel" "$cmd_kernel" "$cmt_kernel"
f_dspl cmd:vide "$holded" "$cmd_holded" "$cmt_holded"
f_dspl cmd "$metaPkg" "$cmd_metaPkg" "$cmt_metaPkg"
f_dspl cmd "$kernel" "$cmd_kernel" "$cmt_kernel"
}
fi_pkg_x(){ #v2 1/12/2017
@ -1900,11 +1900,11 @@ fi_pkg_x(){ #v2 1/12/2017
[[ -z "$nb_packages" || "$nb_packages" -le 5 ]] && nb_packages="n/a"
[[ ${1#*:} == "Inconnue" ]] && unset nb_packages # totalement inconnu
###
f_prnt titre2 "gestion de paquets ${1#*:}"
f_dspl cmd:text "$nb_packages" "$cmd_nbPackages" "nombre de paquets installés"
f_dspl cmd "$sources" "$cmd_sources" "sources"
f_dspl cmd "$holded" "$cmd_holded" "paquets figés"
f_dspl var "$alert_pkg_todo" "aide souhaitée"
f_prnt tit2 "gestion de paquets ${1#*:}"
f_dspl cmd:text "$nb_packages" "$cmd_nbPackages" "nombre de paquets installés"
f_dspl cmd "$sources" "$cmd_sources" "sources"
f_dspl cmd "$holded" "$cmd_holded" "paquets figés"
f_dspl var "$alert_pkg_todo" "aide souhaitée"
}
fi_reseau(){ # 11/12/2017 ( configuration )
@ -1977,44 +1977,44 @@ fi_reseau(){ # 11/12/2017 ( configuration )
alert_slaac+="à vérifier si cet état est souhaité."
fi
###
f_prnt titre2 "configuration"
f_prnt tit2 "configuration"
f_prnt code
f_prnt l1 "ipv4"
f_prnt l2 "$ip4"
f_prnt l1 "ipv4"
f_prnt l2 "$ip4"
f_prnt
[ "$(f__wcv "-l" "$fg_gws")" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "passerelle"$pluriel": ${gw4//$'\n'/ ⊗ }"
f_prnt l2 "passerelle"$pluriel": ${gw4//$'\n'/ ⊗ }"
f_prnt
figet_ip "-6"
f_prnt l1 "ipv6"
f_prnt l2 "$ip6"
f_prnt l1 "ipv6"
f_prnt l2 "$ip6"
f_prnt
[ "$(f__wcv "-w" "$fg_ifn_prior")" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "interface"$pluriel" sortante"$pluriel": $fg_ifn_prior" '[ "$fg_ifn_prior" ]'
f_prnt l2 "interface"$pluriel" sortante"$pluriel": $fg_ifn_prior" '[ "$fg_ifn_prior" ]'
f_prnt
f_prnt l2 "passerelles: ${gw6//$'\n'/ ⊗ }"
f_prnt l2 "passerelles: ${gw6//$'\n'/ ⊗ }"
f_prnt code
f_prnt
f_prnt 1 "les adresses Mac peuvent être affichées avec \`$DIRNAME""getInfo --mac\`"
f_prnt 1 "l'IP publique peut être connue avec: \`$DIRNAME""getInfo --ip\`"
f_prnt 1 "les adresses Mac peuvent être affichées avec \`$DIRNAME""getInfo --mac\`"
f_prnt 1 "l'IP publique peut être connue avec: \`$DIRNAME""getInfo --ip\`"
f_prnt
# ip a & route & interface & resolv
f_dspl cmd "$ip_a" "ip address"
f_dspl cmd "$ip_a" "ip address"
f_dspl cmd "$route" "ip route show"
f_dspl cmd "$interfaces" "grep -EHrsv '#|^$' /etc/network/interfaces*" "configuration manuelle"
f_dspl cmd "$resolv" "cat /etc/resolv.conf" "serveurs de noms DNS utilisés"
f_dspl cmd "$interfaces" "grep -EHrsv '#|^$' /etc/network/interfaces*" "configuration manuelle"
f_dspl cmd "$resolv" "cat /etc/resolv.conf" "serveurs de noms DNS utilisés"
# iwconfig & iwlist
f_dspl cmd "$iwconfig" "/sbin/iwconfig 2>/dev/null" "état carte wifi"
f_dspl cmd "$canal_wifi" "/sbin/iwlist chan | grep 'Current Frequency' | grep -Eio 'channel [0-9]+'" \
"canal wifi utilisé"
f_prnt 1 "la configuration ssid utilisée peut être connue (si NetworkManager installé) avec \n \`$DIRNAME""getInfo --ssid\`"
f_dspl cmd "$iwconfig" "/sbin/iwconfig 2>/dev/null" "état carte wifi"
f_dspl cmd "$canal_wifi" "/sbin/iwlist chan | grep 'Current Frequency' | grep -Eio 'channel [0-9]+'" \
"canal wifi utilisé"
f_prnt 1 "la configuration ssid utilisée peut être connue (si NetworkManager installé) avec \n \`$DIRNAME""getInfo --ssid\`"
f_prnt
# network manager
f_prnt 1 "gestionnaire de réseau" '[ "$netmgrinst" ]'
f_prnt 1 "gestionnaire de réseau" '[ "$netmgrinst" ]'
[ "$(wc -w <<< $netmgrinst)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt 2 "installé"$pluriel": **$netmgrinst**" '[ "$netmgrinst" ]'
f_prnt 2 "en fonctionnement: **$netmgrrun**" '[ "$netmgrrun" ]'
f_prnt 2 "non trouvé parmi: ${!netmgr[*]}" '[ -z "$netmgrrun" ]'
f_prnt 2 "installé"$pluriel": **$netmgrinst**" '[ "$netmgrinst" ]'
f_prnt 2 "en fonctionnement: **$netmgrrun**" '[ "$netmgrrun" ]'
f_prnt 2 "non trouvé parmi: ${!netmgr[*]}" '[ -z "$netmgrrun" ]'
f_prnt flush
f_dspl_alrt "$alert_ifconfig" "info"
f_dspl_alrt "$alert_slaac" "info"
@ -2030,18 +2030,18 @@ fi_serial(){ #v9 1/12/2017
machineId=$( cat /etc/machine-id 2>/dev/null )
[ "$machineId" ] || machineId="n/a"
###
f_prnt titre1 "$BOLD""ID MAchine $BLUE$machineId$STD"
f_prnt tit1 "$BOLD""ID MAchine $BLUE$machineId$STD"
f_prnt
f_prnt 1 "$BOLD""N° Série:$STD"
f_prnt 1 "$BOLD""N° Série:$STD"
f_prnt
f_prnt 2 "$GREEN""Disques:"
f_prnt l3 "$BLUE$fg_disk_serial$STD" '[ "$fg_disk_serial" ]'
f_prnt 2 "$GREEN""Disques:"
f_prnt l3 "$BLUE$fg_disk_serial$STD" '[ "$fg_disk_serial" ]'
f_prnt
f_prnt 2 "$GREEN""Batteries:"
f_prnt l3 "$BLUE$fg_batt_serial$STD"
f_prnt 2 "$GREEN""Batteries:"
f_prnt l3 "$BLUE$fg_batt_serial$STD"
f_prnt
f_prnt 2 "$GREEN""Chassis:"
f_prnt l3 "$BLUE$chassis_serial$STD"
f_prnt 2 "$GREEN""Chassis:"
f_prnt l3 "$BLUE$chassis_serial$STD"
echo -e "$text\n"
}
@ -2057,8 +2057,8 @@ fi_ssid(){ #v2 11/12/2017
nm_ssid=$( f_grep_file "/etc/NetworkManager/system-connections/*" "lignevide" )
###
f__info "$RED""Attention:$BLUE la clé du réseau wifi est visible"
f_prnt titre1 "configuration(s) ssid networkmanager"
f_dspl cmd "$nm_ssid" "grep -Ersv '#|^$' /etc/NetworkManager/system-connections/*"
f_prnt tit1 "configuration(s) ssid networkmanager"
f_dspl cmd "$nm_ssid" "grep -Ersv '#|^$' /etc/NetworkManager/system-connections/*"
f_prnt flush
f_prnt_md "$fileOutput" "marge"
rm "$fileOutput"
@ -2160,63 +2160,63 @@ fi_system(){ # 14/12/2017
# batterie(s)
enum_batt=$(grep -E '[A-Z][A-Z]' <<< $fg_batt)
###
[ "$ORIGIN" ] && f_prnt titre2 "système"
[ "$ORIGIN" ] && f_prnt tit2 "système"
f_prnt
f_prnt l "$( sed -E 's/(.*)/**\1** /' <<<$fg_dmi )" # en gras
f_prnt 1 "$( sed -E 's/(.*)/**\1** /' <<<$fg_dmi )" # en gras
f_prnt
f_prnt 1 "CPU"
f_prnt 2 "**$( sed -n '1p' <<< $fg_cpu )**"
f_prnt 1 "Vidéo"
f_prnt 2 "$( sed -E 's/(.*)/**\1**/' <<<$fe_gpu )" '[ "$fe_gpu" ]'
f_prnt 2 "pas de carte graphique détectée" '[ "$fe_nb_gpu" -eq 0 ]'
f_prnt 1 "Réseau"
f_prnt 2 "$( sed -E 's/(.*)/**\1**/' <<<$fe_cards_reseau )" '[ "$fe_cards_reseau" ]'
f_prnt 2 "pas de carte réseau détectée" '[ "$fe_nb_reseau" -eq 0 ]'
f_prnt 1 "Audio"
f_prnt 2 "$( sed -E 's/(.*)/**\1**/' <<<$fe_cards_audio )" '[ "$fe_cards_audio" ]'
f_prnt 2 "pas de carte réseau détectée" '[ "$fe_nb_audio" -eq 0 ]'
f_prnt 1 "CPU"
f_prnt 2 "**$( sed -n '1p' <<< $fg_cpu )**"
f_prnt 1 "Vidéo"
f_prnt 2 "$( sed -E 's/(.*)/**\1**/' <<<$fe_gpu )" '[ "$fe_gpu" ]'
f_prnt 2 "pas de carte graphique détectée" '[ "$fe_nb_gpu" -eq 0 ]'
f_prnt 1 "Réseau"
f_prnt 2 "$( sed -E 's/(.*)/**\1**/' <<<$fe_cards_reseau )" '[ "$fe_cards_reseau" ]'
f_prnt 2 "pas de carte réseau détectée" '[ "$fe_nb_reseau" -eq 0 ]'
f_prnt 1 "Audio"
f_prnt 2 "$( sed -E 's/(.*)/**\1**/' <<<$fe_cards_audio )" '[ "$fe_cards_audio" ]'
f_prnt 2 "pas de carte réseau détectée" '[ "$fe_nb_audio" -eq 0 ]'
f_prnt
f_prnt l '```'
f_prnt l1 "$fg_distrib"
f_prnt l2 "$uname"
f_prnt l2 "boot: $mbr"
f_prnt l2 "architecture système: $fu_archi"
f_prnt l2 "date d'installation: $date_install"
f_prnt l2 "démon d'initialisation: $initDaemon"
f_prnt l2 "shell actif: $fg_shell"
f_prnt code
f_prnt l1 "$fg_distrib"
f_prnt l2 "$uname"
f_prnt l2 "boot: $mbr"
f_prnt l2 "architecture système: $fu_archi"
f_prnt l2 "date d'installation: $date_install"
f_prnt l2 "démon d'initialisation: $initDaemon"
f_prnt l2 "shell actif: $fg_shell"
[ "$( f__wcv -w "$fg_shells" )" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "shell"$pluriel" installé"$pluriel": $fg_shells"
f_prnt l2 "$bootImage"
f_prnt l2 "shell"$pluriel" installé"$pluriel": $fg_shells"
f_prnt l2 "$bootImage"
f_prnt
f_prnt l1 "Environnement"
f_prnt l2 "serveur d'affichage: $serverX"
f_prnt l2 "nombre d'écrans: $fg_nb_screen"
f_prnt l1 "Environnement"
f_prnt l2 "serveur d'affichage: $serverX"
f_prnt l2 "nombre d'écrans: $fg_nb_screen"
[ "$(f__wcv "-wv" "$fg_resolution" "pixels")" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "résolution"$pluriel": $fg_resolution"
f_prnt l2 "résolution"$pluriel": $fg_resolution"
[ "$(wc -w <<< $fg_dm)" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "display manager"$pluriel": $fg_dm"
f_prnt l2 "display manager actif: $fg_dm_actif" '[ "$fg_dm_actif" != "$fg_dm" ]'
f_prnt l2 "desktop (DE): $fg_de"
f_prnt l2 "panel: $fg_de_panel" '[ "$fg_de_panel" ]'
f_prnt l2 "window manager: $fg_wm"
f_prnt l2 "display manager"$pluriel": $fg_dm"
f_prnt l2 "display manager actif: $fg_dm_actif" '[ "$fg_dm_actif" != "$fg_dm" ]'
f_prnt l2 "desktop (DE): $fg_de"
f_prnt l2 "panel: $fg_de_panel" '[ "$fg_de_panel" ]'
f_prnt l2 "window manager: $fg_wm"
f_prnt
f_prnt l1 "Matériel"
f_prnt l1 "Matériel"
[ "$fg_nb_cpu" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "$fg_nb_cpu processeur"$pluriel" $fg_cpu_arch"
f_prnt l2 "$fg_nb_cpu processeur"$pluriel" $fg_cpu_arch"
[ "$fe_nb_bluez" -gt 1 ] && pluriel="s" || unset pluriel
f_prnt l2 "$fe_nb_bluez carte"$pluriel" bluetooth ($fe_cards_bluez)" '[ "$fe_nb_bluez" -gt 0 ]'
f_prnt l2 "$alimentation" '[ "$alimentation" ]'
f_prnt l2 "$fe_nb_bluez carte"$pluriel" bluetooth ($fe_cards_bluez)" '[ "$fe_nb_bluez" -gt 0 ]'
f_prnt l2 "$alimentation" '[ "$alimentation" ]'
[ "$fg_nb_batt" -gt "1" ] && pluriel="s" || unset pluriel
f_prnt l2 "$fg_nb_batt batterie"$pluriel" présente"$pluriel":" '[ "$fg_batt" ]'
f_prnt l3 "$enum_batt" '[ "$fg_batt" ]'
f_prnt l2 "$fg_nb_batt batterie"$pluriel" présente"$pluriel":" '[ "$fg_batt" ]'
f_prnt l3 "$enum_batt" '[ "$fg_batt" ]'
[ "$fe_nb_touchpad" -gt "1" ] && pluriel="s" || unset pluriel
f_prnt l2 "$fe_nb_touchpad pavé"$pluriel" tactile"$pluriel": $fe_touchpad" '[ "fe_touchpad" ]'
f_prnt l '```'
f_prnt l2 "$fe_nb_touchpad pavé"$pluriel" tactile"$pluriel": $fe_touchpad" '[ "fe_touchpad" ]'
f_prnt code
f_prnt
f_prnt 1 "$( sed -E 's/^(.*: )(.*)/\1**\2**/' <<<$fg_disk_part_fix_tot )" '[ "$fg_disk_part_fix_tot" ]'
f_prnt 1 "dernier boot: **$lastboot**, il y a **$uptime**"
f_prnt 1 "$( sed -E 's/^(.*: )(.*)/\1**\2**/' <<<$fg_disk_part_fix_tot )" '[ "$fg_disk_part_fix_tot" ]'
f_prnt 1 "dernier boot: **$lastboot**, il y a **$uptime**"
[ "$fg_nb_threads" -gt "1" ] && pluriel="s" || unset pluriel
f_prnt 1 "$loadAverage"
f_prnt 1 "$loadAverage"
f_prnt flush
}
@ -2282,20 +2282,20 @@ fi_system_analyse(){ #v 2/12/2017
cmd_bootGraph="systemd-analyze plot > $file ; xdg-open graph.svg"
cmt_bootGraph="graph durées et ordre de chargement des services"
###
f_prnt titre2 "analyse boot systemd"
f_prnt 1 "pas de service en erreur" '[ -z "$srvcFail" ]'
f_dspl cmd "$bootTime" "$cmd_bootTime" "$cmt_bootTime"
f_dspl cmd "$srvcFail" "$cmd_srvcFail" "$cmt_srvcFail"
f_prnt tit2 "analyse boot systemd"
f_prnt 1 "pas de service en erreur" '[ -z "$srvcFail" ]'
f_dspl cmd "$bootTime" "$cmd_bootTime" "$cmt_bootTime"
f_dspl cmd "$srvcFail" "$cmd_srvcFail" "$cmt_srvcFail"
f_dspl_alrt "$info_services" "info"
f_dspl_alrt "$alert_srvcFail" "alert"
f_dspl cmd "$bootBlame" "$cmd_bootBlame" "$cmt_bootBlame"
f_dspl cmd "$bootCritic" "$cmd_bootCritic" "$cmt_bootCritic"
f_dspl cmd:text "$bootGraph" "$cmd_bootGraph" "$cmt_bootGraph"
f_dspl cmd "$bootBlame" "$cmd_bootBlame" "$cmt_bootBlame"
f_dspl cmd "$bootCritic" "$cmd_bootCritic" "$cmt_bootCritic"
f_dspl cmd:text "$bootGraph" "$cmd_bootGraph" "$cmt_bootGraph"
}
# [$1=silent], assigne $fe_touchpad, fe_nb_touchpad
fi_touchpad(){ # 14/12/2017
local device cmd_device type type_pt pilote cmd_pilote cmt_pilote info_driver
local device cmd_device toScrut xfile file_logs type type_pt pilote cmd_pilote cmt_pilote info_driver
x_touchpad=1
device=$( grep -Ei -B1 -A8 'synap|alps|etps|elan' /proc/bus/input/devices ) || return 0
@ -2303,14 +2303,26 @@ fi_touchpad(){ # 14/12/2017
fe_touchpad=${fe_touchpad#*Name=\"} # suppression début
fe_touchpad=${fe_touchpad%\"} # suppression fin
cmd_device="grep -Ei -B1 -A8 'synap|alps|etps|elan' /proc/bus/input/devices"
type=$( grep -i 'touchpad: buttons:' /var/log/Xorg.0.log )
grep -iq 'double' <<< $type && type_pt="2"
grep -iq 'triple' <<< $type && type_pt+="3"
if [ "$type_pt" ]; then
type_pt=" multitouch $type_pt points"
# recherche Xorg.log
toScrut=(
/var/log/Xorg.0.log
/home/$fu_user/.local/share/xorg/Xorg.0.log
/var/lib/gdm3/.local/share/xorg/Xorg.0.log
)
for xfile in ${toScrut[@]}; do
[ -e "$xfile" ] && file_logs+="$xfile "
done
[ "$file_logs" ] || file_logs="nologs"
if [ "$file_logs" != "nologs" ]; then
type=$( grep -is 'touchpad: buttons:' $file_logs )
# essai déterminer si multitouch
grep -iq 'left' <<< $type && type_pt="non multitouch"
grep -iq 'double' <<< $type && type_pt="2"
grep -iq 'triple' <<< $type && type_pt+="3"
grep -iq '[0-9]' <<< $type && type_pt=" multitouch $type_pt points"
type_pt=${type_pt/23/ 2\/3}
fe_touchpad+="$type_pt"
fi
type_pt=${type_pt/23/2\/3}
fe_touchpad+="$type_pt"
fe_nb_touchpad=$( grep -ci 'touchpad' <<< "$fe_touchpad" )
[[ "$1" == "silent" ]] && return 0
@ -2326,9 +2338,11 @@ fi_touchpad(){ # 14/12/2017
info_driver+="pour voir les configurations personnalisées"
fi
###
f_prnt titre2 "Touchpad"
f_dspl cmd "$device" "$cmd_device"
f_dspl cmd "$pilote" "$cmd_pilote" "$cmt_pilote"
f_prnt 1 "$( sed -E 's/(.*)/**\1** /' <<< $fe_touchpad )" # mise en gras
f_prnt
f_prnt tit2 "Touchpad"
f_dspl cmd "$device" "$cmd_device"
f_dspl cmd "$pilote" "$cmd_pilote" "$cmt_pilote"
f_dspl_alrt "$info_driver" "info"
}
@ -2390,8 +2404,8 @@ fi_usb(){ # 14/12/2017
ls_p=${ls_p%[[:cntrl:]]}
IFS="$IFS_INI"
###
f_prnt titre2 "USB"
f_dspl cmd "$ls_p" "lsusb" "commande modifiée, ajout Class & Driver"
f_prnt tit2 "USB"
f_dspl cmd "$ls_p" "lsusb" "commande modifiée, ajout Class & Driver"
}
fi_vrms(){ # 1/12/2017
@ -2415,8 +2429,8 @@ fi_vrms(){ # 1/12/2017
vrms=$( sed -E "s/.*rms would be proud.*/$tempo/" <<< "$vrms" )
fi
###
f_prnt titre2 "paquets non-libres"
f_dspl cmd "$vrms" "vrms" "détection des paquets non libres par RMS"
f_prnt tit2 "paquets non-libres"
f_dspl cmd "$vrms" "vrms" "détection des paquets non libres par RMS"
f_prnt flush
}
@ -4245,7 +4259,7 @@ for j in $options; do
ORIGIN='test'
prg_1 "$*"
echo -n "•"
fi_net
fi_touchpad
echo; f_prnt_md "$fileOutput"
exit ;; # test
-c* | all )

View File

@ -2,11 +2,12 @@
f__architecture
## getInfo 2.66.1 14/12/2017
## getInfo 2.66.2 14/12/2017
* nouveau: fi_usb, assemblage lsusb & lsusb -t
* nouveau: f_epure_marque, donc révision figet_dmi, figet_lspci
* fix: détection usb (fi_usb) et wlx (fi_net)
* fix: fi_touchpad, détection xorg.log inexistant sur wayland et buttons touchpad pas toujours présent dans les logs
## getInfo 2.65.0 14/12/2017
@ -14,7 +15,6 @@ f__architecture
* révision: figet_ip_pub
* révision: général, marqueur et appel fonction
## getInfo 2.64.0 13/12/2017
* révision: fi_bluez, détection device