Author

Topic: Help With API / Worker Activity Reporting (Read 1497 times)

member
Activity: 84
Merit: 10
June 19, 2011, 05: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).
newbie
Activity: 51
Merit: 0
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.
Jump to: