martinm (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
June 05, 2013, 03:58:45 PM |
|
Hi, I'm developing a windows service that controls/monitors the above mentioned mining applications by their API. Currently I facing the problem that I have to map the information that I receive from "dev" command to the information I received from "devdetails". As reponse of "devdetails" I get an unique ID, but how I can identify which device is the related in the "dev" response? I could imagine it would be possible to bypass the problem by first receiving all devices from the "devdetails" command, and then to request the information explicit by "gpu"/"cpu"/"pga" and the ID I received from "devdetails" command. Unfortunately I have no possibilities for testing it as I don't have multiple mining devices. Some advice would be highly appreciated.
Thank you very much in advance!
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
af_newbie
Legendary
Offline
Activity: 2688
Merit: 1468
|
|
June 05, 2013, 06:46:49 PM |
|
Hi, I'm developing a windows service that controls/monitors the above mentioned mining applications by their API. Currently I facing the problem that I have to map the information that I receive from "dev" command to the information I received from "devdetails". As reponse of "devdetails" I get an unique ID, but how I can identify which device is the related in the "dev" response? I could imagine it would be possible to bypass the problem by first receiving all devices from the "devdetails" command, and then to request the information explicit by "gpu"/"cpu"/"pga" and the ID I received from "devdetails" command. Unfortunately I have no possibilities for testing it as I don't have multiple mining devices. Some advice would be highly appreciated.
Thank you very much in advance!
I use sprintf_s(command, sizeof(command), "{ \"command\" : \"pga\" , \"parameter\" : \"%d\" }", pga); sprintf_s(command, sizeof(command), "{ \"command\" : \"gpu\" , \"parameter\" : \"%d\" }", gpu); to get device stats and to get number of devices: strcpy_s(command, sizeof(command), "{ \"command\" : \"config\" }"); Not sure if that is what you want. Take a look at my akbash code if you like.
|
|
|
|
martinm (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
June 06, 2013, 11:41:04 AM |
|
My intention was to find the way to map/link the devices received from "dev" command to the devices received from "devdetails" command. Both commands reply an array of devices that should includes all connected devices to the miner and not just one like the "pga" "gpu" command. However, I now use the way to get all devices from "devdetails" and then request the additional data by the "cpu","gpu","pga" command.
|
|
|
|
turtle83
|
|
June 06, 2013, 12:40:25 PM |
|
My intention was to find the way to map/link the devices received from "dev" command to the devices received from "devdetails" command. Both commands reply an array of devices that should includes all connected devices to the miner and not just one like the "pga" "gpu" command. However, I now use the way to get all devices from "devdetails" and then request the additional data by the "cpu","gpu","pga" command.
both dev and devdetails have the ID paramater.
|
|
|
|
martinm (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
June 06, 2013, 01:15:46 PM |
|
Hi, I'm developing a windows service that controls/monitors the above mentioned mining applications by their API. Currently I facing the problem that I have to map the information that I receive from "dev" command to the information I received from "devdetails". As reponse of "devdetails" I get an unique ID, but how I can identify which device is the related in the "dev" response? I could imagine it would be possible to bypass the problem by first receiving all devices from the "devdetails" command, and then to request the information explicit by "gpu"/"cpu"/"pga" and the ID I received from "devdetails" command. Unfortunately I have no possibilities for testing it as I don't have multiple mining devices. Some advice would be highly appreciated.
Thank you very much in advance!
In the response for "devdetails" I get the property "ID" for every device. For my GPU its 0. Where do you see the ID in the response for dev command? {"command":"dev"} {"STATUS":[{"STATUS":"S","When":1369551768,"Code":9,"Msg":"1 GPU(s) - 0 ASC(s) - 0 PGA(s) - ","Description":"cgminer 3.1.1"}],"DEVS":[{"GPU":0,"Enabled":"Y","St atus":"Alive","Temperature":0.00,"Fan Speed":0,"Fan Percent":0,"GPU Clock":0,"Me mory Clock":0,"GPU Voltage":0.000,"GPU Activity":0,"Powertune":0,"MHS av":63.17, "MHS 5s":63.27,"Accepted":122,"Rejected":0,"Hardware Errors":0,"Utility":0.83,"I ntensity":"D","Last Share Pool":0,"Last Share Time":1369551716,"Total MH":556876 .3003,"Diff1 Work":122,"Difficulty Accepted":122.00000000,"Difficulty Rejected": 0.00000000,"Last Share Difficulty":1.00000000,"Last Valid Work":1369551715}],"id ":1}
|
|
|
|
af_newbie
Legendary
Offline
Activity: 2688
Merit: 1468
|
|
June 06, 2013, 02:31:19 PM |
|
My intention was to find the way to map/link the devices received from "dev" command to the devices received from "devdetails" command. Both commands reply an array of devices that should includes all connected devices to the miner and not just one like the "pga" "gpu" command. However, I now use the way to get all devices from "devdetails" and then request the additional data by the "cpu","gpu","pga" command.
Martin, config command will give you number of devices (N) for each type, then just loop 0 to N and call cpu, gpu or pga command. You don't need device "ID". They are numbered 0 to N. You can map them to whatever you like in your program.
|
|
|
|
|
martinm (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
June 06, 2013, 03:55:31 PM |
|
Great! Thank you very much
|
|
|
|
dbaicz
Newbie
Offline
Activity: 16
Merit: 0
|
|
June 15, 2014, 05:34:33 PM |
|
Hi everybody! I'm working on some web interface for bfgminer using API and I can't to figure how I can get information which pool is actually used for mining. There is not such information in POOLS, SUMMARY, STATS etc. Could anyone advise me?
|
|
|
|
bhai
Member
Offline
Activity: 93
Merit: 10
|
|
June 24, 2014, 07:32:18 PM |
|
Im no devver but did you read the API-README: https://github.com/ckolivas/cgminer/blob/master/API-READMEIt has all the API calls that are supported and [correct me if Im wrong] bfgminer should have the same API calls. Also in the cgminer repo there is a few api-example.X to get you going. rgdz, bhai
|
|
|
|
|