Python tool for monitoring snark instances and sending stop/start commands. It needs BeautifulSoup for parsing the webpage, only tested on Snark+ standalone.
It was made as part of a cli multi-tool for automated torrent creation. The main tool has been crashing after giving it a ssh-port forwarding manager (for managing multi router/snark setups), so I ripped out just the snark parsing/command part
Mainly I wanted to do autoload balancing by starting/stopping the next snark in the list and maybe keep some stats, not sure where the sweet spot is yet.
How to use
If you do:
snarkurl = ['127.0.0.1:8002', '127.0.0.1:8003']
Then set:
snarking = Snark(snarkurl)
snarking.upspeed[0]
= upload speed in K/s for snark on port 8002.
other info you can pull that way:
- upspeed / downspeed
- peer_connections / dht_peers
- tunnels_in / tunnels_out
- color (changes the color of up/downspeed for cli implementation with for use with rich)
- online (bol)
- stalled (True if snark is reachable but stopped)
- nonce
Start/ stop commands:
Bottom has examples for sending start/stop commands to all snarks
NotQball wrote
I will wait for a more mature/developed tool that has alarms and monitoring of torrents. Ideally it will monitor torrents and have some kind of configurable actions. It would be like a stock (stockmarket) chart analysis tool. Start (buy), Stop (hold), Delete the evidence (unusual patterns). I like to start simple... but it is always complicated.