how do i use the --api and view it?
The information that you need to read the API information is found in the Help.txt file.
API Description.
Api establish the tcp connection and send through it json data, like a stratum protocol.
Every json request and response must be ended with new line symbol \n, this symbol used
as a sign of data end.
Request example: {"id":1, "method":"getstat"}\n
Respond example: {"id":1, "method":"getstat", "error":null, "result":[{
"gpuid":0,
"cudaid":0,
"busid":"0000:01:00.0",
"gpu_status":2,
"solver":0,
"temperature":64,
"gpu_power_usage":150,
"speed_sps":420,
"accepted_shares":1000,
"rejected_shares":1
},{
"gpuid":1,
"cudaid":1,
"busid":"0000:04:00.0",
"gpu_status":2,
"solver":0,
"temperature":70,
"gpu_power_usage":100,
"speed_sps":410,
"accepted_shares":1111,
"rejected_shares":2
}
]}\n
Method getstat:
Request parameters:
id optional, type: unsigned int, response will be have this id.
method required, type: string, method name
Response parameters:
id type: unsigned, id from request or 0 in other case.
method type: string, method name
error type: null, string, null if no error otherwise message
result type: array of objects, array contain objects by one for each gpu
result[0].gpuid type: unsigned, internal gpu identifier
result[0].cudaid type: unsigned, gpu cuda identifier
result[0].busid type: string, pci bus id in format: 0000:00:00.0
result[0].gpu_status type: unsigned, status of gpu
0 - gpu launched, but not yet work,
1 - gpu launched, but he prepare to work, for example execute benchmark.
2 - gpu works
3 - GPU stopped, for example, a temperature limit is reached
result[0].solver type: unsigned, selected solver
result[0].temperature type: integer, gpu core temperature
result[0].gpu_power_usage type: unsigned, gpu power usage in watts, not all devices support this in this case this value will be 0
result[0].speed_sps type: unsigned, gpu performance in solutions per seconds
result[0].accepted_shares type: unsigned, amount of accepted shares
result[0].rejected_shares type: unsigned, amount of rejected shares
Remark: temperature, gpu_power_usage and speed_sps updated every 30 seconds.
At this moment supported only one method "getstat".
You will need to write some sort of software interface to use the information from the API.