]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
merge from 0.2.0.x: r15718: Warn the admin if the number of file descriptors on his...
authorPeter Palfrader <peter@palfrader.org>
Mon, 7 Jul 2008 11:27:59 +0000 (11:27 +0000)
committerPeter Palfrader <peter@palfrader.org>
Mon, 7 Jul 2008 11:27:59 +0000 (11:27 +0000)
svn:r15719

debian/changelog
debian/tor.init

index 2c9a953e8a3f46a9360922e6525d0515ad60ee9e..7ea6a5b287d46626bd4782c3fec6bb16ad191ba4 100644 (file)
@@ -1,8 +1,10 @@
 tor (0.2.1.0-unreleased-1) XXperimental; urgency=low
 
   * trunk
+  * Warn the admin if the number of file descriptors on his system is
+    tiny.
 
- -- Peter Palfrader <weasel@debian.org>  Wed, 19 Mar 2008 20:09:25 +0100
+ -- Peter Palfrader <weasel@debian.org>  Mon, 07 Jul 2008 13:25:49 +0200
 
 tor (0.2.0.28-rc-1) experimental; urgency=low
 
index ea71e94bb221a3b04b32be43e59aee90b87e82d9..aa8fa37fd9a84ab362e71ebff5fe9ee1c61cbe83 100644 (file)
@@ -28,14 +28,26 @@ ARGS=""
 # Let's try to figure our some sane defaults:
 if [ -r /proc/sys/fs/file-max ]; then
        system_max=`cat /proc/sys/fs/file-max`
-       if [ "$system_max" -gt "80000" ] ; then
-               MAX_FILEDESCRIPTORS=32768
-       elif [ "$system_max" -gt "40000" ] ; then
-               MAX_FILEDESCRIPTORS=16384
-       elif [ "$system_max" -gt "10000" ] ; then
-               MAX_FILEDESCRIPTORS=8192
+       #if [ "$system_max" -gt "80000" ] ; then
+               #MAX_FILEDESCRIPTORS=32768
+       #elif [ "$system_max" -gt "40000" ] ; then
+               #MAX_FILEDESCRIPTORS=16384
+       #elif [ "$system_max" -gt "10000" ] ; then
+               #MAX_FILEDESCRIPTORS=8192
+       if 0; then
+               echo fo
        else
                MAX_FILEDESCRIPTORS=1024
+               cat << EOF
+
+Warning: Your system has very few filedescriptors available in total.
+
+Maybe you should try raising that by adding 'fs.file-max=100000' to your
+/etc/sysctl.conf file.  Feel free to pick any number that you deem appropriate.
+Then run 'sysctl -p'.  See /proc/sys/fs/file-max for the current value, and
+file-nr in the same directory for how many of those are used at the moment.
+
+EOF
        fi
 else
        MAX_FILEDESCRIPTORS=8192