In the last episode (Jun 13), Opec Kemp (Ozemail) said:
> > To temporarily change the running kernel (will be reset on reboot):
> > sysctl -w kern.maxfiles=10000
> > sysctl -w kern.maxfilesperproc=10000
> > The equivalent kernel option is
> > options MAXFILES=10000
> Thanks Dan for the above comands. I can't seems to find the MAXFILES
> option in the kernel config. The file that I looked in was under
> /usr/src/sys/i386/conf/MYCONFIG. I did a grep -i on MAXFILES but came
> up empty. Any pointer on this will be great. We are using FreeBSD
> 3.1-RELEASE #1.
If you don't have a MAXFILES line, it defaults to (maxusers*16+20)*2.
You can add a MAXFILES entry if you want to raise that particular limit
without also adjusting the other values that the "maxusers" variable
> I did this command /usr/bin/limits -n inf (-n for setting the
> openfiles limit) and all it does is display this :
> Resource limits (current):
> openfiles infinity
/usr/bin/limits cannot change the limits for its parent shell. The
only way it can set limits is if you also specify a command for it to
/usr/bin/limits -n inf /bin/sh
Alternatively, use your shell's builtin command for setting limits
(/bin/sh and friends use ulimit).