How do you monitor Snowflake without detailed logging enabled to drive with limited writing cycles?

ps aux|grep proxy
Yes, proxy binary is running:


But that does not tell me bandwidth used, clients served.
If i enable Snowflake logging i guess there is no logging only of summary like once per day one line of bandwidth statistics. On Debian kind of Linux, should I create somehow the tmpfs kind of mount point and somehow redirect Snowflake logging to a file that i will always create at boot etc. which commands to execute? I wish Snowflake devs allow customized logging or even basic logging by default (like one line per day summarizing stats of the app).

Actually, there is a summary now.
I’m running Snowflake standalone with “-log” to a file and I have this cool summary:

2023/02/09 13:30:55 In the last 1h0m0s, there were 354 connections. Traffic Relayed ↑ X KB, ↓ Y KB.
2023/02/09 14:30:55 In the last 1h0m0s, there were 346 connections. Traffic Relayed ↑ X KB, ↓ Y KB.
2023/02/09 15:30:55 In the last 1h0m0s, there were 379 connections. Traffic Relayed ↑ X KB, ↓ Y KB.

(Redacted the amount of traffic relayed.)
In addition to that, I also installed vnstat package, because I wanted to compare how much bandwidth a standalone proxy is consuming vs an obsf4 bridge.

If you are only logging summaries a couple times per day non-verbosely you probably don’t need to worry about over-shooting the write cycles on your flash drive. If you’d still rather use a tmpfs take a look at mount(8) manpage and/or simply run ‘mount -t tmpfs’ to see what tmpfs mounts you already have and use those as a starting point; Debian systems usually have several.

Could you please elaborate that answer for the people with no very advance knowledge of linux and this software? Logrotate does not work for me with snowflakes, I think I’ve seen something that this software has in order to avoid certain things to be done with logs, am I right? There are times when I want and/or need very verbose output logs and times when I don’t need them, how can I switch without having to stop snowflakes? I can make it use more bandwith between about 3 and 6:30 am, how can I do that? The PC I am running it is not very new, it has only 4GB of RAM, but I will probably use it only for that purpose, however I don’t want to break the microprocessor for having it at 100% all the time or the mechanical HDD for working non-stop. Sorry for asking many questions but I couldn’t find a complete manual or guide that answers them and it will be good for many guys who are willing to install snowflakes but are not too sure (I read about them in forums). Perhaps someone can help with the maintenance of the node? That will motivate me to attempt installing a tor relay afterwards. Many thanks.

@lwmar: the ‘mount -t tmpfs’ command you referenced was directed to the original poster of this thread who indicated they were concerned about exceeding the write cycles of their drive, i.e. solid state memory storage devices (SSD) like “jump drives”. For non-verbose logging done hourly or less I think it’s not a concern as most SSDs do wear-leveling automatically.

Regarding log rotation, I’m not currently doing this but will likely implement it at some point. On a Debian-based Linux system it looks like creating a snowflake-proxy-specific configuration file under ‘/etc/logrotate.d/’ would leverage the existing log rotation scheme. If you have installed the ‘tor’ package from the official Debian repositories then there is likely a ‘/etc/logrotate.d/tor’ logrotate(8) config file you could use as a starting example. For the stand-alone snowflake proxy it is recommended that a snowflake-proxy-specific account/group be created instead of using root so that needs to be taken into account; installing the referenced ‘tor’ package does this as well which can be seen in the ‘/etc/logrotate.d/tor’ file.

Your other questions:

  • as far as I know there isn’t a way to switch logging level on-the-fly; the proxy has to be stopped and restarted. Same with bandwidth adjustments.

  • your network bandwidth and NAT status will likely be the limiting factors for snowflake-proxy utilization, not your hardware

I agree that it would be nice if someone wrote up a cookbook-style snowflake proxy tutorial for ordinary users that don’t have a lot of system administration skills. Unfortunately it’s all too common for documentation of all sorts to be an after-thought. At least in this case there is an easy alternative, the various web browser add-ons; see https://snowflake.torproject.org/ .

meta4, thanks for your reply. Hardware here is really expensive and we like to reutilize it so for now I am using a HDD, not a SSD. I thought of using verbose logging as it will help me to try to understand what it’s been going on but I calculate it will take too much space in a 20 or 40GB disk I am using so I looked into log rotation for that reason. I have a Debian installed in that PC, that it will be for snowflakes only, however I imagine it will be better to not to load the GUI to save resources, but I will have to see if I can learn enough to manage not to use the GUI. I suppose there is a tor package without the GUI or I can avoid it loading? For what I read I think I want to achieve a headless server without installing a Debian server version.

I know about the browser extension for firefox but it gives no much control and info (I can only turn it off or on and see how many people is using it at the present time).
Going back to the proxy: perhaps a way to achieve what I want is to use Debian’s crontab file? I suppose I can schedule 4 tasks: 1) to start the proxy at 8am with parameters to use a max amount of bandwith. 2) to stop the proxy at 3am. 3) to start the proxy at 3:05am allowing it to take more bandwith. 3) to stop the proxy at 7:55am.

Someone is wiling to share their wifi with us to use it for snowflakes as long as we don’t interfere with his tasks so I need to make sure he will be able to watch netflix without interruptions.

Maybe a tor relay is more documented and hence a better idea for me to try?

I think I will make a new post (plea stiyle) to see if I can find someone interested in being the remote admin for snowflakes until I am able to do it myself (If I get there!). Can you recommend what to do in order to learn more of what an admin needs to know? Sorry if something is not very well expressed but english is not my first language.

Many thanks

Yes, it’s fine to use a cronjob to start/stop your snowflake proxy.

Feel free to ask support in your first language: In your language - Tor Project Forum.