Torrentcheck

This isn't actually a release-quality program on its own, but rather an example of they way things are done on Unix. Each and every utility I use here obeys the good old rule: do one thing, and do it well.

Operation

Torrentcheck is a program that scans all rtorrent processes running on the system and reports the download/upload settings of each of them. However, instead of checking the real bandwidth used by the user/process, it does some black magic and trickery: connects to the process with gdb and retrieves the data by calling the apropriate C++ language functions:

call _ZN7torrent11up_throttleEv()
call _ZN7torrent13down_throttleEv()

The ugly notation is an unfortunate side effect of C++ name mangling - the original function names probably looked something like torrent::up_throttle() and torrent::down_throttle(). Still, the script worked very well at the time I used it.

Screenshots

Sample program use:

I added coloring support some time ago, but I can't find the sources. All that was left is a screenshot made on a real system with multiple users:

Download