File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -55,15 +55,18 @@ if [ "$diffTime" -lt "$maxDelay" ]; then
55
55
BRAND_MINER=" amd"
56
56
fi
57
57
58
- # TODO, get hash per gpu
59
- avg_hashrate=$(( total_hashrate/ brand_gpu_count))
60
58
for(( i= 0 ; i < gpu_count; i++ )) ; do
61
59
[[ " ${brands[i]} " != $BRAND_MINER ]] && continue
62
60
[[ " ${busids[i]} " =~ ^([A-Fa-f0-9]+): ]]
63
61
busid_arr+=($(( 16 #${BASH_REMATCH[1]} )) )
64
62
temp_arr+=(${temps[i]} )
65
- fan_arr+=(${fans[i]} )
66
- hash_arr+=($avg_hashrate )
63
+ fan_arr+=(${fans[i]} )
64
+ gpu_raw=` cat $CUSTOM_LOG_BASENAME .log | grep -w " Device #" $i | tail -n 1 `
65
+ hashrate=` echo $gpu_raw | awk ' {print $(NF-1)}' | cut -d " ." -f 1,2 --output-delimiter=' ' | sed ' s/$/0/' `
66
+ if [[ $gpu_raw == * " Ghash" * ]]; then
67
+ hashrate=$(( $hashrate * 1000 ))
68
+ fi
69
+ hash_arr+=($hashrate )
67
70
done
68
71
69
72
hash_json=` printf ' %s\n' " ${hash_arr[@]} " | jq -cs ' .' `
You can’t perform that action at this time.
0 commit comments