Author

Topic: VB .Net pull hashrate from CGMiner (Read 1747 times)

hero member
Activity: 840
Merit: 1002
January 18, 2014, 03:34:51 PM
#4
It looks like everything in it has to do with bfgminer. Do I just change anything that says bgminer to cgminer? Or is there something else that I need to change?

The Xgminer API Assembly has nothing specific to bfgminer in it. The example code does use bfgminer though.
newbie
Activity: 6
Merit: 0
January 18, 2014, 03:01:34 PM
#3
It looks like everything in it has to do with bfgminer. Do I just change anything that says bgminer to cgminer? Or is there something else that I need to change?
hero member
Activity: 840
Merit: 1002
January 18, 2014, 02:21:31 PM
#2
You can use this .NET assembly to interact with the RPC API in both bfgminer and cgminer:

https://github.com/nwoolls/MultiMiner/tree/master/MultiMiner.Xgminer.Api

There's some example code here:

https://github.com/nwoolls/MultiMiner/blob/master/MultiMiner.Api.Example/Program.cs

It's Open Source, has a lot of use and testing, and pull requests are welcome.
newbie
Activity: 6
Merit: 0
January 18, 2014, 02:17:23 PM
#1
I am trying to either use VB .Net to connect via a socket to CGMiner and pull just the hashrate in kh/s. I have only one GPU attached that I need it from. I would want to get it quite frequently if possible but I have no idea how to. The rest of my program is made (vb app to pull information about balances and such and sends it to arduino to be displayed on a 3.2in tft lcd). This is just the one part I am missing. The one thing I have noticed is that the hashrate displayed in CGminer is in kh and updated extremely often with good accuracy, but the api only shows in mh and practically never changes or atleast I never have seen it change.


Is there any info that you guys can give to have the api display in kh or somehow hook into cgminers window and retrieve the hashrate with good accuracy? I also have no idea how to parse the information retrieved from the summary command in vb .net, so any kind of information or help with that would be appreciated.


Thank you very much for your time
Jump to: