Last active
August 29, 2015 14:01
-
-
Save micdenny/ba413eaa6c087434e3c4 to your computer and use it in GitHub Desktop.
CGMiner Api Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"STATUS": [ | |
{ | |
"STATUS": "S", | |
"When": 1398579537, | |
"Code": 9, | |
"Msg": "2 ASC(s)", | |
"Description": "cgminer 4.3.0" | |
} | |
], | |
"DEVS": [ | |
{ | |
"ASC": 0, | |
"Name": "BA1", | |
"ID": 0, | |
"Enabled": "Y", | |
"Status": "Alive", | |
"Temperature": 0.00, | |
"MHS av": 203352.54, | |
"MHS 5s": 204887.14, | |
"MHS 1m": 187347.65, | |
"MHS 5m": 80498.25, | |
"MHS 15m": 31437.55, | |
"Accepted": 34, | |
"Rejected": 0, | |
"Hardware Errors": 0, | |
"Utility": 13.50, | |
"Last Share Pool": 2, | |
"Last Share Time": 1398579531, | |
"Total MH": 30734332.0000, | |
"Diff1 Work": 7293, | |
"Difficulty Accepted": 8704.00000000, | |
"Difficulty Rejected": 0.00000000, | |
"Last Share Difficulty": 256.00000000, | |
"Last Valid Work": 1398579537, | |
"Device Hardware%": 0.0000, | |
"Device Rejected%": 0.0000, | |
"Device Elapsed": 151 | |
}, | |
{ | |
"ASC": 1, | |
"Name": "BA1", | |
"ID": 1, | |
"Enabled": "Y", | |
"Status": "Alive", | |
"Temperature": 0.00, | |
"MHS av": 203324.12, | |
"MHS 5s": 206858.02, | |
"MHS 1m": 187478.02, | |
"MHS 5m": 80501.11, | |
"MHS 15m": 31435.01, | |
"Accepted": 27, | |
"Rejected": 0, | |
"Hardware Errors": 0, | |
"Utility": 10.72, | |
"Last Share Pool": 1, | |
"Last Share Time": 1398579537, | |
"Total MH": 30730036.0000, | |
"Diff1 Work": 7342, | |
"Difficulty Accepted": 6912.00000000, | |
"Difficulty Rejected": 0.00000000, | |
"Last Share Difficulty": 256.00000000, | |
"Last Valid Work": 1398579537, | |
"Device Hardware%": 0.0000, | |
"Device Rejected%": 0.0000, | |
"Device Elapsed": 151 | |
} | |
], | |
"id": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var client = new TcpClient("192.168.1.6", 4028); | |
using (var stream = client.GetStream()) | |
{ | |
using (var reader = new StreamReader(stream)) | |
{ | |
var data = System.Text.Encoding.ASCII.GetBytes("{\"command\":\"summary\",\"parameter\":\"\"}"); | |
stream.Write(data, 0, data.Length); | |
var response = reader.ReadLine(); | |
response.Dump(); | |
stream.Close(); | |
} | |
} | |
client.Close(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"STATUS": [ | |
{ | |
"STATUS": "S", | |
"When": 1398579661, | |
"Code": 11, | |
"Msg": "Summary", | |
"Description": "cgminer 4.3.0" | |
} | |
], | |
"SUMMARY": [ | |
{ | |
"Elapsed": 276, | |
"MHS av": 407085.30, | |
"MHS 5s": 407970.64, | |
"MHS 1m": 403771.37, | |
"MHS 5m": 244852.94, | |
"MHS 15m": 107449.80, | |
"Found Blocks": 0, | |
"Getworks": 3, | |
"Accepted": 93, | |
"Rejected": 0, | |
"Hardware Errors": 0, | |
"Utility": 20.24, | |
"Discarded": 127, | |
"Stale": 0, | |
"Get Failures": 0, | |
"Local Work": 26380, | |
"Remote Failures": 0, | |
"Network Blocks": 1, | |
"Total MH": 112255901.0000, | |
"Work Utility": 5779.04, | |
"Difficulty Accepted": 23808.00000000, | |
"Difficulty Rejected": 0.00000000, | |
"Difficulty Stale": 0.00000000, | |
"Best Share": 19344, | |
"Device Hardware%": 0.0000, | |
"Device Rejected%": 0.0000, | |
"Pool Rejected%": 0.0000, | |
"Pool Stale%": 0.0000, | |
"Last getwork": 1398579661 | |
} | |
], | |
"id": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment