[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: New GETINFO option, "bytes"



Thanks Anders! You're right - this is a highly requested piece of information (dozens of times at least this year). If this makes it into the control spec it might be nice to include an option for the total bytes downloaded/uploaded verses since the last reset (sighup). Regardless, keeping my fingers cross that something like this makes it in. Cheers! -Damian

PS. This option was included in a proposal that's currently in limbo, which might give a possible option name:
http://archives.seul.org/or/dev/Mar-2010/msg00009.html

On Tue, Mar 23, 2010 at 4:20 PM, Anders Andersson <pipatron@xxxxxxxxx> wrote:
Hi. I added a new option for GETINFO, that will return the total
number of bytes that's gone through Tor since process startup. Just
exporting the internal stats_n_bytes_read/written.

This is very useful for retrieving statistics like bandwidth over
time, for use with tools like arm, vidalia, munin, and other
monitoring applications. The current method that use events is
difficult to use, since you have to listen all the time. With the new
method you can for example poll every minute to see how many bytes was
transferred in total since last you checked.

I wrote a plugin for munin that use this new feature, and it works great.

The patch is trivial, and you probably want to change the name of the
command if you want to use it. There might also be reasons that you
don't want to export and print uint64_t variables. I didn't take time
to check any tor internals guidelines.

// pipe