Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.hp.hpux FAQ
Section - 5.10.3 How do I set per-process limits?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Forum ]


Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.10.2 Why do my processes keep dying at 64 MB memory usage?
Next Document: 5.10.4 How can I tell what files, ports, etc.. a process has open?
See reader questions & answers on this topic! - Help others by sharing your knowledge

Many system-wide per-process limits can be set by root by modifying kernel
parameters.  Regular users can also set some per-process limits via shell
builtins.  Of course, system-wide limits cannot be exceeded.

In the POSIX and Korn shells, the 'ulimit' builtin command can be used to
set pre-process limits.  Though both builtins have the name ulimit, their
capabilities and syntax are different.

For the Korn shell (ksh), ulimit only affects the filesize limit, which
defaults to 4194303, which ksh interprets to mean unlimited.  See ksh(1).

For the POSIX shell (sh), there are several variables that can be set
with ulimit.  The 'ulimit -a' command lists all the variables that can be
set.  There are soft and hard limits for these variables, and some ulimit
maximum values are based on certain kernel parameters:

     Soft Limit                        Relevant Kernel Params
     ========================================================
     $ ulimit -aS
     time(seconds)        unlimited
     file(blocks)         unlimited
     data(kbytes)         65536        max determined by maxdsiz
     stack(kbytes)        8192         max determined by maxssiz
     memory(kbytes)       unlimited
     coredump(blocks)     4194303
     nofiles(descriptors) 60           max determined by maxfiles

     Hard Limit                        Relevant Kernel Params
     ========================================================
     $ ulimit -aH
     time(seconds)        unlimited
     file(blocks)         unlimited
     data(kbytes)         65536
     stack(kbytes)        8192
     memory(kbytes)       unlimited
     coredump(blocks)     unlimited
     nofiles(descriptors) 1024        max determined by maxfiles_lim

See also sh-posix(1).

The C shell (csh) has similar variables.  These variables can be set using
the csh 'limit' builtin command.  See csh(1).

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.10.2 Why do my processes keep dying at 64 MB memory usage?
Next Document: 5.10.4 How can I tell what files, ports, etc.. a process has open?

Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
hpux.faq@gmail.com





Last Update March 27 2014 @ 02:11 PM