Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Systeminformationen kde4 mit yasp
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
flammenflitzer
Advocate
Advocate


Joined: 25 Nov 2003
Posts: 3009
Location: Berlin

PostPosted: Fri Mar 23, 2012 3:07 pm    Post subject: Systeminformationen kde4 mit yasp Reply with quote

Hallo,
ich habe ein Script, das noch nicht so optimal ist
Code:
###################################################################################################
##########################                Yasp Script               ###############################
################       Syntax description can be found in README.syntax     #######################
###################################################################################################


default title:color="yellow" title:font="Dejavu Sans, 9" title:shadow="Sunken" title:alignment="Center"
default value:color="yellow" value:font="Dejavu Sans, 9" value:alignment="Left"
########################################################################
title text="System"
default interval="single"
default interval="60000"
sensor name="UptimeSecs" type="engine" cmd="systemmonitor:system/uptime:value"
sensor name="UptimeDays" type="math" use="UptimeSecs" math="int $1 86400 /"
sensor name="UptimeHours" type="math" use="UptimeSecs" use="UptimeDays" math="int $1 86400 $2 * - 3600 /"
sensor name="UptimeMinutes" type="math" use="UptimeSecs" use="UptimeDays" use="UptimeHours" math="int $1 86400 $2 * - 3600 $3 * - 60 /"
sensor name="LoggedUsers" type="program" cmd="who | awk '{print $1}' | sort -u | xargs"
value key="Uptime" use="UptimeDays" use="UptimeHours" use="UptimeMinutes" format="$1 day(s) $2 h $3 m"
#####################################################################
#Board
sensor name="MBTemp" type="program" cmd="sensors | grep MB | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'"
value key="" use="MBTemp"
#####################################################################
#CPU
value icon="/home/olaf/.yasp/yasp-icons/cpu3.png" iconsize="32" key="Prozessor"
default interval="2000"
sensor name="Load" type="program" cmd="top -b | head -1 | cut -f5- -d':' | xargs"
value key="Load" use="Load" format="$1"
sensor name="Cpu0Load" type="engine" cmd="systemmonitor:cpu/cpu0/TotalLoad:value" math="int $0"
sensor name="Cpu1Load" type="engine" cmd="systemmonitor:cpu/cpu1/TotalLoad:value" math="int $0"
sensor name="RamApplicationMb" type="engine" cmd="systemmonitor:mem/physical/application:value" math="int $0 1024 /"
sensor name="RamTotalMb" type="program" cmd=$cat /proc/meminfo | grep MemTotal | sed -e "s/MemTotal: *\([0-9]*\).*/\1/"$ math="int $0 1024 /" interval="single"
sensor name="Core0Temp" type="program" cmd=%sensors | awk '/Core\ 0/ {print $3}'%
sensor name="Core1Temp" type="program" cmd=%sensors | awk '/Core\ 1/ {print $3}'%
sensor name="Core0MHZ" type="program" cmd="cpufreq-info -c 0 -f -m" interval="10000"
value key="Takt Prozessor-Kern 1" use="Core0MHZ" format="$1"
sensor name="Core1MHZ" type="program" cmd="cpufreq-info -c 1 -f -m" interval="10000"
value key="Takt Prozessor-Kern 2" use="Core1MHZ" format="$1"
value key="Prozessor-Kern 1" use="Core0Temp" use="Cpu0Load" format="Temp: $1 Load: $2%"
plotter use="Cpu0Load" plot="$1" color="red" min="0" max="100" height="50"
value key="Prozessor-Kern 2" use="Core1Temp" use="Cpu1Load" format="Temp: $1 Load: $2%"
plotter use="Cpu1Load" plot="$1" color="red" min="0" max="100" height="50"
default interval="30000"
sensor name="CpuFan" type="program" cmd="sensors | grep CPU_FAN | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'"
value key="Lüfter Drehzahl               CPU" use="CpuFan"
sensor name="CHA_FAN1" type="program" cmd="sensors | grep CHA_FAN1 | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'"
value key="Lüfter Drehzahl               Gehäuse Vorn 1" use="CHA_FAN1"
sensor name="CHA_FAN2" type="program" cmd="sensors | grep CHA_FAN2 | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'"
value key="Lüfter Drehzahl               Gehäuse Vorn 2" use="CHA_FAN2"
#sensor name="CpuFan" type="program" cmd="sensors | grep CPU_FAN | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'"
value key="Lüfter Drehzahl               Gehäuse Hinten"
#####################################################################
#RAM und SWAp
value icon="/home/olaf/.yasp/yasp-icons/Ram-Drive-icon.png" iconsize="32" key="Arbeitsspeicher"
value key="Ram Usage" use="RamApplicationMb" use="RamTotalMb" format="$1 MB / $2 MB"
plotter use="RamApplicationMb" plot="$1" color="red" min="0" max="3898" height="50"
default interval="10000"
value icon="/home/olaf/.yasp/yasp-icons/Internal-Drive-icon.png" iconsize="32" key="Arbeitsspeicher Ausgelagert"
sensor name="SwapMbUsed" type="engine" cmd="systemmonitor:mem/swap/used:value" math="int $0 1024 /"
sensor name="SwapMbTotal" use="SwapMbUsed" type="engine" cmd="systemmonitor:mem/swap/free:value" math="int $0 1024 / $1 +"
value key="Swap Usage" use="SwapMbUsed" use="SwapMbTotal" format="$1 MB / $2 MB"
plotter use="SwapMbUsed" plot="$1" color="red" min="0" max="4095" height="50"
#####################################################################
#Netwerk
value icon="oxygen/22x22/places/network-workgroup.png" iconsize="32" key="Netzwerk" use="Eth0Ip"
default interval="10000"
default interval="10000"
sensor name="Eth0Ip" type="program" cmd=%/sbin/ifconfig eth0 | grep "inet addr"  | cut -d":" -f 2 | cut -d" " -f1%
sensor name="Eth0Down" type="engine" cmd="systemmonitor:network/interfaces/eth0/receiver/data:value"
sensor name="Eth0Up" type="engine" cmd="systemmonitor:network/interfaces/eth0/transmitter/data:value"
sensor name="PrivateIP" type="program" cmd="/sbin/ifconfig eth0 | grep 'inet ' | cut -d : -f2 | cut -d ' ' -f1" interval="10000"
value key="IP:" use="PrivateIP"
value key="eth0" use="Eth0Down" use="Eth0Up" format="Down: $1 kB/s Up: $2 kB/s"
plotter use="Eth0Down" use="Eth0Up" min="0" max="600" plot="$1" color="red" plot="$2" color="green" height="50"
#########################################################################
#HDD Temperaturen
value icon="/home/olaf/.yasp/yasp-icons/Internal-Drive-icon.png" iconsize="32" key="Festplatten Temperaturen"
#sensor name="HDD Raid 3ware /dev/sda" type="program" cmd="/usr/sbin/smartctl -d 3ware,0 -A /dev/twe0 | grep Temperature_Celsius | cut -c 88-90" interval="300000"
sensor name="HDD1" type="program" cmd="/usr/sbin/hddtemp -q /dev/sdg | cut -c 29-33" interval="300000"
sensor name="HDD2" type="program" cmd="/usr/sbin/hddtemp -q /dev/sde | cut -c 24-31" interval="300000"
sensor name="HDD3" type="program" cmd="/usr/sbin/hddtemp -q /dev/sdf | cut -c 33-37" interval="300000"
sensor name="HDD4" type="program" cmd="/usr/sbin/hddtemp -q /dev/sdd | cut -c 26-30" interval="300000"
#sensor name="HDHead" type="program" cmd='echo -e "HDD 1   HDD 2    IcyBox"'
#value key="" use="HDD Raid 3ware /dev/sda" use="HDD SAMSUNG SpinPoint Filesharing /dev/sdg" use="HDD Seagate Barracuda /dev/sde" format="$1°C     $2°C     $3°C"
#value key="Temperatur HDD Raid 3ware /dev/sda" use="HDD Raid 3ware /dev/sda"
value key="Temperatur HDD SAMSUNG SpinPoint Filesharing" use="HDD1"
value key="Temperatur HDD Seagate ST31000528AS Dateien" use="HDD2"
value key="Temperatur HDD WDC WD20EARS-00S Musik" use="HDD3"
value key="Temperatur Seagate ST31000528AS Musik2" use="HDD4"
################################################################
#Portage
default interval="60000"
sensor name="Letzte rsync Portage" type="program" cmd=!date -f /usr/portage/metadata/timestamp.chk +"%a, %d %b %H:%M"!
################################################################
default interval="3000"
title text="Top: Prozesse sortiert nach CPU Asulastung"
sensor name="Top" type="program" cmd="ps axo pcpu,pmem,comm --sort -%cpu | head -9"
text use="Top" font="Dejavu Sans, 10"


Speziell gefallen mir nicht
MBTemp
Code:

sensor name="MBTemp" type="program" cmd="sensors | grep MB | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'"
value key="" use="MBTemp"

Code:
sensors | grep MB | sed -e 's/^.* \([1-9].* RPM\) .*/\1/'
MB Temperature:      +45.0°C  (high = +45.0°C, crit = +95.0°C)
Mir reicht +45.0°C
Ram Auslastung
Code:
sensor name="RamTotalMb" type="program" cmd=$cat /proc/meminfo | grep MemTotal | sed -e "s/MemTotal: *\([0-9]*\).*/\1/"$ math="int $0 1024 /"
geht das eleganter?
Die Informationen über den Raid lassen sich nicht mehr in der Form abrufen.
Code:
#sensor name="HDD Raid 3ware /dev/sda" type="program" cmd="/usr/sbin/smartctl -d 3ware,0 -A /dev/twe0 | grep Temperature_Celsius | cut -c 88-90" interval="300000"
Code:
smartctl -a /dev/twe0 -d 3ware,0
Code:
smartctl -a /dev/twe0 -d 3ware,1
kann ich nur als root ausführen. Hat da jemand eine Idee?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum