Posted by cumlord in Coding (edited by a moderator )

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

Tool (pastebins)

privatebin.i2p link

cpaste.i2p link

3

Comments

You must log in or register to comment.

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.

2

cumlord OP wrote (edited by a moderator )

I have a project (that's tied into this) that I'm prioritizing for the moment, and will be making a more fleshed out version of this available soon after.

I want some more granular tools with individual torrents too, and some stats, so I'll see what i can do.

The transmission-rpc plugin works great for managing one snark at a time though.

1