summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-07-07 11:26:18 +0000
committerPeter Palfrader <peter@palfrader.org>2008-07-07 11:26:18 +0000
commit555a6e1f8a21a7720a0334d63eca8078e9f4f756 (patch)
tree1e8fb7908fcdd3e9f37ffcf7e147b1e38566ea84
parentd4941a0e0bbe8960aa69d1f1ccc6e621861e3754 (diff)
downloadtor-555a6e1f8a21a7720a0334d63eca8078e9f4f756.tar.gz
tor-555a6e1f8a21a7720a0334d63eca8078e9f4f756.zip
Warn the admin if the number of file descriptors on his system is tiny.
svn:r15718
-rw-r--r--debian/changelog7
-rw-r--r--debian/tor.init24
2 files changed, 25 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 133b7e1e88..4a76ca733c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tor (0.2.0.28-rc-X) Xxperimental; urgency=low
+
+ * Warn the admin if the number of file descriptors on his system is
+ tiny.
+
+ -- Peter Palfrader <weasel@debian.org> Mon, 07 Jul 2008 13:25:49 +0200
+
tor (0.2.0.28-rc-1) experimental; urgency=low
* New upstream version.
diff --git a/debian/tor.init b/debian/tor.init
index ea71e94bb2..aa8fa37fd9 100644
--- a/debian/tor.init
+++ b/debian/tor.init
@@ -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