From 5869505d64c04c536bdcd71a197ade918c36bf1c Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 10 Aug 2014 11:19:38 +0100 Subject: init --- cputemp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 cputemp (limited to 'cputemp') diff --git a/cputemp b/cputemp new file mode 100755 index 0000000..965a087 --- /dev/null +++ b/cputemp @@ -0,0 +1,15 @@ +#!/bin/zsh + + +MAX_TEMP=$1 + +for i in \ + /sys/devices/pci0000:00/0000:00:18.3/temp1_input \ + /sys/devices/pci0000:00/0000:00:19.3/temp1_input \ + /sys/devices/pci0000:00/0000:00:1a.3/temp1_input \ + /sys/devices/pci0000:00/0000:00:1b.3/temp1_input; do + TEMP=$(cat $i) + if [ $TEMP -gt $MAX_TEMP ]; then + logger "Some CPU temp @$TEMP (/1000)!" + fi +done -- cgit v1.2.3