rc-scripts

Paweł Krawczyk kravietz w alfa.ceti.pl
Śro, 22 Mar 2000, 17:37:06 CET


Przesyłam patcha do rc-scripts 0.1.5, który dodaje do /etc/sysconfig/system
obsługę dwóch nowych parametrów: VFS_FILE_MAX i VFS_INODE_MAX. Oba odpowiadają
parametrom sysctl /proc/sys/fs/file-max i inode-max. Proszę osoby zajmujące
się rc-scripts o przyjrzenie się temu i ewentualnie dodanie do rc-scripts.
Nie chciałem sam w tym grzebać, bo rc-scripts są w postaci .tar.gz, więc
ewentualne poprawki są bardziej kłopotliwe niż w przypadku czystego CVS.

-- 
Paweł Krawczyk, CETI Internet, Krakow, http://ceti.pl/~kravietz/
-------------- następna część ---------
diff -ruN rc-scripts-0.1.5/rc.d/rc.sysinit rc-scripts-0.1.5.new/rc.d/rc.sysinit
--- rc-scripts-0.1.5/rc.d/rc.sysinit	Mon Feb 28 13:54:39 2000
+++ rc-scripts-0.1.5.new/rc.d/rc.sysinit	Wed Mar 22 17:27:54 2000
@@ -436,6 +436,23 @@
 if (echo $PANIC_REBOOT_TIME > /proc/sys/kernel/panic); then deltext; ok; else deltext; fail; fi
 fi
 
+# If needed increase number of available system files
+# There are two versions of each setting, because file names
+# changed between Linux 2.0 and 2.2
+if [ -f /proc/sys/kernel/file-max -a "$VFS_FILE_MAX" -gt 0 ]; then
+        echo $VFS_FILE_MAX >/proc/sys/kernel/file-max
+fi
+if [ -f /proc/sys/fs/file-max -a "$VFS_FILE_MAX" -gt 0 ]; then
+        echo $VFS_FILE_MAX >/proc/sys/fs/file-max
+fi
+if [ -f /proc/sys/kernel/inode-max -a "$VFS_INODE_MAX" -gt 0 ]; then
+        echo $VFS_INODE_MAX >/proc/sys/kernel/inode-max
+fi
+if [ -f /proc/sys/fs/inode-max -a "$VFS_INODE_MAX" -gt 0 ]; then
+        echo $VFS_INODE_MAX >/proc/sys/fs/inode-max
+fi
+
+
 # Now that we have all of our basic modules loaded and the kernel going,
 # let's dump the syslog ring somewhere so we can find it later
 dmesg > /var/log/dmesg
diff -ruN rc-scripts-0.1.5/sysconfig/system rc-scripts-0.1.5.new/sysconfig/system
--- rc-scripts-0.1.5/sysconfig/system	Fri Feb 18 11:09:10 2000
+++ rc-scripts-0.1.5.new/sysconfig/system	Wed Mar 22 17:32:15 2000
@@ -45,3 +45,13 @@
 
 # Start DevFS daemon to preserve compatibility with old "style" device names
 RUN_DEVFSD=no
+
+# Adjust number of inodes and file handles available in the system.
+# If you have a havily loaded system and kernel complains about
+# file/inode limit reached in VFS, increase this 2x. The default
+# value is 4096 (file) and 8192 (inode). The inode number should be
+# always 2-3 times the file number. For most systems this should not
+# be changed
+#VFS_FILE_MAX=4096
+#VFS_INODE_MAX=8192
+


Więcej informacji o liście dyskusyjnej pld-devel-pl