mirror of
https://github.com/alexreinert/homematic_check_mk.git
synced 2023-10-10 11:37:02 +00:00
added more lnx_thermal information so that the thermal zone of a GPU is
also added to the check_mk output as well as the trip_point limits defined by the hardware.
This commit is contained in:
parent
576243e970
commit
d3b393dece
@ -27,9 +27,9 @@ proc handle_connection { channelId clientAddress clientPort } {
|
||||
puts $channelId [string trim [load_from_file /proc/vmstat]]
|
||||
puts $channelId [string trim [load_from_file /proc/stat]]
|
||||
|
||||
if { [file exists /sys/class/thermal/thermal_zone0/temp] == 1} {
|
||||
if { [file exists /sys/class/thermal/thermal_zone0] == 1} {
|
||||
puts $channelId "<<<lnx_thermal>>>"
|
||||
puts $channelId "thermal_zone0 enabled [string trim [load_from_file /sys/class/thermal/thermal_zone0/type]] [string trim [load_from_file /sys/class/thermal/thermal_zone0/temp]]"
|
||||
puts $channelId [exec sh -c {for F in /sys/class/thermal/thermal_zone*; do if [ ! -e "$F/mode" ] || [ "$(cat ${F}/mode)" == "disabled" ]; then continue; fi; echo -n "${F##*/} "; for m in mode type temp; do cat "$F"/${m} 2>/dev/null | tr \\n " "; done; for i in $(seq 1 $(ls $F/trip_point_*_type 2>/dev/null| wc -l)); do cat "$F"/trip_point_${i}_temp "$F"/trip_point_${i}_type 2>/dev/null | tr \\n " "; done; echo; done}]
|
||||
}
|
||||
|
||||
if { [file exists /proc/net/tcp6] == 1 } {
|
||||
|
Loading…
x
Reference in New Issue
Block a user