Create debugging script
https://gist.github.com/ocerman/6566b00072c8af96a109f65075f2d8b7
This commit is contained in:
parent
16e81693e5
commit
3773f2a7b2
20
zp_read_debug.sh
Executable file
20
zp_read_debug.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue