note
This commit is contained in:
parent
234ec0092c
commit
bf81bc697b
56
05-12-2025.md
Normal file
56
05-12-2025.md
Normal file
@ -0,0 +1,56 @@
|
||||
#cours d'aujourd'hui
|
||||
finalisation du projet grabber :
|
||||
|
||||
|
||||
rajout maj :
|
||||
summary.txt avec un recap de la configue,hardware et software .
|
||||
Ajout sur le script :
|
||||
hardware() {
|
||||
echo "[HARDWARE]" > $SUM
|
||||
echo "CPU=$(lscpu -eMODELNAME|tail -n1)" >> $SUM
|
||||
echo "CPU_ID=$(sudo dmidecode -t processor | grep ID | cut -d: -f2)" >> $SUM
|
||||
RAM_SIZE=$(lsmem |grep 'Mémoire partagée' |cut -d: -f2|sed 's/\ //g')
|
||||
RAM_GEN=$(sudo dmidecode -t memory | grep Type: | grep -v Unknown |tail -n1 | cut -d : -f2 |sed 's/\ *//')
|
||||
echo "RAM=$RAM_SIZE $RAM_GEN" >> $SUM
|
||||
echo "RAM_SIZE=$RAM_SIZE" >> $SUM
|
||||
|
||||
declare -a DEVICES
|
||||
mapfile -t DEVICES < <(lsblk -dn -o NAME |grep -v loop)
|
||||
|
||||
declare -A PARTITIONS_BY_DISK
|
||||
for disk in ${DEVICES[@]}; do
|
||||
disk_path=$(printf '/dev/%s' "$disk")
|
||||
disk_parts=$(lsblk -nr -o PKNAME,PATH $disk_path |grep -vE "^\ " |cut -d \ -f2)
|
||||
PARTITIONS_BY_DISK[$disk]="${disk_parts[@]}"
|
||||
done
|
||||
|
||||
echo "DEVICES=${DEVICES[@]}" >> $SUM
|
||||
for disk in ${!PARTITIONS_BY_DISK[@]}; do
|
||||
echo "PARTS_$disk=$(printf '%s ' ${PARTITIONS_BY_DISK[$disk]})" >> $SUM
|
||||
done
|
||||
STOCKAGE_TOTAL=0
|
||||
Sizes=$(lsblk -dnb | grep -v loop |grep -v boot|tr -s " "|cut -d \ -f4)
|
||||
for size in ${Sizes[@]} ;do
|
||||
STOCKAGE_TOTAL+=$size
|
||||
done
|
||||
STOCKAGE_TOTAL=$(numfmt --to iec $STOCKAGE_TOTAL)
|
||||
echo "STOCKAGE_TOTAL=$STOCKAGE_TOTAL" >> $SUM
|
||||
}
|
||||
hardware
|
||||
|
||||
software(){
|
||||
echo "[SOFTWARE]" >> $SUM
|
||||
echo "OS=$(lsb_release -a |grep DESCRIPTION | cut -f2)" >> $SUM
|
||||
echo "ARCH=$(hostnamectl |grep Architecture |cut -d: -f2 |sed 's/\ //g' )" >> $SUM #=$(uname -m) version plus simple
|
||||
echo "DESKTOP=$XDG_CURRENT_DESKTOP" >> $SUM
|
||||
echo "WM=$XDG_SESSION_TYPE" >> $SUM
|
||||
echo "KERNEL=$(uname -r)" >> $SUM
|
||||
}
|
||||
software
|
||||
|
||||
|
||||
|
||||
dans le controle il y'aura surment une commande a faire en parti carte graphique donc il faut se motivé ( je parle moi mais au cas ou ou quelqu'un regarde mes notes)
|
||||
|
||||
|
||||
|
||||
3
28-11-2025.md
Normal file
3
28-11-2025.md
Normal file
@ -0,0 +1,3 @@
|
||||
#cours de fin novembre
|
||||
|
||||
on finalise l grabber , on revise les boucles
|
||||
Loading…
x
Reference in New Issue
Block a user