Bitcoin Forum
November 06, 2024, 02:45:33 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: XML-RPC interface for phoenix allows monitoring  (Read 3840 times)
thejfk (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 27, 2011, 05:48:46 PM
Last edit: August 18, 2011, 08:50:40 PM by thejfk
 #1

I wrote a small patch for phoenix that adds support for querying the current hash rate, the amount of accepted and rejected results and the timestamp of the last result through an XML-RPC interface. Thus you can monitor phoenix in monitoring solutions like ganglia, munin, cacti or nagios. As of now it can only applied to the Linux version of phoenix, if somebody is interested to have that on Windows I'd look into it.

The patch for 1.50 is available at http://robertlacroix.com/files/phoenix-xmlrpc.diff and has to be applied to phoenix 1.50 with

Code:
# patch -p0 < phoenix-xmlrpc.diff

The patch is also available for 1.6.2 at http://robertlacroix.com/files/phoenix-1.6.2-xmlrpc.diff and has to be applied to the latest GitHub checkout phoenix 1.6.2 with

Code:
# patch -p0 < phoenix-1.6.2-xmlrpc.diff

Afterwards with the optional parameter -x [xmlrpcport] you can specify on which port phoenix should listen for XML-RPC requests. It binds to 127.0.0.1 and can only be queried locally. For security reasons I think that's fine for now and ganglia and munin query those things locally anyways.

http://robertlacroix.com/files/queryPhoenix.py allows you to query phoenix using queryPhoenix.py <xmlrpcport> <command> then.

Code:
Available commands:

# queryPhoenix.py <xmlrpcport> getrate      #queries the current hash rate
# queryPhoenix.py <xmlrpcport> getaccepted  #queries the amount of accepted results
# queryPhoenix.py <xmlrpcport> getrejected  #queries the amount of rejected results
# queryPhoenix.py <xmlrpcport> getlastfound #queries the time of last result (unix timestamp, accepted or rejected)
     to convert that timestamp to a string pipe it through # awk '{print strftime("%c",$1)}'

Used with munin, it creates those beautiful graphs of your hashing power:

http://robertlacroix.com/files/phoenixhashrates-day.png

If you like my work, please donate to 1EhQ1dbeZnxs7wZKngegsHLheAjUK37k7m.

/Robert
Reikoku
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 27, 2011, 07:04:38 PM
 #2

I'm very impressed with this, and would love to see addition of accepted/declined shares.

I am planning to implement your script in Autominer v0.3.1 to add miner hashrates to the main screen.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
entens
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
June 27, 2011, 07:55:03 PM
 #3

XML-RPC should be a defacto standard in all miners! I'd also like to see JSON-RPC as it seems to be the protocol favored by the majority of bitcoin projects. I patched guiminer, but I'm now thinking it would be better to implement directly in phoenix/poclbm (https://github.com/entens/poclbm/commit/7420e4560ae5517b01d0a758b15b16a6874cba4d#guiminer.py).
gigica viteazu`
Sr. Member
****
Offline Offline

Activity: 458
Merit: 250

beast at work


View Profile
June 27, 2011, 08:50:20 PM
 #4

if somebody is interested to have that on Windows I'd look into it.

this will be great on Windows too Smiley
PcChip
Sr. Member
****
Offline Offline

Activity: 418
Merit: 250


View Profile
June 27, 2011, 08:51:10 PM
 #5

Of course we want Windows support!

All my miners (and many others) are running Windows (1100 MH/s from 4 cards)

Legacy signature from 2011: 
All rates with Phoenix 1.50 / PhatK
5850 - 400 MH/s  |  5850 - 355 MH/s | 5830 - 310 MH/s  |  GTX570 - 115 MH/s | 5770 - 210 MH/s | 5770 - 200 MH/s
thejfk (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 28, 2011, 05:49:25 PM
 #6

I will check out both Windows support and more counters this weekend.
Reikoku
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 28, 2011, 07:02:45 PM
 #7

I have implemented this in Autominer 0.3.2, see sig.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
thejfk (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
July 02, 2011, 04:34:32 PM
 #8

Updated to add the promised counters!
drgr33n
Sr. Member
****
Offline Offline

Activity: 308
Merit: 251



View Profile
July 05, 2011, 03:29:19 PM
 #9

Hey guys

I can seem to download the patch  ? wget gets to 77% then stops ?
thejfk (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
July 05, 2011, 07:51:09 PM
 #10

Hmmm, it works fine for me!? Do you still have the problem?
cottoneyeJoe
Member
**
Offline Offline

Activity: 91
Merit: 10


View Profile
July 07, 2011, 03:28:46 AM
 #11

Cool beans. I'll have to check it out. I've been running poclbm and this gives me another reason to try phoenix.

Meanwhile, I have implemented my own RRD feeder by tailing the poclbm verbose output to a python script that sends stuff from multiple miner rigs to an RRDCached daemon I run on another box.

I was new to RRD and got things going pretty well but couldnt get a legend all lined up like you are showing there.

Would you mind sharing/posting the RRD script youre using to get the legend in colums like that. GPPRINT new line and column aligment wasnt nice to me.

TIA & nice work.
Kris
Donator
Hero Member
*
Offline Offline

Activity: 640
Merit: 500


View Profile
July 07, 2011, 03:41:34 AM
 #12

Fine work indeed thejfk, I will see if I can incorporate this into my monitoring site, for faster updates of hashrate, shares and stales information from phoenix.

If I use it, and it proves better then my current solutions, you can bet on me donating.

Kind regards
Kris
thejfk (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
July 07, 2011, 08:18:09 AM
 #13

@cottoneyeJoe I didn't tinker with RRDTool directly and used munin instead! Check out http://forum.bitcoin.org/index.php?topic=10233.0 for more information.
inh
Full Member
***
Offline Offline

Activity: 155
Merit: 100


View Profile
July 31, 2011, 03:04:16 AM
 #14

Thank you for this!
inh
Full Member
***
Offline Offline

Activity: 155
Merit: 100


View Profile
August 16, 2011, 10:26:48 PM
 #15

Can you update this for phoenix 1.6 please?
thejfk (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
August 18, 2011, 08:51:23 PM
 #16

Updated for 1.6.2
deti
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile WWW
August 28, 2011, 10:45:14 PM
 #17

Used with munin, it creates those beautiful graphs of your hashing power:


How did you configure munin to show this graph?

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!