6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / rcapd.1m
blobdd255abd79e89984bfb06b3a23b88c58c6fd1d23
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RCAPD 1M "Dec 19, 2006"
7 .SH NAME
8 rcapd \- resource cap enforcement daemon
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBrcapd\fR [\fB-d\fR]
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBrcapd\fR daemon enforces resource caps on collections of processes.
19 Per-project and per-zone physical memory caps are supported. For information
20 about projects, see \fBproject\fR(4). For zones information, see \fBzones\fR(5)
21 .sp
22 .LP
23 When the resident set size (RSS) of a collection of processes exceeds its cap,
24 \fBrcapd\fR takes action and reduces the RSS of the collection.
25 .sp
26 .LP
27 The virtual memory system divides physical memory into segments known as pages.
28 To read data from a file into memory, the virtual memory system reads in
29 individual pages. To reduce resource consumption, the daemon can page out, or
30 relocate, infrequently used pages to an area outside of physical memory.
31 .sp
32 .LP
33 In the \fBproject\fR file, caps are defined for projects that have positive
34 values for the following project attribute:
35 .sp
36 .ne 2
37 .na
38 \fB\fBrcap.max-rss\fR\fR
39 .ad
40 .RS 16n
41 The total amount of physical memory, in bytes, that is available to the
42 project's member processes
43 .RE
45 .sp
46 .LP
47 See \fBproject\fR(4) for a description of project attributes.
48 .sp
49 .LP
50 For a system with one or more zones, you can dynamically set the
51 \fBrcap.max-rss\fR value for a zone with \fBrcapadm\fR(1M). To set a persistent
52 cap on memory usage within a zone, you use \fBzonecfg\fR(1M).
53 .sp
54 .LP
55 You configure \fBrcapd\fR through the use of \fBrcapadm\fR(1M). The daemon can
56 be monitored with \fBrcapstat\fR(1). Configuration changes are incorporated
57 into \fBrcapd\fR by sending it \fBSIGHUP\fR (see \fBkill\fR(1)), or according
58 to the configuration interval (see \fBrcapadm\fR(1M)).
59 .SH OPTIONS
60 .sp
61 .LP
62 The following option is supported:
63 .sp
64 .ne 2
65 .na
66 \fB\fB-d\fR\fR
67 .ad
68 .RS 6n
69 Enable debug mode. Messages are displayed on the invoking user's terminal.
70 .RE
72 .SH EXAMPLES
73 .LP
74 \fBExample 1 \fRSetting Resident Set Size Cap Attribute
75 .sp
76 .LP
77 The following line in the \fB/etc/project\fR database sets an RSS cap of
78 1073741824 bytes for a project named \fBfoo\fR.
80 .sp
81 .in +2
82 .nf
83 foo:100::foo,root::rcap.max-rss=10737418240
84 .fi
85 .in -2
87 .SH EXIT STATUS
88 .sp
89 .LP
90 The following exit values are returned:
91 .sp
92 .ne 2
93 .na
94 \fB0\fR
95 .ad
96 .RS 5n
97 Successful completion.
98 .RE
101 .ne 2
103 \fB1\fR
105 .RS 5n
106 An error occurred.
110 .ne 2
112 \fB2\fR
114 .RS 5n
115 Invalid command-line options were specified.
118 .SH FILES
120 .ne 2
122 \fB\fB/etc/project\fR\fR
124 .RS 16n
125 Project database.
128 .SH ATTRIBUTES
131 See \fBattributes\fR(5) for descriptions of the following attributes:
136 box;
137 c | c
138 l | l .
139 ATTRIBUTE TYPE  ATTRIBUTE VALUE
141 Interface Stability     Evolving
144 .SH SEE ALSO
147 \fBrcapstat\fR(1), \fBsvcs\fR(1), \fBrcapadm\fR(1M), \fBzonecfg\fR(1M),
148 \fBsvcadm\fR(1M), \fBproject\fR(4), \fBattributes\fR(5), \fBsmf\fR(5),
149 \fBzones\fR(5)
152 "Physical Memory Control Using the Resource Capping Daemon" in \fISystem
153 Administration Guide: Solaris Containers-Resource Management, and Solaris
154 Zones\fR
155 .SH NOTES
158 If killed with \fBSIGKILL\fR, \fBrcapd\fR can leave processes in a stopped
159 state. Use \fBSIGTERM\fR to cause \fBrcapd\fR to terminate properly.
162 A collection's RSS can exceed its cap for some time before the cap is enforced,
163 even if sufficient pageable memory is available. This period of time can be
164 reduced by shortening the RSS sampling interval with \fBrcapadm\fR.
167 The \fBrcapd\fR service is managed by the service management facility,
168 \fBsmf\fR(5), under the service identifier:
170 .in +2
172 svc:/system/rcap:default
174 .in -2
179 Administrative actions on this service, such as enabling, disabling, or
180 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
181 status can be queried using the \fBsvcs\fR(1) command.