As the post related to man tor
describes Does the Tor Browser Bundle cache relay information?, there is such a file with cache information in the system.
DataDirectory/cached-consensus and/or cached-microdesc-consensus
The most recent consensus network status document we’ve
downloaded.
So in Debian, the file with the cache Tor relays is /var/lib/tor/cached-microdesc-consensus
and the information there can be valid for up to 24h. (if not renewed, which is the normal behaviour)
The stuff pertinent to this post seems to start in line 36 in my home server and ends somewhere in line 35963:
36 r mintberryCrunch ABCTIE984gTgUHkIeZdNvcDTiRE 2016-11-26 20:55:20 88.99.35.166 443 9030
37 m V1CEu0LsXapK9Ci55c+VHLEP89EG+1wWjSjsDSYyC0Y
38 s Fast Guard HSDir Running Stable V2Dir Valid
39 v Tor 0.2.5.12
40 w Bandwidth=16800
41 r CalyxInstitute14 ABG9JIWtRdmE7EFZyI/AZuXjMA4 2016-11-27 01:19:50 162.247.72.201 443 80
42 m hiyRvQn2CqLG7Xgp+eDcQe9u2IpJ44p/qZ+CrgIp+W4
43 s Exit Fast Guard HSDir Running Stable V2Dir Valid
44 v Tor 0.2.8.6
45 w Bandwidth=10800
I hacked a small bash script on the command line to get from this file the top 20 speeder relays:
sudo egrep ^"r |^w " /var/lib/tor/cached-microdesc-consensus | paste -d " " - - \
| sed "s/Unmeasured=. //" | \
awk ' { printf("%s %s %s ", $2, $6, $10 ); system("geoiplookup " $6 ); } ' | \
cut -f1,2,3,8- -d" " | sed "s/=/ /" | sort -k4 -n -r | head -20
And the end result was:
IPredator 197.231.221.211 Bandwidth 254000 Liberia
cry 192.42.115.101 Bandwidth 182000 Netherlands
GrmmlLitavisNew 163.172.194.53 Bandwidth 180000 France
regar42 62.210.244.146 Bandwidth 164000 France
xshells 178.217.187.39 Bandwidth 161000 Poland
dopper 192.42.113.102 Bandwidth 159000 Netherlands
TorLand1 37.130.227.133 Bandwidth 151000 United Kingdom
0x3d001 91.121.23.100 Bandwidth 151000 France
hviv104 192.42.116.16 Bandwidth 149000 Netherlands
colosimo 109.236.90.209 Bandwidth 136000 Netherlands
Onyx 192.42.115.102 Bandwidth 135000 Netherlands
redteam01 209.222.77.220 Bandwidth 134000 United States
belalugosidead 217.20.23.204 Bandwidth 129000 United Kingdom
redjohn1 62.210.92.11 Bandwidth 124000 France
Unnamed 46.105.100.149 Bandwidth 121000 France
theblazehenTor 188.138.17.37 Bandwidth 119000 France
splitDNA 62.210.82.44 Bandwidth 116000 France
radia2 91.121.230.212 Bandwidth 115000 France
ArachnideFR5 62.210.206.25 Bandwidth 115000 France
quadhead 148.251.190.229 Bandwidth 111000 Germany
Or a list of relay nodes in my home country:
sudo egrep ^"r |^w " /var/lib/tor/cached-microdesc-consensus | paste -d " " - - \
| sed "s/Unmeasured=. //" | \
awk ' { printf("%s %s %s ", $2, $6, $10 ); system("geoiplookup " $6 ); } ' | \
cut -f1,2,3,8- -d" " | sed "s/=/ /" | grep Portugal | sort -k4 -n -r
Output:
Laika 51.254.164.50 Bandwidth 47300 Portugal
freja 194.88.143.66 Bandwidth 15400 Portugal
cserhalmi 188.93.234.203 Bandwidth 1870 Portugal
Eleutherius 85.246.243.40 Bandwidth 1400 Portugal
luster 94.126.170.165 Bandwidth 1390 Portugal
undercity 178.166.97.51 Bandwidth 1180 Portugal
helper123 85.245.103.222 Bandwidth 1060 Portugal
Pi 94.60.255.42 Bandwidth 271 Portugal
TheSpy 85.240.255.230 Bandwidth 142 Portugal
MADNET00 89.153.104.243 Bandwidth 78 Portugal
MADNET01 82.155.67.190 Bandwidth 14 Portugal
By the way, bandwidth in the Tor server/client by default is defined in KB.