[tor-relays] Script to get top relays, AS and countries weights

Karsten Loesing karsten at torproject.org
Fri Jul 20 14:31:48 UTC 2012


Hi delber,

On 7/17/12 11:10 AM, Karsten Loesing wrote:
> On 7/16/12 5:54 PM, delber wrote:
>> While preparing another batch of stats on french relays [1], I made
>> a few other fixes to the script that you can pull from the same place as
>> before.
> 
> Thanks, merged! :)

I made a couple more changes to the script.  We could clean up the code
a bit and improve the documentation, but I consider the script pretty
much feature-complete now.  Yay! :)

Next step is to find a good product name.  "tor-relays-stats" doesn't
say very much and is hard to remember.  How about Compass?  (Think:
supplemental tool to Atlas to navigate the Tor network.)

Here's the script, in case others want to try it out:

https://gitweb.torproject.org/metrics-tasks.git/blob_plain/HEAD:/task-6329/tor-relays-stats.py

And here's the usage output:


Usage: tor-relays-stats.py [options]

Options:
  -h, --help            show this help message and exit
  -d, --download        download details.json from Onionoo service

  Filtering options:
    -a AS, --as=AS      select only relays from autonomous system number AS
    -c CC, --country=CC
                        select only relays from country with code CC
    -e, --exits-only    select only relays suitable for exit position
    -g, --guards-only   select only relays suitable for guard position

  Grouping options:
    -A, --by-as         group relays by AS
    -C, --by-country    group relays by country

  Display options:
    -t NUM, --top=NUM   display only the top results (default: 10)


Of course, feedback is much appreciated!

Thanks,
Karsten



More information about the tor-relays mailing list