aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xzp_read_debug.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/zp_read_debug.sh b/zp_read_debug.sh
new file mode 100755
index 0000000..7fece5b
--- /dev/null
+++ b/zp_read_debug.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+hwmon="/sys/class/hwmon"
+mdevs=`ls $hwmon`
+zenmon=""
+ok=0
+
+for dev in $mdevs; do
+ path="$hwmon/$dev"
+ devname=`cat $path/name`
+ if [ "$devname" == "zenpower" ]; then
+ cat $path/debug_data
+ ok=1
+ fi
+done
+
+if [ $ok -ne 1 ]; then
+ echo "Zenpower not found"
+ exit
+fi \ No newline at end of file