Open Angel996 opened 5 years ago
NTMiner read miner hashrate, accept/reject share from logfile,because not every miner have a api,but it must output log
Total Speed: (?
@Angel996
In powershell you can read from the API just fine:
$Server = "localhost"
$Timeout = 5 #seconds
$Request = ""
$Response = ""
$HashRate = [PSCustomObject]@{}
try {
$Response = Invoke-WebRequest "http://$($Server):$($this.Port)/stat" -UseBasicParsing -TimeoutSec $Timeout -ErrorAction Stop
$Data = $Response | ConvertFrom-Json -ErrorAction Stop
}
catch {
return @($Request, $Response)
}
$HashRate_Name = [String]($this.Algorithm | Select-Object -Index 0)
Code snipped taken from https://github.com/UselessGuru/MultiPoolMiner/blob/master/MultiPoolMiner/APIs/Gminer.ps1
Anyone attempt something similar in Linux? Curl & wget also return empty, would be nice if there was an actual API behind the web interface.
In case anyone stumbles on this in the future, I was able to get some content pulled from the web interface using BeautifulSoup in Python3. Code & context available here.
Hello.
Is it possible to have a "classic" TCP API connection to read miner stats, hashrate, for example? Claymore miner style, JSON, or anything? This miner only has http interface and it's updated dynamically, I can't read anything from that...
thank you.