xmr-node-proxy
xmr-node-proxy copied to clipboard
View all connected miners
Is there a way using pm2 to get a list of all connected miners and display their individual hash rate to the pool?
You can always use lsof
in Linux to look at connections on specific ports or from specific processes.
I ended up using iftop but would be cool to simply have a list via the proxy.
I agree this would be a very useful feature. It wold be nice if the "password" filed was used by the proxy ti identify the sub miners connected to it.
Would be great to have this and to see hash rate per miner
Expecting this feature also,because is impossible to track which miner have gone down or have problems.
You can enable debug by setting DEBUG=* env variable. And issue cat /home/nodeproxy/.pm2/logs/proxy-error-1.log | grep -Ee "diff.*?Hashes"
to check worker stats. Most unfortunately they are identified by id string, which doesn't means much to user. But I've modded proxy.js to include login & IP of the worker there. That way you can see stats like this:
2017-12-05 11:47 +03:00: Tue, 05 Dec 2017 08:47:35 GMT diff ID: ... Login: worker1-xmrig IP: X.X.X.X Hashes: 64100 in: 321 seconds gives: 199 hashes/second or: 5970 difficulty versus: 5970 Last share time:1512463611.202
Something like this proxy.js.diff.gz
I use wallet.worker-id login strings in my miners so this patch works for that format. You can change this.shortLogin with this.login and it will write full login string from a miner.
@Snipa22 is some plan of integrating this feature in future release what @passnet proposed, but in a standart format: MinerIdentifier : Email ?
UP
Very simple solution which periodically prints out connected miners (identified by password field) and their hashrate is here proxy.js.diff.zip
It is really just two lines of code, so it is very easy to modify it to print out whatever information you need.
Warning - it really prints one line per connected miner. So it is cool for playing around/debugging some low miner count, but 500 miners connected means 500 lines and total mess ;)