1rcapstat(1)                      User Commands                     rcapstat(1)
2
3
4

NAME

6       rcapstat - report resource cap enforcement daemon statistics
7

SYNOPSIS

9       rcapstat [-g] [-p | -z] [-T u | d ] [interval [count]]
10
11

DESCRIPTION

13       The  rcapstat  command  reports  on  the  projects  or  zones capped by
14       rcapd(1M). Each report contains statistics that pertain to the  project
15       or  zone  and paging statistics. Paging refers to the act of relocating
16       portions of memory, called pages, to or  from  physical  memory.  rcapd
17       pages out the most infrequently used pages.
18
19
20       The  paging  statistics  in  the  first report issued show the activity
21       since the daemon was started. Subsequent reports reflect  the  activity
22       since the last report was issued.
23
24
25       Reports  are issued every interval seconds up to the quantity specified
26       by count, or forever if count is not specified.
27

OPTIONS

29       The following options are supported:
30
31       -g          Global statistics. Reports the minimum  memory  utilization
32                   for  memory  cap  enforcement (see rcapadm(1M)) and reports
33                   current memory utilization as  a  percentage  of  installed
34                   physical memory.
35
36
37       -p          Report statistics for capped projects.  This is the default
38                   if no option is specified.
39
40
41       -T u | d    Display a time stamp.
42
43                   Specify u for a printed representation of the internal rep‐
44                   resentation  of  time.  See time(2). Specify d for standard
45                   date format. See date(1).
46
47
48       -z          Report statistics for capped zones.
49
50

OUTPUT

52       The following list defines the column headings in the  rcapstat  report
53       and provides information about how to interpret the report.
54
55       id         The project ID or zone ID of the capped project or zone.
56
57
58       project    The project name.
59
60
61       zone       The zone name.
62
63
64       nproc      The  number  of  processes  in the project or zone since the
65                  last report.
66
67
68       vm         The total virtual memory size of the project or zone's  pro‐
69                  cesses, including all mapped files and devices, in kilobytes
70                  (K), megabytes (M), or gigabytes (G).
71
72
73       rss        The total resident set size (RSS) of the project  or  zone's
74                  processes,  in  kilobytes  (K),  megabytes (M), or gigabytes
75                  (G). The count does not account for shared pages.
76
77
78       cap        The RSS cap for the  project  or  zone.  See  rcapd(1M)  for
79                  information about how to specify memory caps.
80
81
82       at         The total amount of memory that rcapd attempted to page out.
83
84                  Paging  refers  to the act of relocating portions of memory,
85                  called pages, to or from physical memory.  rcapd  pages  out
86                  the most infrequently used pages.
87
88
89       avgat      The  average  amount  of memory that rcapd attempted to page
90                  out during  each sample cycle. The rate at which rcapd  sam‐
91                  ples RSS can be set with rcapadm(1M).
92
93
94       pg         An  estimate  of  the total amount of memory that rcapd suc‐
95                  cessfully paged out.
96
97
98       avgpg      An estimate of the average amount of memory that rcapd  suc‐
99                  cessfully  paged  out  during each sample cycle. The rate at
100                  which rcapd samples process RSS sizes can be set  with  rca‐
101                  padm.
102
103

OPERANDS

105       The following operands are supported:
106
107       interval    Specifies  the  reporting  interval in seconds. The default
108                   interval is 5 seconds.
109
110
111       count       Specifies the number of reports  to  produce.  By  default,
112                   rcapstat  reports  statistics until a termination signal is
113                   received or until the rcapd process exits.
114
115

EXAMPLES

