Post
Topic
Board Mining software (miners)
XML-RPC interface for phoenix allows monitoring
by
thejfk
on 27/06/2011, 17:48:46 UTC
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 then.

Code:
Available commands:

# queryPhoenix.py getrate      #queries the current hash rate
# queryPhoenix.py getaccepted  #queries the amount of accepted results
# queryPhoenix.py getrejected  #queries the amount of rejected results
# queryPhoenix.py 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