Custom miner: sgminer


Hi to All

I have made sgminer integration as custom miner everything work ok except miner statistic in HiveOS.
Miner show only total Mh/s but no separate GPU statistic !!! file:

#!/usr/bin/env bash

 . /hive-config/wallet.conf


stats_raw=`echo '{"command":"summary+devs"}' | nc -w $API_TIMEOUT localhost 4028`
if [[ $? -ne 0 || -z $stats_raw ]]; then
echo -e "${YELLOW}Failed to read $miner from localhost:4028${NOCOLOR}"
khs=`echo $stats_raw | jq '.["summary"][0]["SUMMARY"][0]["KHS 5s"]'`
stats=`echo $stats_raw | jq '{khs: [.devs[0].DEVS[]."KHS 5s"], temp: [.devs[0].DEVS[].Temperature], \
fan: [.devs[0].DEVS[]."Fan Percent"], uptime: .summary[0].SUMMARY[0].Elapsed, algo: "'$CUSTOM_ALGO'"}'`

[[ -z $khs ]] && khs=0
[[ -z $stats ]] && stats="null"

HiveOS command: agent-screen show statistic, but in RIG page only total Mh/s:

Wed Oct 10 13:48:59 EEST 2018
Hashrate custom 51940 kH/s

Wthat I do wrong ???

Link to custom sgminer GeekCash custom miner for HiveOS 2.0