Closed jedimstr closed 10 years ago
Can you check what is returned by the cgminer api? You can use one of the api-example scripts in the cgminer repo.
Instead of trying to do it from the embedded Antminer OpenWRT OS with script, I just telnet'd to the 4028 socket for the Antminer S1 so I could grab the output easier.
Here are my results for summary and devs: {"command":"summary"}
{
"STATUS": [
{
"Code": 11,
"Description": "cgminer 3.12.0",
"Msg": "Summary",
"STATUS": "S",
"When": 1392294575
}
],
"SUMMARY": [
{
"Accepted": 8308,
"Best Share": 108758634,
"Device Hardware%": 0.3475,
"Device Rejected%": 4.4168,
"Difficulty Accepted": 1379981.16427392,
"Difficulty Rejected": 63744.14563903,
"Difficulty Stale": 0.0,
"Discarded": 2264,
"Elapsed": 30899,
"Found Blocks": 0,
"GHS 5s": 198.64,
"GHS av": 200.61,
"Get Failures": 0,
"Getworks": 1468,
"Hardware Errors": 5032,
"Last getwork": 1392294575,
"Local Work": 2023690,
"Network Blocks": 70,
"Pool Rejected%": 4.4153,
"Pool Stale%": 0.0,
"Rejected": 379,
"Remote Failures": 0,
"Stale": 0,
"Total MH": 6198539749.8205,
"Utility": 16.13,
"Work Utility": 2802.43
}
],
"id": 1
}
{"command":"devs"}
{
"DEVS": [
{
"ASC": 0,
"Accepted": 8273,
"Device Elapsed": 30951,
"Device Hardware%": 0.348,
"Device Rejected%": 4.4099,
"Diff1 Work": 1445483,
"Difficulty Accepted": 1374492.24840531,
"Difficulty Rejected": 63744.14563903,
"Enabled": "Y",
"Hardware Errors": 5048,
"ID": 0,
"Last Share Difficulty": 199.11716593,
"Last Share Pool": 0,
"Last Share Time": 1392294615,
"Last Valid Work": 1392294624,
"MHS 5s": 195597.7,
"MHS av": 200586.52,
"Name": "BMM",
"No Device": false,
"Rejected": 379,
"Status": "Alive",
"Temperature": 44.0,
"Total MH": 6208280735.6456,
"Utility": 16.04
}
],
"STATUS": [
{
"Code": 9,
"Description": "cgminer 3.12.0",
"Msg": "1 ASC(s)",
"STATUS": "S",
"When": 1392294624
}
],
"id": 1
}
Here's a reply from Kano in the BitcoinTalk Forums on the custom CGMiner version used in the Antminer S1 and the API issues I posted here.
This affects both the Last Time Share issue as well as the improper Hashrate display for summary command. https://bitcointalk.org/index.php?topic=28402.msg5155782#msg5155782
They feel the need to change the API.
They are morons.
It is not changed in master cgminer.
I have made sure that the cgminer API is backward compatible since I first wrote it.
The only things changed have been to remove CPU and GPU information (since they don't exist in cgminer)
Unfortunately, the idiots who make the Antminer, break this compatibility by changing names and values in the API in their clone of cgminer.
You will also find that they changed the name of the fields and values that report the hash rate in the summary.
So basically what it means is that either everyone who has ever written a program or script to access the API must modify their code to support these random needless changes, or tell them to stop fucking with the API and making it no longer compatible.
Edit: they were probably stupid enough to also not notice that STATUS->When is the time of the results - so the difference between 'When' and 'Last Share Time' will tell you how long ago it is if you want to display it differently ......... (as I already do in miner.php for 'Last Valid Work')
I have an Antminer S1 that I just added to my mining farm and set it up so I could monitor it from miner-dashboard. It uses version 3.8.5 of CGMiner on an embedded WRT setup.
The main big Hashrate display is blank for this miner even though hashrate is shown for the device list. It also doesn't apply to the revenue calculations because the hashrate is blank.