Comment
Author: Admin | 2025-04-28
Mining pool for stats (Not sure about that, i do not really found a clean way getting that to the api)To be discussed: Add support for miner_rebootCode Notes:I separated Api and ApiServer to possible add different API Modes in the future (JSON-RPC now, maybe HTTP Later)I included parts of the libjson-rpc-cpp Library, the tcpserversocket stuff to be correct, because while its possible to enable the server in the cmake file, it does not compile at least on windows due to MSVC.Samples:Json RPC raw messages:{"method": "miner_getstat1", "jsonrpc": "2.0", "id": 5 }and{"method": "miner_restart", "jsonrpc": "2.0", "id": 5 }via Netcat:echo '{"method": "miner_getstat1", "jsonrpc": "2.0", "id": 5 }' | nc x.x.x.x 3333via CURL:echo '{"method": "miner_getstat1", "jsonrpc": "2.0", "id": 5 }' | curl telnet://x.x.x.x:3333Results"9.3 - ETH" - miner version."21" - running time, in minutes."182724" - total ETH hashrate in MH/s, number of ETH shares, number of ETH rejected shares."30502;30457;30297;30481;30479;30505" - detailed ETH hashrate for all GPUs."0;0;0" - total DCR hashrate in MH/s, number of DCR shares, number of DCR rejected shares."off;off;off;off;off;off" - detailed DCR hashrate for all GPUs."53;71;57;67;61;72;55;70;59;71;61;70" - Temperature and Fan speed(%) pairs for all GPUs."eth-eu1.nanopool.org:9999" - current mining pool. For dual mode, there will be two pools here."0;0;0;0" - number of ETH invalid shares, number of ETH pool switches, number of DCR invalid shares, number of DCR pool switches.
Add Comment