aboutsummaryrefslogtreecommitdiff
path: root/zp_read_debug.sh
diff options
context:
space:
mode:
authorAnthony Wang2021-12-16 11:24:40 -0600
committerAnthony Wang2021-12-16 11:24:40 -0600
commit3773f2a7b2e905279c607e3d5dbe197c57b8755f (patch)
tree11576bf2f892384605d8157b890cc6555ab96ea8 /zp_read_debug.sh
parent16e81693e535884a15c7a6d6ecdaa6e50153fb37 (diff)
Create debugging script
https://gist.github.com/ocerman/6566b00072c8af96a109f65075f2d8b7
Diffstat (limited to 'zp_read_debug.sh')
-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