lipnsa-auswertung-danach.sh 767 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/bin/bash

# TODO Copy files automatically from inserted USB key.

Efifile=$(mktemp)
Memfile=$(mktemp)
Drivefile=$(mktemp)

for i in */; do
    var=$(ls $i | head -1)
    cat $i/$var/meminfo | grep MemTotal | awk '{print $2/1024/1024}' >> $Memfile
    cat $i/$var/lsblk | grep disk | awk '{print $4}' | grep -v '^[0-9]\.[0-9]G' | grep -v "[0-9]*M" >> $Drivefile
    cat $i/$var/efi >> $Efifile
done

echo -------- EFI ---------
echo $(cat $Efifile | grep yes | wc -l) ja, $(cat $Efifile | grep no | wc -l) nein.

echo -------- RAM ---------
cat $Memfile | sort -n | gnuplot -e "set terminal dumb; plot '<cat' with lines"

echo -------- HDD ---------
cat $Drivefile | sort -n | gnuplot -e "set terminal dumb; plot '<cat' with lines"

rm $Memfile $Drivefile $Efifile