Bitcoin Forum
June 22, 2024, 05:38:17 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Bounty]How to make a program in C# that can retrive hash rate of cgminer  (Read 1065 times)
joey325 (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
March 12, 2014, 11:45:31 PM
 #1

I will give a bounty to anyone who can show me in C# how to receive that current hash rate of a CGMiner instance. thanks in advance!
jazarja
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
March 13, 2014, 12:07:07 AM
 #2

how much is the bounty?
furuknap
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250

http://coin.furuknap.net/


View Profile WWW
March 13, 2014, 12:08:33 AM
 #3

I will give a bounty to anyone who can show me in C# how to receive that current hash rate of a CGMiner instance. thanks in advance!

Is doing this through the RPC API acceptable? If so, it's a simple matter of reading some JSON. I could probably whip up an example for you.

.b

joey325 (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
March 13, 2014, 12:13:59 AM
 #4

I will give a bounty to anyone who can show me in C# how to receive that current hash rate of a CGMiner instance. thanks in advance!

Is doing this through the RPC API acceptable? If so, it's a simple matter of reading some JSON. I could probably whip up an example for you.

.b

Yeah that's fine. Let me know how much BTC is reasonable for the job. thanks for the quick response!
furuknap
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250

http://coin.furuknap.net/


View Profile WWW
March 13, 2014, 01:05:11 AM
 #5

I will give a bounty to anyone who can show me in C# how to receive that current hash rate of a CGMiner instance. thanks in advance!

Is doing this through the RPC API acceptable? If so, it's a simple matter of reading some JSON. I could probably whip up an example for you.

.b

Yeah that's fine. Let me know how much BTC is reasonable for the job. thanks for the quick response!

This isn't much of an effort because I had a few classes ready made. Please donate what you feel it's worth to you to Sean's Outpost at http://seansoutpost.com/donate/, they need it more than I do. Feel free to post the transaction after you donate, though :-)

I've uploaded a sample VS2013 project for you. You need to add JSON.NET from Nuget (or elsewhere) and please note that I only have a GPU rig available so you may need to create an ASIC and FPGA class similar to the GPU class I included. I've left some comments to indicate where. The format should be pretty straight forward and you can use the same pattern to pick up other properties from your devices too, like temperature, voltage, memory/GPU clock, etc.

https://mega.co.nz/#!U1AXRSQD!GEsYONyxidTWzY32zcM-S0b_PrmNVDJot77JbOPHkEw

No license or credit required, no support provided. It's all open-source and I've removed all built .exes. The file is about 8 kB.

If you don't have VS2013, just ignore the .sln file and open the csproj file in an earlier version. If you don't have any of those, all the class files are in the program.cs file.

.b

furuknap
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250

http://coin.furuknap.net/


View Profile WWW
March 19, 2014, 07:06:32 AM
 #6

You're quite welcome!

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!