1

I am trying to combine information I found here on the Unix & Linux Stack with I Wim Leers' rutorrent-stats

I have some experience with coding simple websites and while I am by no means a programmer, and I can often understand enough of scripts I find to repurpose them. Anyway, I’m having trouble getting started and I could some some help!

I have two seedboxes running ruTorrent from the same host (different servers though, if it matters) I would like to use rutorrent-stats (or something like it) to perform the following tasks:

  1. Query each slot at regular intervals (maybe every 12 hours) for the following values: A. Total amount uploaded. B. Total amount downloaded. C. Overall seed ratio
  2. Add each of the above values from both slots together.
  3. Save these values as text to a folder in the server's root-directory (doesn’t matter which slot).
  4. Using ImageMagick, save this text document as a “stats.png" in the server’s public www-directory.
  5. Each time the script runs, the last step would overwrite the image so values remain up-to-date.

This will allow me to display my stats use img src, an unchanging file-path, and it will always be current—particularly helpful in forums and message boards when only text and images can be used as my user signature

Can someone help? If this involves more work than I'm imagining it should, I'd be willing to hire someone to script it for me. If that is the case, send me an email.

I posted in this Stack because that’s where I found the ImageMagick post, but if StackOverflow would be a better place to ask, let me know!

Thanks in advance!

  • If you're struggling to get started with scripting it might be better to try to write the script yourself (using some basic tutorial) and then ask about the pieces that are not working. You already divided the problem into steps, that's very good (I know of programmers that cannot divide a problem properly). I'll argue that you should try to write a small script for each of the 5 points and then ask on how to join them together. – grochmal Jul 04 '16 at 00:19
  • Good to know, should I do that here and add it to my question, or ask it somewhere else? – Moscarda Jul 04 '16 at 00:27
  • Where might I find tutorials on coding one or more scripts for the steps outlined? I am a Mac user with no experience with Unix/Linux and I just don't know where to begin. I can install Debian apps on my slot, perhaps some steps can be accomplished this way without needing to script everything from scratch. – Moscarda Jul 04 '16 at 00:35
  • The tldp guide is very dated but will walk you through every little step, and very slowly. Although you will need to be patient to read it all. – grochmal Jul 04 '16 at 00:43
  • Ok thanks again. Since it will take me some time should I delete my question or ask that it be put on hold? And do you know if there are any Debain apps that could accomplish any of my 5 steps? – Moscarda Jul 04 '16 at 01:24
  • If it takes you more than a year the question will be automatically deleted, otherwise it will be bumped into the active pane once you edit it. From existing apps you already know about imagemagick, the remaining points are pretty much tasks for shell loops with some shell built-ins. Just one thing you will likely need is cron, to run a script at regular intervals. – grochmal Jul 04 '16 at 01:29
  • you might look at the rrdtool which is a package on debian to gather stats and present graphs. – meuh Jul 05 '16 at 16:16

0 Answers0