
21.1.5 The ulimit Command
With the
ulimit
(user limits) command, it is possible to set limits for the use of system
resources and to have these displayed.
ulimit
is especially useful for limiting the
memory available for applications. With this, an application can be prevented from
using too much memory on its own, which could bring the system to a standstill.
ulimit
can be used with various options. To limit memory usage, use the options
listed in
Table 21.1, “
ulimit
: Setting Resources for the User”
(page 411).
Table 21.1
ulimit: Setting Resources for the User
Maximum size of physical memory
-m
Maximum size of virtual memory
-v
Maximum size of the stack
-s
Maximum size of the core files
-c
Display of limits set
-a
Systemwide entries can be made in
/etc/profile
. There, enable creation of core
files, needed by programmers for debugging. A normal user cannot increase the values
specified in
/etc/profile
by the system administrator, but can make special entries
in
~/.bashrc
.
Example 21.4
ulimit: Settings in ~/.bashrc
# Limits of physical memory:
ulimit -m 98304
# Limits of virtual memory:
ulimit -v 98304
Memory amounts must be specified in KB. For more detailed information, see
man
bash
.
Special System Features
411
Содержание LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Страница 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Страница 14: ......
Страница 19: ...Part I Deployment...
Страница 20: ......
Страница 60: ......
Страница 128: ......
Страница 243: ...Part II Administration...
Страница 244: ......
Страница 274: ......
Страница 312: ......
Страница 348: ......
Страница 380: ......
Страница 381: ...Part III System...
Страница 382: ......
Страница 438: ......
Страница 452: ......
Страница 478: ......
Страница 486: ......
Страница 498: ......
Страница 512: ......
Страница 558: ......
Страница 559: ...Part IV Services...
Страница 560: ......
Страница 652: ......
Страница 670: ......
Страница 742: ......
Страница 754: ......
Страница 796: ......
Страница 817: ...Part V Security...
Страница 818: ......
Страница 858: ......
Страница 886: ......
Страница 910: ......
Страница 911: ...Part VI Troubleshooting...
Страница 912: ......
Страница 924: ......