summaryrefslogtreecommitdiff
path: root/cputemp
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-08-10 11:19:38 +0100
committerPatrick Simianer <p@simianer.de>2014-08-10 11:19:38 +0100
commit5869505d64c04c536bdcd71a197ade918c36bf1c (patch)
tree6af5232a9f2e058f15230a370a960f89871a2b74 /cputemp
init
Diffstat (limited to 'cputemp')
-rwxr-xr-xcputemp15
1 files changed, 15 insertions, 0 deletions
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