How can I keep track of my node's traffic?

I need to monitor my intermediate node traffic. I used to use vnStat for this. But the problem is that if there is something else on the server that uses the internet, the data is not quite correct.


Hello @wine,

If you are using a Debian or Ubuntu OS, you should use the package : nyx

apt install nyx

With a simple command, you can monitor your tor process with the bandwidth usage, traffic amount, notice logs.
To access this console with the default unprivileged user, use this command :

sudo -u debian-tor nyx

If you are using an another Linux distribution or Windows, please specify what you are using to help you more.



What is the difference between this and sudo nyx? Thanks for help me to understand.


Using the sudo -u debian-tor nyx will run the console as an unprivileged user (created by the tor install : debian-tor), if you only do sudo nyx, it will gives root permissions to nyx.

This will gives you a notice to say that you shouldn’t run tor or nyx as root

[NYX_NOTICE] Nyx is currently running with root permissions. This isn’t a good idea, nor should it be necessary.


Then i will create a alias (.bash-profile) and will run nyx over that. Thnaks for your explanation.

$ sudo nano .bash_profile
alias startnyx="sudo -u debian-tor nyx"

What if I wanted to keep stats and do analytics for myself? Conventionally speaking, how much went through me in a day/month/year.


All statistics are available in the folder /var/lib/tor/stats. It’s not dated but I think you can collect them and make comparisons with them (if you collect them daily) to get an exact number.



Check out this grafana project maintained by a relay operator:

Please note: Do not make your private monitoring data graphs public since this could help attackers with deanonymizing Tor users.


I may have found a good monitoring tool for any servers (Raspberry Pi, virtual servers and more) that is free and open source.

You only need to install an agent on the server you want to monitor and all the metrics are available on netdata cloud.

They have added a python script to get tor traffic read and written and show it in a graph.
I didn’t find any cons and it seems very easy to use compared to Grafana, Prometheus, tormon and others. For the safety, do I have to take into account some criteria to avoid problems?
I mean on security and confidentiality wises. How do I know if this tool is safe to use for Tor ?

If this tool is safe, it would be nice maybe to improve the tor python plugin to get more statistics like number of unique clients for bridges, countries, flags and more. Im not very good in Python unfortunately so if someone wants to help :sweat_smile:

Thanks :+1: