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