[comp.unix.internals] Limiting the number of user processes ?

hunt@dg-rtp.rtp.dg.com (Greg Hunt) (01/27/91)

In article <25720@adm.brl.mil>, jewell@tower-unix.city-poly.ac.uk (Tony Jewell) writes:
>
> Is there an easy way (or not so easy way) that we can limit the number of
> processes a user can run, in the same way that VMS can ?
> 
> We are running Sun/OS 4.0.3

I don't know if Sun/OS has this configuration variable or not, but
under DG/UX you can set the kernel configuration variable MAXUP to
the number of processes that each user will be allowed to run
simultaneously.  That should do the trick if Sun/OS supports it or has
something similar.  Good luck.

-- 
Greg Hunt                        Internet: hunt@dg-rtp.rtp.dg.com
DG/UX Kernel Development         UUCP:     {world}!mcnc!rti!dg-rtp!hunt
Data General Corporation
Research Triangle Park, NC, USA  These opinions are mine, not DG's.

mike (Michael Stefanik) (01/27/91)

In article <25720@adm.brl.mil> tower-unix.city-poly.ac.uk!jewell (Tony Jewell) writes:
>We have had a lot of problem recently with our students (by mistake) writing
>recursive shell scripts, e.g. having their program name as the first line
>of their program, so that it keeps calling itself (Don't ask why !).
>Is there an easy way (or not so easy way) that we can limit the number of
>processes a user can run, in the same way that VMS can ?

Generally speaking, with UNIX processes and the kernel configuration, there
are two values to be concerned with: proc (aka NPROC) and maxproc (aka 
MAXUPRC).  The proc value determines the number of process slots allocated 
at boottime, and is of course system-wide.  The maxproc value determines the
number of processes that can be created by any one user, and this is what 
you're looking for.  Read up on configuring the kernel, and adjust the value
of maxproc down.

Some flavors of UNIX support dynamically adjusting the maxproc and proc
values (such as AIX), but most require relinking the kernel.
-- 
Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation
UUCP: ...!uunet!bria!mike
--
technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly
found to be saying things like "Well, it works on my DOS machine ..."