sysreport


Das Script zeigt alle wichtigen Informationen über das System.
Benötigt „lm-sensors“ und „hddtemp“ für das auslesen der Temperaturen.
Benötigt Rootrechte ggf mit sudo starten.

Empfohlener Speicher Ort: /usr/local/bin/sysreport

sysreport -c # mit Farbe

Mit watch auch für Livestats geeignet:

watch -c -n5 sysreport -c # mit Farbe
watch -n5 sysreport # ohne Farbe

 

tools__sysstat_1

 

#!/bin/bash

#apt-get install lm-sensors hddtemp
#sensors-detect

case $* in
-c|-color)
gruen="\033[1;32m"
blau="\033[1;34m"
weiss="\033[0m"
;;
*)
;;
esac
echo
echo "----------------------------------------------------------"
echo -e "$gruen""report@`hostname`""$weiss"
echo "----------------------------------------------------------"
echo
echo -e "$blau""System:\033[0m""$weiss"
echo " `cat /etc/issue.net` `uname -rosp`"
echo -e "$blau""Mainboard:""$weiss"
echo " `dmidecode -s baseboard-manufacturer` `dmidecode -s baseboard-product-name` | BIOS: `dmidecode -s bios-version`"
echo -e "$blau""Prozessor:""$weiss"
echo -n "`dmidecode -t processor | grep Version | sed 's#\:#\:x#g' | cut -d':' -f2 | uniq -c | tr -s ' '` "
echo "`dmidecode -t processor | grep 'Core Count'| sed 's#\:#\:x#g' | cut -d':' -f2 | uniq -c | sed 's# ##g'` Cores / `dmidecode -t processor | grep 'Thread Count' | sed 's#\:#\:x#g' | cut -d':' -f2 | uniq -c | sed 's# ##g'` Threads"
echo -e "$blau""Taktraten:""$weiss"
echo "`cat /proc/cpuinfo | grep 'cpu MHz' | sed 's#:#:x#g' | cut -d':' -f2 | sort | uniq -c | tr -s ' '`"
echo -e "$blau""Temperaturen:""$weiss"
echo "`sensors | grep '[0-9]:' | egrep '°F|°C' | cut -d':' -f2 | awk '{print $1}' | xargs -i -exec echo -n ' {}'`"
echo -e "$blau""Memory:""$weiss"
echo "`dmidecode -t memory | egrep 'Size|Speed' | grep -v 'Clock' | sed 's#:#:x#g' | cut -d':' -f2 | grep '[0-9]' | sort | uniq -c | sort -k4 | xargs -i -e echo -n " {}"` | `top -bn1 | grep Mem: | cut -d':' -f2 | tr -s ' '`"
echo -e "$blau""Load:""$weiss"
cat /proc/loadavg | awk '{print " loadnow: "$1" load5min: "$2" load15min: "$3" Prozesse [aktiv/alle]: "$4}'
echo -e "$blau""DiskSpace: [ Mountpoint | Size | Use | Free ]""$weiss"
df -h | grep '/dev/' | awk '{print " "$6" | "$2" | "$3" | "$4 }'
echo -e "$blau""Festplatten-Temperaturen""$weiss"
hddtemp -q /dev/sd[a-z] 2> /dev/null | cut -d':' -f1,3 | xargs -i -e echo -n " {}"
echo
echo -e "$blau""Boinc Prozesse""$weiss"
top -bn1 -u boinc | grep '^[0-9]' | grep -v grep | awk '{print $12}' | sort | uniq -c | sort -rnk1 | tr -s ' '
echo -e "$blau""WLAN""$weiss"
for WLAN in `iwconfig 2> /dev/null |grep ESSID | awk '{print $1}' 2> /dev/null`;do
iwconfig $WLAN | sed 's# #\n#g' | egrep ':|=' | egrep 'ESSID|Quality|Tx-Power' | xargs -i -e echo -n " {}"
ifconfig $WLAN | grep 'inet Adresse' | tr -s ' ' | sed 's# inet##g'
done

echo