Skip to content

Instantly share code, notes, and snippets.

@ocerman
Last active October 22, 2021 03:33
Show Gist options
  • Save ocerman/6566b00072c8af96a109f65075f2d8b7 to your computer and use it in GitHub Desktop.
Save ocerman/6566b00072c8af96a109f65075f2d8b7 to your computer and use it in GitHub Desktop.
This script prints debug data from zenpower driver
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment