System Resource Limits
Kurt Wall
kwall
Mon May 17 11:49:07 PDT 2004
Quoth David A. Bandel:
> On Tue, 8 Jul 2003 17:16:19 -0400
> Kurt Wall <kwall at kurtwerks.com> wrote:
>
> > If you type ulimit in the shell, bash obligingly shows you the process
> > resource limits that affect processes started by the shell:
> >
> > $ ulimit -S -a
> > core file size (blocks, -c) 0
> > data seg size (kbytes, -d) unlimited
> > file size (blocks, -f) unlimited
> > max locked memory (kbytes, -l) unlimited
> > max memory size (kbytes, -m) unlimited
> > open files (-n) 1024
> > pipe size (512 bytes, -p) 8
> > stack size (kbytes, -s) 8192
> > cpu time (seconds, -t) unlimited
> > max user processes (-u) 2048
> > virtual memory (kbytes, -v) unlimited
> >
> > Where, pray tell, on a system not using PAM, can these be set on a
> > system-wide basis?
>
> /etc/profile
Well, right. Bash manipulates these values using its ulimit built-in,
which I understand. What I'm *not* clear on is where in the system
Bash gets them. Well, that's not quite right either. I'm assuming that
bash uses the getrlimit() and setrlimit() system calls to retrieve and
set the resource limits, but from where is it getrlimit()ing and
setrlimit()ing them? And don't bother to answer, "It's the kernel, stupid!",
because I know that. Oh, I see. The answer appears to lie down in the
bowels of /proc/sys. Eew.
Thanks, David.
Kurt
--
The notion of a "record" is an obsolete remnant of the days of the
80-column card.
-- Dennis M. Ritchie
More information about the Linux-users
mailing list