117       Example 1 Using rcapstat to Report Cap and Project Information
118
119
120       Caps are defined for two projects associated with two users. user1  has
121       a cap of 50 megabytes and user2 has a cap of 10 megabytes.
122
123
124
125       The following command produces five reports at 5-second sampling inter‐
126       vals.
127
128
129         example# rcapstat 5 5
130             id project  nproc     vm    rss   cap    at avgat    pg avgpg
131         112270   user1     24   123M    35M   50M   50M    0K 3312K    0K
132          78194   user2      1  2368K  1856K   10M    0K    0K    0K    0K
133             id project  nproc     vm    rss   cap    at avgat    pg avgpg
134         112270   user1     24   123M    35M   50M    0K    0K    0K    0K
135          78194   user2      1  2368K  1856K   10M    0K    0K    0K    0K
136             id project  nproc     vm    rss   cap    at avgat    pg avgpg
137         112270   user1     24   123M    35M   50M    0K    0K    0K    0K
138          78194   user2      1  2368K  1928K   10M    0K    0K    0K    0K
139             id project  nproc     vm    rss   cap    at avgat    pg avgpg
140         112270   user1     24   123M    35M   50M    0K    0K    0K    0K
141          78194   user2      1  2368K  1928K   10M    0K    0K    0K    0K
142             id project  nproc     vm    rss   cap    at avgat    pg avgpg
143         112270   user1     24   123M    35M   50M    0K    0K    0K    0K
144          78194   user2      1  2368K  1928K   10M    0K    0K    0K    0K
145
146
147
148
149       The first three lines of output constitute the first report, which con‐
150       tains  the  cap and project information for the two projects and paging
151       statistics since rcapd was started. The at and pg columns are a  number
152       greater than zero for user1 and zero for user2, which indicates that at
153       some time in the daemon's history, user1 exceeded its cap but user2 did
154       not.
155
156
157
158       The subsequent reports show no significant activity.
159
160
161       Example 2 Using rcapstat to Monitor the RSS of a Project
162
163         example% rcapstat 5 5
164             id project  nproc    vm   rss   cap    at avgat     pg  avgpg
165         376565   user1     57  209M   46M   10M  440M  220M  5528K  2764K
166         376565   user1     57  209M   44M   10M  394M  131M  4912K  1637K
167         376565   user1     56  207M   43M   10M  440M  147M  6048K  2016K
168         376565   user1     56  207M   42M   10M  522M  174M  4368K  1456K
169         376565   user1     56  207M   44M   10M  482M  161M  3376K  1125K
170
171
172
173
174       The  project user1 has an RSS in excess of its physical memory cap. The
175       nonzero values in the pg column indicate  that  rcapd  is  consistently
176       paging out memory as it attempts to meet the cap by lowering the physi‐
177       cal memory utilization of the project's processes.  However,  rcapd  is
178       unsuccessful, as indicated by the varying rss values that do not show a
179       corresponding decrease. This means that the application's resident mem‐
180       ory  is  being  actively used, forcing rcapd to affect the working set.
181       Under this condition, the system  continues  to  experience  high  page
182       fault  rates,  and  associated I/O, until the working set size (WSS) is
183       reduced, the cap is raised,  or  the  application  changes  its  memory
184       access  pattern. Notice that a page fault occurs when either a new page
185       must be created, or the system must  copy  in  a  page  from  the  swap
186       device.
187
188
189       Example 3 Determining the Working Set Size of a Project
190
191
192       This  example  is  a  continuation  of  Example 1, and it uses the same
193       project.
194
195
196         example% rcapstat 5 5
197             id project  nproc    vm   rss   cap    at avgat     pg  avgpg
198         376565   user1     56  207M   44M   10M  381M  191M    15M  7924K
199         376565   user1     56  207M   46M   10M  479M  160M  2696K   898K
200         376565   user1     56  207M   46M   10M  424M  141M  7280K  2426K
201         376565   user1     56  207M   43M   10M  401M  201M  4808K  2404K
202         376565   user1     56  207M   43M   10M  456M  152M  4800K  1600K
203         376565   user1     56  207M   44M   10M  486M  162M  4064K  1354K
204         376565   user1     56  207M   52M  100M  191M   95M  1944K   972K
205         376565   user1     56  207M   55M  100M    0K    0K     0K     0K
206         376565   user1     56  207M   56M  100M    0K    0K     0K     0K
207         376565   user1     56  207M   56M  100M    0K    0K     0K     0K
208         376565   user1     56  207M   56M  100M    0K    0K     0K     0K
209         376565   user1     56  207M   56M  100M    0K    0K     0K     0K
210
211
212
213
214       By inhibiting cap enforcement, either by raising the cap of  a  project
215       or  by  changing  the  minimum  physical   memory  utilization  for cap
216       enforcement (see rcapadm(1M)), the resident set can become the  working
217       set.  The  rss column might stabilize to show the project WSS, as shown
218       in the previous example. The WSS is the minimum cap value  that  allows
219       the  project's  processes to operate without perpetually incurring page
220       faults.
221
222

EXIT STATUS

224       The following exit values are returned:
225
226       0    Successful completion.
227
228
229       1    An error occurred.
230
231
232       2    Invalid command-line options were specified.
233
234

ATTRIBUTES

236       See attributes(5) for descriptions of the following attributes:
237
238
239
240
241       ┌─────────────────────────────┬─────────────────────────────┐
242       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
243       ├─────────────────────────────┼─────────────────────────────┤
244       │Availability                 │SUNWrcapu                    │
245       └─────────────────────────────┴─────────────────────────────┘
246

SEE ALSO

248       rcapadm(1M), rcapd(1M), attributes(5)
249
250
251       Physical Memory Control Using the Resource  Capping  Daemon  in  System
252       Administration Guide: Resource Management
253

NOTES

255       If  the  interval  specified  to rcapstat is shorter than the reporting
256       interval specified to rcapd (with rcapadm(1M)),  the  output  for  some
257       intervals can be zero. This is because rcapd does not update statistics
258       more frequently than the interval  specified  with  rcapadm,  and  this
259       interval  is independent of (and less precise than) the sampling inter‐
260       val used by rcapstat.
261
262
263
264SunOS 5.11                        16 Jun 2009                      rcapstat(1)
Impressum