6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / rcapadm.1m
blobf52141574cdb230de66502300bb51a8f5dedfbc7
1 '\" te
2 .\" Copyright (c) 2003, 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 RCAPADM 1M "Dec 18, 2006"
7 .SH NAME
8 rcapadm \- configure resource capping daemon
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBrcapadm\fR
13 .fi
15 .LP
16 .nf
17 \fBrcapadm\fR [ [\fB-n\fR] \fB-E\fR | \fB-D\fR]
18      [\fB-i\fR \fIinterval=value\fR,...,\fIinterval=value\fR] [\fB-c\fR \fIpercent\fR]
19      [\fB-z\fR \fIzonename\fR \fB-m\fR \fImaxvalue\fR]
20 .fi
22 .SH DESCRIPTION
23 .sp
24 .LP
25 The \fBrcapadm\fR command allows a user with the privileges described below to
26 configure various attributes of the resource capping daemon. If used without
27 arguments, \fBrcapadm\fR displays the current status of the resource capping
28 daemon if it has been configured. See \fBrcapd\fR(1M) for more information.
29 .sp
30 .LP
31 In the current release of the Solaris operating environment, \fBrcapadm\fR is
32 available to users with all privileges and to users who have the Process
33 Management profile in their list of profiles. The System Administrator role
34 includes the Process Management profile.
35 .SH OPTIONS
36 .sp
37 .ne 2
38 .na
39 \fB\fB-c\fR \fIpercent\fR\fR
40 .ad
41 .sp .6
42 .RS 4n
43 Set the minimum physical memory utilization for memory cap enforcement. Caps
44 will not be enforced until the physical memory available to processes is low.
45 The \fIpercent\fR value should be in the range 0 to 100. The minimum (and
46 default) value is \fB0\fR, which means that memory caps are always enforced.
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fB-D\fR\fR
53 .ad
54 .sp .6
55 .RS 4n
56 Disable the resource capping daemon so that it will not be started when the
57 system is booted. Also stop the resource capping daemon now, if the \fB-n\fR
58 option is not specified and it is currently running.
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB\fB-E\fR\fR
65 .ad
66 .sp .6
67 .RS 4n
68 Enable the resource capping daemon so that it will be started each time the
69 system is booted. Also start the resource capping daemon now, if the \fB-n\fR
70 option is not specified and it is not currently running.
71 .RE
73 .sp
74 .ne 2
75 .na
76 \fB\fB-i\fR \fIinterval=value\fR,...,\fIinterval=value\fR\fR
77 .ad
78 .sp .6
79 .RS 4n
80 Set intervals for various periodic operations performed by \fBrcapd\fR. All
81 intervals are specified in seconds. You can set the following intervals:
82 .sp
83 .ne 2
84 .na
85 \fB\fBscan\fR\fR
86 .ad
87 .RS 10n
88 The interval at which \fBrcapd\fR scans for new processes. The default scan
89 interval is every 15 seconds. The minimum value is 1 second.
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fBsample\fR\fR
96 .ad
97 .RS 10n
98 The interval of process resident set size sampling. The default sample interval
99 is every 5 seconds. The minimum value is 1 second.
103 .ne 2
105 \fB\fBreport\fR\fR
107 .RS 10n
108 The interval at which various paging statistics are updated by \fBrcapd\fR, in
109 seconds. These statistics can be viewed by using \fBrcapstat\fR(1SRM). The
110 default reporting interval is every 5 seconds. When the interval is set to
111 \fB0\fR, statistics will not be updated.
113 Note -
115 .RS 2
116 Paging refers to the act of relocating portions of memory, called pages, to or
117 from physical memory. \fBrcapd\fR pages out the most infrequently used pages.
122 .ne 2
124 \fB\fBconfig\fR\fR
126 .RS 10n
127 The reconfiguration interval, in seconds. At each reconfiguration event,
128 \fBrcapd\fR checks its configuration file for updates, and scans the project
129 databases for new project caps. The default reconfiguration interval is every
130 60 seconds. The minimum interval is \fB0\fR. When the interval is set to
131 \fB0\fR, no periodic reconfiguration occurs, although the running daemon can
132 still be reconfigured by sending it \fBSIGHUP\fR.
138 .ne 2
140 \fB\fB-m\fR \fImaxvalue\fR\fR
142 .sp .6
143 .RS 4n
144 Used in conjunction with the \fB-z\fR option. Specifies a value for
145 \fBrcap.max-rss\fR, a dynamically-set cap on the usage of physical memory for
146 the zone specified by \fB-z\fR. You can apply a scale (\fBK\fR, \fBM\fR,
147 \fBG\fR, \fBT\fR) to the value you specify. \fBK\fR means kilobyte; \fBM\fR,
148 megabyte; \fBG\fR, gigabyte; and \fBT\fR, terabyte. For example, \fB100M\fR is
149 100 megabytes.
153 .ne 2
155 \fB\fB-n\fR\fR
157 .sp .6
158 .RS 4n
159 Do not affect the running state of the resource capping daemon when enabling or
160 disabling it.
164 .ne 2
166 \fB\fB-z\fR \fIzonename\fR\fR
168 .sp .6
169 .RS 4n
170 Used in conjunction with the \fB-m\fR option. Specifies the zone for which you
171 are dynamically specifying a cap on physical memory usage (using \fB-m\fR).
175 Note -
177 .RS 2
178 To set a persistent cap on memory usage within a zone, use \fBzonecfg\fR(1M).
180 .SH EXAMPLES
182 \fBExample 1 \fRConfiguring the Resource Capping Daemon with Immediate
183 Enforcement
186 # \fBrcapadm -E -i scan=\fI15\fR,sample=\fI5\fR,report=\fI5\fR,config=\fI60\fR
187 -c \fI0\fR\fR
190 \fBExample 2 \fRSpecifying a Resource Cap for a Zone
193 The command shown below specifies the maximum amount of memory that can be
194 consumed by a specified zone. Note that this value lasts only until the next
195 reboot. To set a persistent cap, use \fBzonecfg\fR(1M).
198 .in +2
200 # \fBrcapadm -z testzone -m 512M\fR
202 .in -2
205 .SH EXIT STATUS
208 The following exit values are returned:
210 .ne 2
212 \fB\fB0\fR\fR
214 .RS 5n
215 Successful completion. The modifications to the current configuration were
216 valid and made successfully.
220 .ne 2
222 \fB\fB1\fR\fR
224 .RS 5n
225 An error occurred. A fatal error occurred either in obtaining or modifying the
226 resource capping configuration.
230 .ne 2
232 \fB\fB2\fR\fR
234 .RS 5n
235 Invalid command-line options were specified.
238 .SH ATTRIBUTES
241 See \fBattributes\fR(5) for descriptions of the following attributes:
246 box;
247 c | c
248 l | l .
249 ATTRIBUTE TYPE  ATTRIBUTE VALUE
251 Interface Stability     Evolving
256 The \fB-z\fR and \fB-m\fR options are committed interfaces.
257 .SH SEE ALSO
260 \fBrcapstat\fR(1), \fBrcapd\fR(1M), \fBzonecfg\fR(1M), \fBproject\fR(4),
261 \fBattributes\fR(5), \fBzones\fR(5)
264 "Physical Memory Control Using the Resource Capping Daemon" in \fISystem
265 Administration Guide: Solaris Containers-Resource Management, and Solaris
266 Zones\fR