[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: How to determine the current number of open files for the Tor user?
Joerg Maschtaler wrote on 14.11.2006 23:16:
> The notice to increase the number of open files does not appear anymore
> but is there a way to find out the value of "ulimit -n" for the Tor user
> whithout login as Tor user?
A friend of mine provided me the following patch which was tested on Tor
0.1.2.3-alpha.
---cut here---
--- tor-0.1.2.3-alpha.orig/src/common/compat.c 2006-11-18 14:51:02.000000000 +0100
+++ tor-0.1.2.3-alpha/src/common/compat.c 2006-11-18 15:05:17.000000000 +0100
@@ -605,6 +605,9 @@
strerror(errno));
return -1;
}
+ log_notice(LD_NET,"Current max file descriptors soft limit %lu and hard limit %lu.",
+ (unsigned long)rlim.rlim_cur, (unsigned long)rlim.rlim_max);
+
if (rlim.rlim_max < limit) {
log_warn(LD_CONFIG,"We need %lu file descriptors available, and we're "
"limited to %lu. Please change your ulimit -n.",
---cut here ---
This patch shows the soft and hard limit for file descriptors during the start of Tor server.
Regards,
Joerg