'snmp_sensors.sh' hinzufügen
This commit is contained in:
15
snmp_sensors.sh
Normal file
15
snmp_sensors.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ -z $1 ] ; then
|
||||||
|
echo "No Paramters given."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "z${1}" == "zcpu" ] ; then
|
||||||
|
cpu=$(</sys/class/thermal/thermal_zone0/temp)
|
||||||
|
echo $((cpu/1000))
|
||||||
|
exit 0
|
||||||
|
elif [ "z${1}" == "zgpu" ] ; then
|
||||||
|
gpu=$(/opt/vc/bin/vcgencmd measure_temp | cut -d "=" -f 2 | cut -d "'" -f 1)
|
||||||
|
echo $gpu
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user