Bitcoin Forum
May 12, 2024, 10:24:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help With API / Worker Activity Reporting  (Read 1479 times)
kernelpanic (OP)
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
June 19, 2011, 03:44:42 AM
 #1

I am using a pool and I want to report statistics for each worker over a specific period of time, for example one week or one month.  Ideally this would include hash rate and activity over time.  I would like to display this data on a web page.

I am currently using btcguild.  There are some usable stats there, but that would require manually reseting them at intervals and manually extracting the data.  To automate this I am assuming I need to use the API (theirs seems to be offline right now) and poll at intervals and record the data.

Are there any precanned tools out there that will do this for me?  I've seen several that provide balance, etc, but no worker level reporting.  I'm not even sure that's reported in the API.

I started my foray into the API by attemping to use cURL (against my local bitcoin server) as described here:

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Command_line_(cURL)

But that code doesn't seem to work.  Looks like there is a syntax problem and perhaps other issues as well:

curl --user MyUserName --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl: (6) Could not resolve host: 1.0,; No data record of requested type
curl: (6) Could not resolve host: id; No data record of requested type
curl: (6) Could not resolve host: method; No data record of requested type
curl: (6) Could not resolve host: getinfo,; No data record of requested type
curl: (6) Could not resolve host: params; No data record of requested type
curl: (3) [globbing] illegal character in range specification at pos 2
curl: (3) [globbing] unmatched close brace/bracket at pos 1
curl: (6) Could not resolve host: text; No data record of requested type
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

Yes, I am new to BTC and mining.

Thanks in advance for any advice.
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715509484
Hero Member
*
Offline Offline

Posts: 1715509484

View Profile Personal Message (Offline)

Ignore
1715509484
Reply with quote  #2

1715509484
Report to moderator
1715509484
Hero Member
*
Offline Offline

Posts: 1715509484

View Profile Personal Message (Offline)

Ignore
1715509484
Reply with quote  #2

1715509484
Report to moderator
Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
June 19, 2011, 10:47:06 AM
 #2

I am using a pool and I want to report statistics for each worker over a specific period of time, for example one week or one month.  Ideally this would include hash rate and activity over time.  I would like to display this data on a web page.

This all depends on what you want to achieve.  If you want to know the getworks, stales, invalids, and accepted shares for your workers, you can log each of them to a log and then parse that log with a script to provide you stats.

However, those stats won't reveal how you're doing in relation to your pool.  Only what your workers perception of their tasks is.

If you want worker stats as they relate to the Pool, you have to use the pools APIs and pull them (if they provide them).

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
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!