From bf81bc697b25d1db4a849cbc9959f7828cc7b989 Mon Sep 17 00:00:00 2001 From: rzyan Date: Sun, 14 Dec 2025 14:00:24 +0100 Subject: [PATCH] note --- 05-12-2025.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 28-11-2025.md | 3 +++ 2 files changed, 59 insertions(+) create mode 100644 05-12-2025.md create mode 100644 28-11-2025.md diff --git a/05-12-2025.md b/05-12-2025.md new file mode 100644 index 0000000..432731b --- /dev/null +++ b/05-12-2025.md @@ -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) + + + diff --git a/28-11-2025.md b/28-11-2025.md new file mode 100644 index 0000000..1ae07d8 --- /dev/null +++ b/28-11-2025.md @@ -0,0 +1,3 @@ +#cours de fin novembre + +on finalise l grabber , on revise les boucles