mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.23.0
This commit is contained in:
parent
1ce2c977a3
commit
335005c3de
378
scripts/getInfo
378
scripts/getInfo
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.22.3
|
||||
date="03/11/2017"
|
||||
version=2.23
|
||||
date="04/11/2017"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
script="getInfo"
|
||||
|
@ -258,12 +258,14 @@ f__user(){ # 09/10/2017
|
|||
}
|
||||
|
||||
# $1='-l' comptage ligne dans variable $2, affiche quantité
|
||||
# $1='-w' comptage mots dans variable $2, affiche quantité
|
||||
# f__wcv -l $var ; f__wcv -w $var "mot"
|
||||
f__wcv(){ # 30/10/2017
|
||||
[[ "$1" =~ -l|-w ]] || display="erreur f__wcv \$1 ($1) incorrect \n"
|
||||
# $1='-w' comptage mots dans variable $2, affiche quantité /!\ pas d'espace final (comptage espaces)
|
||||
# $1='-wv' comptage mots $3 dans variable $2, affiche quantité
|
||||
# f__wcv -l $var ; f__wcv -w $var ; f__wcv -wv $var "mot"
|
||||
f__wcv(){ # 04/11/2017
|
||||
[[ "$1" =~ -l|-wv|-w ]] || display="erreur f__wcv \$1 ($1) incorrect \n"
|
||||
[ "$1" == "-l" ] && echo "$2" | grep -cEv '^[[:space:]]*$' # (wc -l compterait 1 pour une variable vide)
|
||||
[ "$1" == "-w" ] && echo "$2" | grep -o "$3" | grep -c .
|
||||
[ "$1" == "-w" ] && echo "$2 " | grep -o " " | grep -c . # echo $(( $(grep -c .)+1 ))
|
||||
[ "$1" == "-wv" ] && echo "$2" | grep -o "$3" | grep -c .
|
||||
}
|
||||
|
||||
# test wget, $1 url à tester, sortie du script si $1 seul (même si url testée ok)
|
||||
|
@ -330,7 +332,7 @@ f_display(){ # 30/10/2017
|
|||
}
|
||||
|
||||
# $1 fichier testé
|
||||
f_display_file(){ # 26/10/2017
|
||||
f_display_file_absent(){ # 03/11/2017
|
||||
echo -e "* fichier **$1** non trouvé ou absent \n" >> "$fileOutput"
|
||||
}
|
||||
|
||||
|
@ -394,21 +396,316 @@ fi_batt(){ # 25/10/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_cpu(){ # 01/11/2017
|
||||
fi_cpu(){ # 04/11/2017
|
||||
#manuellement: lscpu (util-linux)
|
||||
local cpu_flags text pluriel
|
||||
cpu_flags="$(sed -n 's/^flags.*: \(.*\)$/\1/p;' /proc/cpuinfo | sed -n '1p')"
|
||||
local cpu_flags text iflag var_temp text_flags="" pluriel
|
||||
cpu_flags=$(sed -n 's/^flags.*: \(.*\)$/\1/p;' /proc/cpuinfo | sed -n '1p'| \
|
||||
tr ' ' '\n' | sort | tr '\n' ' ' | xargs )
|
||||
fi_cpu_flags # appel 'base' des tags CPU_FLAGS
|
||||
for iflag in $cpu_flags; do
|
||||
var_temp=$(grep -E "^${iflag^^}[[:blank:]]" <<< $CPU_FLAGS)
|
||||
[ "$var_temp" ] && text_flags+="* $var_temp \n" || text_flags+="* $iflag\t⟷ \t? \n"
|
||||
done
|
||||
[ "$fg_cpu" ] || figet_cpu
|
||||
###
|
||||
###
|
||||
[ ${fg_cpu:0:1} -gt 1 ] && pluriel="s" || unset pluriel
|
||||
text="## processeur$pluriel \n\n"
|
||||
f_display "fg_cpu" "sans"
|
||||
[ "$fg_uarch" ] && f_display "fg_uarch" "var" "codename processeur"
|
||||
f_display "cpu_flags" "var" "flags cpu:"
|
||||
text+="* manuellement voir: \`lscpu\` \n\n"
|
||||
f_display "fg_cpu" "sans" # affichage proc
|
||||
[ "$fg_uarch" ] && f_display "fg_uarch" "var" "µarchitecture processeur"
|
||||
[ "$cpu_flags" ] && cpu_flags="$(f__wcv -w "$cpu_flags" flags) flags: $cpu_flags"
|
||||
[ "$cpu_flags" ] && f_display "cpu_flags" "var" "flags cpu:" # flags cpu bruts
|
||||
[ "$text_flags" ] && f_display "text_flags" "sans" # flags cpu texte
|
||||
printf "$text\n" >> "$fileOutput"
|
||||
unset text
|
||||
}
|
||||
|
||||
# stockage des flags cpu extraits du kernel
|
||||
fi_cpu_flags(){ # 04/11/2017
|
||||
|
||||
CPU_FLAGS="
|
||||
# attention: remplacer index par les encadrés "", ex:
|
||||
# DSCPL ⟷ "ds_cpl" CPL Qual. Debug Store par DS_CPL ⟷ _CPL Qual. Debug Store
|
||||
# https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/cpufeatures.h
|
||||
# 11/2017
|
||||
|
||||
## Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0
|
||||
FPU ⟷ Onboard FPU
|
||||
VME ⟷ Virtual Mode Extensions
|
||||
DE ⟷ Debugging Extensions
|
||||
PSE ⟷ Page Size Extensions
|
||||
TSC ⟷ Time Stamp Counter
|
||||
MSR ⟷ Model-Specific Registers
|
||||
PAE ⟷ Physical Address Extensions
|
||||
MCE ⟷ Machine Check Exception
|
||||
CX8 ⟷ CMPXCHG8 instruction
|
||||
APIC ⟷ Onboard APIC
|
||||
SEP ⟷ SYSENTER/SYSEXIT
|
||||
MTRR ⟷ Memory Type Range Registers
|
||||
PGE ⟷ Page Global Enable
|
||||
MCA ⟷ Machine Check Architecture
|
||||
CMOV ⟷ CMOV instructions (plus FCMOVcc, FCOMI with FPU)
|
||||
PAT ⟷ Page Attribute Table
|
||||
PSE36 ⟷ 36-bit PSEs
|
||||
PN ⟷ Processor serial number
|
||||
CLFLUSH ⟷ CLFLUSH instruction
|
||||
DTS ⟷ Debug Store
|
||||
ACPI ⟷ ACPI via MSR
|
||||
MMX ⟷ Multimedia Extensions
|
||||
FXSR ⟷ FXSAVE/FXRSTOR, CR4.OSFXSR
|
||||
SSE ⟷ sse
|
||||
SSE2 ⟷ sse2
|
||||
SS ⟷ CPU self snoop
|
||||
HT ⟷ Hyper-Threading
|
||||
TM ⟷ Automatic clock control
|
||||
IA64 ⟷ IA-64 processor
|
||||
PBE ⟷ Pending Break Enable
|
||||
|
||||
## AMD-defined CPU features, CPUID level 0x80000001, word 1 Don't duplicate feature flags which are redundant with Intel!
|
||||
SYSCALL ⟷ SYSCALL/SYSRET
|
||||
MP ⟷ MP Capable.
|
||||
NX ⟷ Execute Disable
|
||||
MMXEXTAMD ⟷ MMX extensions
|
||||
FXSR_OPT ⟷ FXSAVE/FXRSTOR optimizations
|
||||
PDPE1GB ⟷ GB pages
|
||||
RDTSCP ⟷ RDTSCP
|
||||
LM ⟷ Long Mode (x86-64)
|
||||
3DNOWEXT ⟷ AMD 3DNow! extensions
|
||||
3DNOW ⟷ 3DNow!
|
||||
|
||||
## Transmeta-defined CPU features, CPUID level 0x80860001, word 2
|
||||
RECOVERY ⟷ CPU in recovery mode
|
||||
LONGRUN ⟷ Longrun power control
|
||||
LRTI ⟷ LongRun table interface
|
||||
|
||||
## Other features, Linux-defined mapping, word 3 This range is used for feature bits which conflict or are synthesized
|
||||
CXMMX ⟷ Cyrix MMX extensions
|
||||
K6_MTRR ⟷ AMD K6 nonstandard MTRRs
|
||||
CYRIX_ARR ⟷ Cyrix ARRs (= MTRRs)
|
||||
CENTAUR_MCR ⟷ Centaur MCRs (= MTRRs)
|
||||
|
||||
## cpu types for specific tunings:
|
||||
K8 ⟷ Opteron, Athlon64
|
||||
K7 ⟷ Athlon
|
||||
P3 ⟷ P3
|
||||
P4 ⟷ P4
|
||||
CONSTANT_TSC ⟷ TSC ticks at a constant rate
|
||||
UP ⟷ smp kernel running on up
|
||||
ART ⟷ Platform has always running timer (ART)
|
||||
ARCH_PERFMON ⟷ Intel Architectural PerfMon
|
||||
PEBS ⟷ Precise-Event Based Sampling
|
||||
BTS Branch ⟷ Trace Store
|
||||
SYSCALL32 ⟷ syscall in ia32 userspace
|
||||
SYSENTER32 ⟷ sysenter in ia32 userspace
|
||||
REP_GOOD ⟷ rep microcode works well
|
||||
MFENCE_RDTSC ⟷ Mfence synchronizes RDTSC
|
||||
LFENCE_RDTSC ⟷ Lfence synchronizes RDTSC
|
||||
ACC_POWERAMD ⟷ Accumulated Power Mechanism
|
||||
NOPL ⟷ instructions
|
||||
ALWAYS ⟷ Always-present feature
|
||||
XTOPOLOGY ⟷ cpu topology enum extensions
|
||||
TSC_RELIABLE ⟷ TSC is known to be reliable
|
||||
NONSTOP_TSC ⟷ TSC does not stop in C states
|
||||
CPUID ⟷ CPU has CPUID instruction itself
|
||||
EXTD ⟷ APICID has extended APICID (8 bits)
|
||||
AMD_DCM ⟷ multi-node processor
|
||||
APERFMPERF ⟷ APERFMPERF
|
||||
NONSTOP_TSC_S3 ⟷ TSC doesn't stop in S3 state
|
||||
TSC_KNOWN_FREQ ⟷ TSC has known frequency
|
||||
|
||||
## Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4
|
||||
PNI ⟷ SSE-3
|
||||
PCLMULQDQ ⟷ PCLMULQDQ instruction
|
||||
DTES64 ⟷ 64-bit Debug Store
|
||||
MONITOR ⟷ Monitor/Mwait support
|
||||
DS_CPL ⟷ CPL Qual. Debug Store
|
||||
VMX ⟷ Hardware virtualization
|
||||
SMX ⟷ Safer mode
|
||||
EST ⟷ Enhanced SpeedStep
|
||||
TM2 ⟷ Thermal Monitor 2
|
||||
SSSE3 ⟷ Supplemental SSE-3
|
||||
CID ⟷ Context ID
|
||||
SDBG ⟷ Silicon Debug
|
||||
FMA ⟷ Fused multiply-add
|
||||
CX16 ⟷ CMPXCHG16B
|
||||
XTPR ⟷ Send Task Priority Messages
|
||||
PDCM ⟷ Performance Capabilities
|
||||
PCID ⟷ Process Context Identifiers
|
||||
DCA ⟷ Direct Cache Access
|
||||
SSE4_1 ⟷ SSE-4.1
|
||||
SSE4_2 ⟷ SSE-4.2
|
||||
X2APIC ⟷ x2APIC
|
||||
MOVBE ⟷ MOVBE instruction
|
||||
POPCNT ⟷ POPCNT instruction
|
||||
TSC_DEADLINE_TIMER ⟷ Tsc deadline timer
|
||||
AES ⟷ AES instructions
|
||||
XSAVE ⟷ XSAVE/XRSTOR/XSETBV/XGETBV
|
||||
OSXSAVE ⟷ XSAVE enabled in the OS
|
||||
AVX ⟷ Advanced Vector Extensions
|
||||
F16C ⟷ 16-bit fp conversions
|
||||
RDRAND ⟷ The RDRAND instruction
|
||||
HYPERVISOR ⟷ Running on a hypervisor
|
||||
|
||||
## VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5
|
||||
RNG ⟷ RNG present (xstore)
|
||||
RNG_EN ⟷ RNG enabled
|
||||
ACE ⟷ on-CPU crypto (xcrypt)
|
||||
ACE_EN ⟷ on-CPU crypto enabled
|
||||
ACE2 ⟷ Advanced Cryptography Engine v2
|
||||
ACE2_EN ⟷ ACE v2 enabled
|
||||
PHE ⟷ PadLock Hash Engine
|
||||
PHE ⟷ ENPHE enabled
|
||||
PMM ⟷ PadLock Montgomery Multiplier
|
||||
PMM_EN ⟷ PMM enabled
|
||||
|
||||
## More extended AMD flags: CPUID level 0x80000001, ecx, word 6
|
||||
LAHF_LM ⟷ LAHF/SAHF in long mode
|
||||
CMP_LEGACY ⟷ If yes HyperThreading not valid
|
||||
SVM ⟷ Secure virtual machine
|
||||
EXTAPIC ⟷ Extended APIC space
|
||||
CR8_LEGACY ⟷ CR8 in 32-bit mode
|
||||
ABM ⟷ Advanced bit manipulation
|
||||
SSE4A ⟷ SSE-4A
|
||||
MISALIGNSSE ⟷ Misaligned SSE mode
|
||||
3DNOWPREFETCH ⟷ 3DNow prefetch instructions
|
||||
OSVWOS ⟷ Visible Workaround
|
||||
IBS ⟷ Instruction Based Sampling
|
||||
XOP ⟷ extended AVX instructions
|
||||
SKINIT ⟷ SKINIT/STGI instructions
|
||||
WDT ⟷ Watchdog timer
|
||||
LWP ⟷ Light Weight Profiling
|
||||
FMA44 ⟷ operands MAC instructions
|
||||
TCE ⟷ translation cache extension
|
||||
NODEID ⟷ MSRNodeId MSR
|
||||
TBM ⟷ trailing bit manipulations
|
||||
TOPOEXT ⟷ topology extensions CPUID leafs
|
||||
PERFCTR_CORE ⟷ core performance counter extensions
|
||||
PERFCTR_NB ⟷ NB performance counter extensions
|
||||
BPEXT ⟷ data breakpoint extension
|
||||
PTSC ⟷ performance time-stamp counter
|
||||
PERFCTR_LLC ⟷ Last Level Cache performance counter extensions
|
||||
MWAITX ⟷ MWAIT extension (MONITORX/MWAITX)
|
||||
|
||||
## Auxiliary flags: Linux defined - For features scattered in various CPUID levels like 0x6, 0xA etc, word 7.
|
||||
RING3MWAIT ⟷ Ring 3 MONITOR/MWAIT
|
||||
CPUID_FAULT ⟷ Intel CPUID faulting
|
||||
CPB ⟷ AMD Core Performance Boost
|
||||
EPB ⟷ IA32_ENERGY_PERF_BIAS support
|
||||
CAT_L3 ⟷ Cache Allocation Technology L3
|
||||
CAT_L2 ⟷ Cache Allocation Technology L2
|
||||
CDP_L3 ⟷ Code and Data Prioritization L3
|
||||
|
||||
HW_PSTATE ⟷ AMD HW-PState
|
||||
PROC_FEEDBACK ⟷ AMD ProcFeedbackInterface
|
||||
SME ⟷ AMD Secure Memory Encryption
|
||||
|
||||
INTEL_PPIN ⟷ Intel Processor Inventory Number
|
||||
INTEL_PT ⟷ Intel Processor Trace
|
||||
AVX512_4VNNIW ⟷ AVX-512 Neural Network Instructions
|
||||
AVX512_4FMAPS ⟷ AVX-512 Multiply Accumulation Single precision
|
||||
|
||||
MBA ⟷ Memory Bandwidth Allocation
|
||||
|
||||
## Virtualization flags: Linux defined, word 8
|
||||
TPR_SHADOW ⟷ Intel TPR Shadow
|
||||
VNMI ⟷ Intel Virtual NMI
|
||||
FLEXPRIORITY ⟷ Intel FlexPriority
|
||||
EPT ⟷ Intel Extended Page Table
|
||||
VPID ⟷ Intel Virtual Processor ID
|
||||
|
||||
VMMCALL ⟷ Prefer vmmcall to vmcall
|
||||
XENPV ⟷ Xen paravirtual guest
|
||||
|
||||
|
||||
## Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9
|
||||
FSGSBASE ⟷ {RD/WR}{FS/GS}BASE instructions*/
|
||||
TSC_ADJUST ⟷ TSC adjustment MSR 0x3b
|
||||
BMI1 ⟷ 1st group bit manipulation extensions
|
||||
HLE ⟷ Hardware Lock Elision
|
||||
AVX2 ⟷ AVX2 instructions
|
||||
SMEP ⟷ Supervisor Mode Execution Protection
|
||||
BMI2 ⟷ 2nd group bit manipulation extensions
|
||||
ERMS ⟷ Enhanced REP MOVSB/STOSB
|
||||
INVPCID ⟷ Invalidate Processor Context ID
|
||||
RTM ⟷ Restricted Transactional Memory
|
||||
CQM ⟷ Cache QoS Monitoring
|
||||
MPX ⟷ Memory Protection Extension
|
||||
RDT_A ⟷ Resource Director Technology Allocation
|
||||
AVX512F ⟷ AVX-512 Foundation
|
||||
AVX512DQ ⟷ AVX-512 DQ (Double/Quad granular) Instructions
|
||||
RDSEED ⟷ The RDSEED instruction
|
||||
ADX ⟷ The ADCX and ADOX instructions
|
||||
SMAP ⟷ Supervisor Mode Access Prevention
|
||||
AVX512IFMA ⟷ AVX-512 Integer Fused Multiply-Add instructions
|
||||
CLFLUSHOPT ⟷ CLFLUSHOPT instruction
|
||||
CLWB ⟷ CLWB instruction
|
||||
AVX512PF ⟷ AVX-512 Prefetch
|
||||
AVX512ER ⟷ AVX-512 Exponential and Reciprocal
|
||||
AVX512CD ⟷ AVX-512 Conflict Detection
|
||||
SHA_NI ⟷ SHA1/SHA256 Instruction Extensions
|
||||
AVX512BW ⟷ AVX-512 BW (Byte/Word granular) Instructions
|
||||
AVX512VL ⟷ AVX-512 VL (128/256 Vector Length) Extensions
|
||||
|
||||
#Extended state features, CPUID level 0x0000000d:1 (eax), word 10
|
||||
XSAVEOPT ⟷ XSAVEOPT
|
||||
XSAVEC ⟷ XSAVEC
|
||||
XGETBV1 ⟷ XGETBV with ECX = 1
|
||||
XSAVES ⟷ XSAVES/XRSTORS
|
||||
|
||||
## Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:0 (edx), word 11
|
||||
CQM_LLC ⟷ LLC QoS if 1
|
||||
|
||||
## Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (edx), word 12
|
||||
CQM_OCCUP_LLC ⟷ LLC occupancy monitoring if 1
|
||||
CQM_MBM_TOTAL ⟷ LLC Total MBM monitoring
|
||||
CQM_MBM_LOCAL ⟷ LLC Local MBM monitoring
|
||||
|
||||
## AMD-defined CPU features, CPUID level 0x80000008 (ebx), word 13
|
||||
CLZERO ⟷ CLZERO instruction
|
||||
IRPERF ⟷ Instructions Retired Count
|
||||
|
||||
## Thermal and Power Management Leaf, CPUID level 0x00000006 (eax), word 14
|
||||
DTHERM ⟷ Digital Thermal Sensor
|
||||
IDA ⟷ Intel Dynamic Acceleration
|
||||
ARAT ⟷ Always Running APIC Timer
|
||||
PLN ⟷ Intel Power Limit Notification
|
||||
PTS ⟷ Intel Package Thermal Status
|
||||
HWP ⟷ Intel Hardware P-states
|
||||
HWP_NOTIFY ⟷ HWP Notification
|
||||
HWP_ACT_WINDOW ⟷ HWP Activity Window
|
||||
HWP_EPP ⟷ HWP Energy Perf. Preference
|
||||
HWP_PKG_REQ ⟷ HWP Package Level Request
|
||||
|
||||
## AMD SVM Feature Identification, CPUID level 0x8000000a (edx), word 15
|
||||
NPT ⟷ Nested Page Table support
|
||||
LBRVLBR ⟷ Virtualization support
|
||||
SVM_LOCK ⟷ SVM locking MSR
|
||||
NRIP_SAVE ⟷ SVM next_rip save
|
||||
TSC_SCALE ⟷ TSC scaling support
|
||||
VMCB_CLEAN ⟷ VMCB clean bits support
|
||||
FLUSHBYASID ⟷ flush-by-ASID support
|
||||
DECODEASSISTS ⟷ Decode Assists support
|
||||
PAUSEFILTER ⟷ filtered pause intercept
|
||||
PFTHRESHOLD ⟷ pause filter threshold
|
||||
AVIC ⟷ Virtual Interrupt Controller
|
||||
V_VMSAVE_VMLOAD ⟷ Virtual VMSAVE VMLOAD
|
||||
VGIF ⟷ Virtual GIF
|
||||
|
||||
## Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16
|
||||
AVX512VBMI ⟷ AVX512 Vector Bit Manipulation instructions*/
|
||||
PKU ⟷ Protection Keys for Userspace
|
||||
OSPKEOS ⟷ Protection Keys Enable
|
||||
AVX512_VPOPCNTDQ ⟷ POPCNT for vectors of DW/QW
|
||||
LA57 ⟷ 5-level page tables
|
||||
RDPID ⟷ RDPIDinstruction
|
||||
|
||||
## AMD-defined CPU features, CPUID level 0x80000007 (ebx), word 17
|
||||
OVERFLOW_RECOV ⟷ MCA overflow recovery support
|
||||
SUCCOR ⟷ Uncorrectable error containment and recovery
|
||||
SMCA ⟷ Scalable MCA
|
||||
"
|
||||
}
|
||||
|
||||
fi_disk(){ # 31/10/2017
|
||||
local disk_lsblk disk_df disk_df_i fstab resume idResume idSwap alert_uuidResume text pluriel
|
||||
local dd_temp dd_temp_alert dd_temp idisk tempodd
|
||||
|
@ -640,15 +937,12 @@ fi_graph(){ # 31/10/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_hw(){ # 25/10/2017
|
||||
fi_hw(){ # 03/11/2017
|
||||
figet_hw
|
||||
###
|
||||
text="## hardware monitor ACPI \n\n"
|
||||
if [ "$fg_hw" ]; then
|
||||
f_display "fg_hw" "sans"
|
||||
else
|
||||
text+="**pas d'informations détectées** \n\n"
|
||||
fi
|
||||
[ "$fg_hw" ] && f_display "fg_hw" "sans"
|
||||
[ "$fg_hw" ] || text+="* **pas d'informations détectées** \n\n"
|
||||
printf "$text\n" >> "$fileOutput"
|
||||
unset text
|
||||
}
|
||||
|
@ -747,31 +1041,33 @@ et/ou installer le démon Ntp: apt install ntp \n"
|
|||
[ "$localectl" ] && f_display "localectl" "cmd" "localectl --no-pager status"
|
||||
# timezone
|
||||
[ "$timezone" ] && f_display "timezone" "cmd" "grep -Hs . /etc/timezone*"
|
||||
[ "$timezone" ] || f_display_file "/etc/timezone*"
|
||||
[ "$timezone" ] || f_display_file_absent "/etc/timezone*"
|
||||
[ "$timedatectl" ] && f_display "timedatectl" "cmd" "timedatectl status --no-pager"
|
||||
[ "$alert_Rtc" ] && text+="$alert_Rtc_info \n"
|
||||
[ "$alert_Ntp" ] && text+="$alert_Ntp_info \n"
|
||||
# keyboard layout
|
||||
[ "$keyboard" ] && f_display "keyboard" "cmd" "grep -EHv '#|^[[:space:]]*$' /etc/default/keyboard*"
|
||||
[ "$keyboard" ] || f_display_file "/etc/default/keyboard"
|
||||
[ "$keyboard" ] || f_display_file_absent "/etc/default/keyboard"
|
||||
[ "$xKeyboardMap" ] && f_display "xKeyboardMap" "cmd" "setxkbmap -query"
|
||||
printf "$text\n" >> "$fileOutput"
|
||||
unset text
|
||||
}
|
||||
|
||||
fi_log_xorg(){ # 30/10/2017
|
||||
fi_log_xorg(){ # 03/11/2017
|
||||
[ "$ENV_SSH" ] && return 0
|
||||
local logXorg xfile extract text nb_lignes=50
|
||||
local logXorg xfile extract dateFile text nb_lignes=50
|
||||
# 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
|
||||
# voir options appliquées par config file: cat /var/log/Xorg.0.log | grep -E '\(\*\*\)'
|
||||
# voir options par défaut: cat /var/log/Xorg.0.log | grep -E '\(==\)'
|
||||
for xfile in /var/log/Xorg.0.log /home/$user_/.local/share/xorg/Xorg.0.log ; do
|
||||
if [ -e "$xfile" ]; then
|
||||
dateFile=$(date -r $xfile '+%d/%m/%Y %H:%M %z')
|
||||
extract="$(grep -Es '\(WW\)|\(EE\)|\(\?\?\)' $xfile | sed '/(WW) warning, (EE) error,/d')"
|
||||
extract="$(sed -n 1,"$nb_lignes"p <<< $extract)"
|
||||
if [ "$extract" ]; then
|
||||
logXorg+="$xfile (WW) **warning**, (EE) **erreur**, (??) inconnu, $nb_lignes premières lignes \n\n"
|
||||
logXorg+="$xfile, date de modification: $dateFile \n"
|
||||
logXorg+=" (WW) **warning**, (EE) **erreur**, (??) inconnu, $nb_lignes premières lignes \n"
|
||||
logXorg+="$(grep -E '\(EE\)' <<< $extract) \n"
|
||||
logXorg+="$(grep -E '\(WW\)' <<< $extract) "$'\n'$'\n'
|
||||
else
|
||||
|
@ -782,7 +1078,7 @@ fi_log_xorg(){ # 30/10/2017
|
|||
fi
|
||||
done
|
||||
logXorg="${logXorg::-2}"
|
||||
###
|
||||
###
|
||||
text="## journaux Xorg \n\n"
|
||||
f_display "logXorg" "cmd" \
|
||||
"grep -Es '\(WW\)|\(EE\)|\(\?\?\)' /var/log/Xorg.?.log /home/<user>/.local/share/xorg/Xorg.?.log" \
|
||||
|
@ -816,9 +1112,9 @@ fi_nm(){ # 29/10/2017
|
|||
###
|
||||
text="## NetworkManager \n\n"
|
||||
[ "$nm_etat" ] && f_display "nm_etat" "cmd" "grep -Ev '#|^[[:space:]]*$' /var/lib/NetworkManager/NetworkManager.state"
|
||||
[ "$nm_etat" ] || f_display_file "/var/lib/NetworkManager/NetworkManager.state"
|
||||
[ "$nm_etat" ] || f_display_file_absent "/var/lib/NetworkManager/NetworkManager.state"
|
||||
[ "$nm_conf" ] && f_display "nm_conf" "cmd" "grep -Ev '#|^[[:space:]]*$' /etc/NetworkManager/NetworkManager.conf"
|
||||
[ "$nm_conf" ] || f_display_file "/etc/NetworkManager/NetworkManager.conf"
|
||||
[ "$nm_conf" ] || f_display_file_absent "/etc/NetworkManager/NetworkManager.conf"
|
||||
if [ "$nm_wifis" ]; then
|
||||
text+="## wifis à proximité \n\n"
|
||||
f_display "nm_wifis" "cmd" "nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY device wifi list | head -n15"
|
||||
|
@ -890,9 +1186,9 @@ fi_reseau(){ # 31/10/2017
|
|||
f_display "ip_a" "cmd" "ip address" "(sans ipV6 et sans adresses MAC)"
|
||||
f_display "route" "cmd" "ip route show"
|
||||
[ "$interfaces" ] && f_display "interfaces" "cmd" "grep -EHrsv '#|^[[:space:]]*$' /etc/network/interfaces*"
|
||||
[ "$interfaces" ] || f_display_file "/etc/network/interfaces*"
|
||||
[ "$interfaces" ] || f_display_file_absent "/etc/network/interfaces*"
|
||||
[ "$resolv" ] && f_display "resolv" "cmd" "cat /etc/resolv.conf" "(serveurs de noms DNS utilisés)"
|
||||
[ "$resolv" ] || f_display_file "/etc/resolv.conf"
|
||||
[ "$resolv" ] || f_display_file_absent "/etc/resolv.conf"
|
||||
# iwconfig & iwlist
|
||||
[ "$iwconfig" ] && f_display "iwconfig" "cmd" "iwconfig" "état carte wifi"
|
||||
if [ "$canal_wifi" ]; then
|
||||
|
@ -1123,7 +1419,7 @@ fi_usb(){ # 25/10/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_vrms(){ # 30/09/2017
|
||||
fi_vrms(){ # 03/11/2017
|
||||
local vrms text tempo tempo1 tempo2 pluriel
|
||||
[ "$(f__cmd_exist vrms)" ] && vrms="$(vrms)"
|
||||
###
|
||||
|
@ -1131,8 +1427,8 @@ fi_vrms(){ # 30/09/2017
|
|||
# tempo2=$(grep -o '.*contrib packages' <<< "$vrms" | xargs)
|
||||
# tempo=$(( ${tempo1:0:1} + ${tempo2:0:1} ))
|
||||
# [[ "$tempo1" && "$tempo" -gt 1 ]] && pluriel="s" || unset pluriel
|
||||
text="## paquets$pluriel non-libres$pluriel \n\n"
|
||||
if [ "$vrms" ]; then
|
||||
text="## paquets$pluriel non-libres$pluriel \n\n"
|
||||
f_display "vrms" "cmd" "vrms"
|
||||
else
|
||||
text+="* les paquets non-free ou contrib ne peuvent être détectés sans l'installation de vrms \n"
|
||||
|
@ -1306,7 +1602,7 @@ figet_cpu(){ #v2 03/11/2017
|
|||
case ${vendor,,} in
|
||||
*intel*)
|
||||
case $family in
|
||||
04) fg_uarch="Intel 80486";;
|
||||
04) fg_uarch="Intel 80486, 1000 à 600nm";; # arch_x86
|
||||
05)
|
||||
case $model in
|
||||
01 | 02 | 03 | 07) fg_uarch="Intel P5 (Pentium)";; # arch_x86
|
||||
|
@ -1340,7 +1636,7 @@ figet_cpu(){ #v2 03/11/2017
|
|||
4E | 55 | 5E) fg_uarch="Intel Skylake 14nm";;
|
||||
8E | 9E) fg_uarch="Intel Kaby Lake 14nm";;
|
||||
# atom
|
||||
26 | 1C) fg_uarch="Intel Atom Bonnell 45nm";;
|
||||
1C | 26) fg_uarch="Intel Atom Bonnell 45nm";;
|
||||
27 |35 |36) fg_uarch="Intel Atom Saltwell 32nm";;
|
||||
37 | 4A | 4D | 5A) fg_uarch="Intel Atom Silvermont 22nm";;
|
||||
4C | 5D | 5F) fg_uarch="Intel Atom Airmont 14nm";;
|
||||
|
@ -1400,7 +1696,17 @@ figet_cpu(){ #v2 03/11/2017
|
|||
esac ;;
|
||||
*) fg_uarch="AMD $defaut_family";;
|
||||
esac ;;
|
||||
*) fg_uarch="$defaut_vendor"
|
||||
*Centaur*) fg_uarch="Centaur (avec quelques processeurs VIA) $defaut_vendor";;
|
||||
*Cyrix*) fg_uarch="Cyrix $defaut_vendor";;
|
||||
*TransmetaU* | *TMx86*) fg_uarch="Transmeta $defaut_vendor";;
|
||||
*NSC*) fg_uarch="National Semiconductor $defaut_vendor";;
|
||||
*NexGen*) fg_uarch="NexGen $defaut_vendor";;
|
||||
*Rise*) fg_uarch="Rise $defaut_vendor";;
|
||||
*SiS*) fg_uarch="SiS $defaut_vendor";;
|
||||
*UMC*) fg_uarch="UMC $defaut_vendor";;
|
||||
*VIA*) fg_uarch="VIA $defaut_vendor";;
|
||||
*Vortex*) fg_uarch="Vortex $defaut_vendor";;
|
||||
*) fg_uarch="$defaut_vendor";;
|
||||
esac
|
||||
}
|
||||
[ "$fg_uarch" ] && fg_uarch+=" {0x$family|0x$model}"
|
||||
|
|
|
@ -3,18 +3,21 @@
|
|||
* f__wcv
|
||||
|
||||
|
||||
## 2.22.3 03/11/2017
|
||||
## 2.23 04/11/2017
|
||||
|
||||
nouveau: µarchitecture proc amd
|
||||
* nouveau: µarchitecture proc amd
|
||||
* nouveau: texte des flags cpu
|
||||
* révision: tri des flags cpu
|
||||
* révision: Xorg.log, datage des fichiers
|
||||
|
||||
## 2.22.1 02/11/2017
|
||||
|
||||
nouveau: µarchitecture proc intel
|
||||
* nouveau: µarchitecture proc intel
|
||||
|
||||
## 2.21.10 01/11/2017
|
||||
|
||||
µarchitecture proc intel, beta
|
||||
fix: figet_distrib, affichage distrib
|
||||
* µarchitecture proc intel, beta
|
||||
* fix: figet_distrib, affichage distrib
|
||||
|
||||
## 2.21.7 31/10/2017
|
||||
|
||||
|
|
Loading…
Reference in New Issue