[Cialug] open files

Aaron Thompson cialug@cialug.org
Wed, 26 Jan 2005 12:57:57 -0600


I believe you can also impose limits open files by user/group via PAM
using /etc/security/limits.conf, make sure you update/include the 
'session    required     pam_limits.so'  line in
your /etc/pam.d/whatever-pam-file .

---<CLIP: limits.conf>---
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit
#        - maxlogins - max number of logins for this user
#        - priority - the priority to run user process with
#
#<domain>      <type>  <item>         <value>

@group_1        soft    nproc           65
@group_1        soft    nofile          95
@group_1        soft    core            512
@group_1        hard    nproc           70
@group_1        hard    nofile          100
@group_1        hard    core            1024
@group_1        hard    maxlogins       5

@group_2        soft    nproc           95
@group_2        soft    nofile          95
@group_2        soft    core            512
@group_2        hard    nproc           100
@group_2        hard    nofile          100
@group_2        hard    core            1024
@group_2        hard    maxlogins       10
---<CLIP: limits.conf>---


This doesn't show how to increase the number of files that can be open -
rather it show you how to limit users.

@

Tue, 2005-01-25 at 19:41 -0600, Dave Crouse wrote:
> this link was pretty informative:
> 
> http://lists.plug.phoenix.az.us/pipermail/plug-discuss/2000-September/005508.html
> 
> ......snip........
> It turns out that /proc/sys/fs/file-max contains the value of
> `max_files'.  You may set this value via, e.g,
> 
>  echo 5200 >/proc/sys/fs/file-max
> ......snip........
> 
> 
> 
> 
> 
> 
> 
> 
> On Tue, January 25, 2005 4:49 pm, Nathan C. Smith said:
> >
> 
> > I'm trying to remember what is the command or parameter setting that
> > allows Linux to have more files open?
> > I think that is what I mean - maybe file descriptors?  And how do I
> > allocate more?
> >
> > Would something like this be right?
> >
> >
> > echo 16384 > /proc/sys/fs/file-max
> >
> > Kernel is 2.4ish.
> >
> >
> > Thanks.
> >
> >
> > -Nate
> >
> >
> > Nathan Smith  McKee, Voorhees & Sease, P.L.C.  515.288.3667
> > _______________________________________________
> > Cialug mailing list
> > Cialug@cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> >
> >
> 
> _______________________________________________
> Cialug mailing list
> Cialug@cialug.org
> http://cialug.org/mailman/listinfo/cialug
-- 
Aaron Thompson                  Assistant Oracle Database Administrator
http://www.uni.edu/~prefect/                University of Northern Iowa

"Because as we know, there are known knowns, there are things we know we
know. We also know there are known unknowns; that is to say we know there are
some things we do not know. But there are also unknown unknowns - the ones we
don't know we don't know." - Donald Rumsfeld