[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Script for traffic stats?
Markus Bjorklof wrote:
>> Markus Bjorklof wrote:
>>> Has anyone got a simple script that uses rrd to show Tor-servers
>>> traffic? I'm currently using a perl script that gets it's data from
>>> bw_accounting (not a good idea anymore).
>> I use mrtg with bw_accounting.
>> Why is that not a good idea?
>
>
> - From http://archives.seul.org/or/talk/May-2007/msg00115.html
>
> "Probably a bad idea; that file is deprecated in 0.1.2.x and later in
> favor of the state file."
>
> Also when AccountingMax is defined the Tor server does not advertise the
> dirport.
So we might need, for mrtg, stuff like:
######################################################################
# #
# this is the tor traffic #
# #
######################################################################
Target[tor]: `/bin/echo -en "authenticate\r\ngetinfo
accounting/bytes\r\nquit\r\n" |/usr/bin/nc localhost 9051|/bin/awk
'/250-accounting.bytes=/ {gsub("250-accounting/bytes=","");print $1;
print $2}'`
Options[tor]: noinfo, growright, transparent, nopercent
MaxBytes[tor]: 1250000
AbsMax[tor]: 1250000
kilo[tor]: 1024
YLegend[tor]: Bytes per second
ShortLegend[tor]: B/s
Legend1[tor]: Incoming Traffic in Bytes per second
Legend2[tor]: Outgoing Traffic in Bytes per second
Legend3[tor]: Maximal 10 Minute Incoming Traffic
Legend4[tor]: Maximal 10 Minute Outgoing Traffic
LegendI[tor]: In:
LegendO[tor]: Out:
TimeZone[tor]: Europe/Amsterdam
Title[tor]: tor traffic
PageTop[tor]: <H2>Tor traffic</H2>
######################################################################
?