Page 1 of 1

Tor: Accounting?

Posted: 2010-01-20 20:25
by chris2000
Hallo,

TOR unterstützt Traffic-Begrenzung. Kann man irgendwie auslesen, wieviel Traffic er bereits verbraucht hat? Ich vermute, man müsste BWHistoryWriteValues und BWHistoryReadValues aus /var/lib/tor/state aufaddieren? Gibt's da auch eine fertige Funktion dazu?

Danke.


Stichwörter für Suche: Onion Router, TOR

Re: Tor: Accounting?

Posted: 2010-01-20 20:57
by Joe User
https://www.torproject.org/tor-manual.html.en wrote: DataDirectory/state
A set of persistent key-value mappings. These are documented in the file. These include:

- The current entry guards and their status.
- The current bandwidth accounting values (unused so far; see below).
- When the file was last written
- What version of Tor generated the state file
- A short history of bandwidth usage, as produced in the router descriptors.

DataDirectory/bw_accounting
Used to track bandwidth accounting values (when the current period starts and ends; how much has been read and written so far this period). This file is obsolete, and the data is now stored in the 'state' file as well. Only used when bandwidth accounting is enabled.
Demnach liegst Du richtig mit Deiner Vermutung. Das Addieren der beiden Werte sollte ja kein Problem sein...

Re: Tor: Accounting?

Posted: 2010-01-20 21:41
by chris2000
Ok. Ich dachte vielleicht hat sich jemand schon ein elegantes Auswerte-Script, auch über mehrere Perioden, geschrieben. Wenn nicht werde ich das mal machen...