aboutsummaryrefslogtreecommitdiff
path: root/zp_read_debug.sh
blob: 7fece5ba5f9ab0da6f5c7c55e4533c96b750b83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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