[tor-relays] stem library: huge difference between resolvers "proc" and others, eg. "netstat"

Damian Johnson atagar at torproject.org
Sat Mar 10 00:05:30 UTC 2018


Hi Toralf. Unfortunately I don't know offhand, though I'd certainly be
curious if you find the answer. At the end of the day connection
resolvers use the proc contents, so this might be a bug in how I'm
filtering connections in Stem or maybe a bug with its underlying proc
resolver.

Unfortunately I can't troubleshoot this without a local repro. If
you'd care to dig in I'd suggest adjusting the script a little to
print the connections, then see in what way netstat differs from proc.
Is it a strict superset? Does it have duplicates? Anything about the
connections which differ that seem interesting?

Cheers! -Damian

On Wed, Mar 7, 2018 at 2:25 PM, Toralf Förster <toralf.foerster at gmx.de> wrote:
> I do wonder about the differences of "proc" versus the other 3 ("netstat, "lsof" and "ss") related to the Inbound/Outbound values at my Tor relay.
> As an example I copied below the output of "proc" and "netstat".
> Does anybody have a clue about those differences?
>
>
>
> mr-fox ~ # python ~/stem/docs/_static/example/relay_connections.py --ctrlport 9051 --resolver proc
>  0.3.4.0-alpha-dev   uptime: 06:48:29   flags: Exit, Fast, Guard, Running, Stable, V2Dir, Valid
>
> +------------------------------+------+------+
> | Type                         | IPv4 | IPv6 |
> +------------------------------+------+------+
> | Inbound to our ORPort        | 2107 |    6 |
> | Inbound to our DirPort       |   15 |    0 |
> | Outbound to a relay          | 1753 |    0 |
> | Outbound exit traffic        |  155 |  302 |
> | Outbound uncategorized       |  119 |    0 |
> +------------------------------+------+------+
> | Total                        | 4149 |  308 |
> +------------------------------+------+------+
>
> +------------------------------+------+------+
> | Exit Port                    | IPv4 | IPv6 |
> +------------------------------+------+------+
> | 80 (HTTP)                    |  111 |   61 |
> | 143 (IMAP)                   |    1 |    0 |
> | 443 (HTTPS)                  |    0 |  229 |
> | 465 (SMTP)                   |    1 |    0 |
> | 993 (IMAPS)                  |   13 |    0 |
> | 5222 (Jabber)                |    8 |    2 |
> | 5223 (Jabber)                |    6 |    0 |
> | 7777                         |    1 |    0 |
> | 8080 (HTTP Proxy)            |    4 |    4 |
> | 8333 (Bitcoin)               |    2 |    2 |
> | 8888 (NewsEDGE)              |    2 |    0 |
> | 50002 (Electrum Bitcoin SSL) |    6 |    4 |
> +------------------------------+------+------+
> | Total                        |  155 |  302 |
> +------------------------------+------+------+
>
> mr-fox ~ # python ~/stem/docs/_static/example/relay_connections.py --ctrlport 9051 --resolver netstat
>  0.3.4.0-alpha-dev   uptime: 06:48:41   flags: Exit, Fast, Guard, Running, Stable, V2Dir, Valid
>
> +------------------------------+------+------+
> | Type                         | IPv4 | IPv6 |
> +------------------------------+------+------+
> | Inbound to our ORPort        | 4883 |    6 |
> | Inbound to our DirPort       |   35 |    0 |
> | Inbound to our ControlPort   |    1 |    0 |
> | Outbound to a relay          | 4174 |    0 |
> | Outbound exit traffic        |  390 |  293 |
> | Outbound uncategorized       |  267 |    0 |
> +------------------------------+------+------+
> | Total                        | 9750 |  299 |
> +------------------------------+------+------+
>
> +------------------------------+------+------+
> | Exit Port                    | IPv4 | IPv6 |
> +------------------------------+------+------+
> | 80 (HTTP)                    |  300 |   68 |
> | 110 (POP3)                   |    1 |    0 |
> | 143 (IMAP)                   |    4 |    0 |
> | 443 (HTTPS)                  |    0 |  214 |
> | 465 (SMTP)                   |    1 |    0 |
> | 1883                         |    1 |    0 |
> | 3128 (SQUID)                 |    1 |    0 |
> | 5222 (Jabber)                |   21 |    2 |
> | 5223 (Jabber)                |   18 |    0 |
> | 6667 (IRC)                   |    4 |    0 |
> | 7777                         |    2 |    0 |
> | 8080 (HTTP Proxy)            |   14 |    3 |
> | 8333 (Bitcoin)               |    8 |    2 |
> | 8888 (NewsEDGE)              |    3 |    0 |
> | 50002 (Electrum Bitcoin SSL) |   12 |    4 |
> +------------------------------+------+------+
> | Total                        |  390 |  293 |
> +------------------------------+------+------+
>
>
> --
> Toralf
> PGP C4EACDDE 0076E94E
>
>
> _______________________________________________
> tor-relays mailing list
> tor-relays at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
>


More information about the tor-relays mailing list