Obtain Tor relay detailed statistics under Linux

Hello!

Got running tor relay under Debian. Works fine, have ability to “visualize” node using Nyx.

My question is: is there an easy way to obtain detailed statistics (actuall speed, number of connections, uptime, flags and so on)? Best for me will be kind of bash command/script, curl/wget command, telnet session etc.

Thank you in advance!

The easiest way is by using nyx, you should be able to see all that data.

You can see the number of connections on page 2 (press the right arrow key).
The only thing you won’t be able to see is additional flags, such as IPv6 reachable. You can see those in metrics.torproject.org.

It is really important you set up your relay to be reachable via IPv6 if your provider gives you the opportunity, it is often free. https://community.torproject.org/relay/setup/post-install/

1 Like

Thank you for an answer!

Yes, I have got Nyx/Tor-arm, and I want to obtain exactly that data, but without this applications.

Other words, I’m looking for easy way to get speed, connections etc.:

  1. using own commands/scripts/whatever, kind of “wget IP:5000 | grep SPEED”
  2. or use other programs, which do the same, kind of “nyx --details | grep CONNECTION”

As I see Nyx can not do that, so, looking for other ways. I’d like to do it simple, without downloading additonal 1,35GB of frameworks :slight_smile:

curl -s localhost:9052/metrics

before you’ve to configure Tor like

MetricsPort 127.0.0.1:9052
MetricsPortPolicy accept 127.0.0.1
MetricsPortPolicy accept [::1]
3 Likes

Great!
Where can I found meaning and desctiption of this metrics?

Here is a start:

But more documentation would be nice as already stated here:

Great, thank you very much!

MetricsPort is still relatively new.
Sometimes you learn something new on the Tor relay list or in Tor relay meetings or that’s where you can best ask specific questions.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.