Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / ctstat.1
blobeac5c7d6dff2123f3c65510ad38f0d6ff33d8989
1 '\" te
2 .\" Copyright (c) 2008, 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. 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
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CTSTAT 1 "Jun 16, 2009"
7 .SH NAME
8 ctstat \- display active system contracts
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/bin/ctstat\fR [\fB-a\fR] [\fB-i\fR \fIcontractid...\fR] [\fB-t\fR \fItype...\fR] [\fB-v\fR]
13      [\fB-T\fR u | d ] [\fIinterval\fR [\fIcount\fR]]
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 The \fBctstat\fR utility allows a user to observe the contracts active on a
20 system.
21 .sp
22 .LP
23 Unless you specify the \fB-i\fR or \fB-t\fR option, \fBctstat\fR displays
24 statistics on all contracts in the system.
25 .SH OPTIONS
26 .sp
27 .LP
28 The following options are supported:
29 .sp
30 .ne 2
31 .na
32 \fB\fB-a\fR\fR
33 .ad
34 .sp .6
35 .RS 4n
36 Display all contracts regardless of state. By default, only those contracts
37 which are in the owned, inherited, or orphan states are displayed.
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fB-i\fR \fIcontractid\fR...\fR
44 .ad
45 .sp .6
46 .RS 4n
47 Request status on the specified contracts, identified by their numeric contract
48 identifier (\fIcontract_id\fR).
49 .sp
50 This option accepts lists as arguments . Items in the list can be separated by
51 commas, or enclosed in quotes and separated by commas or spaces.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
58 .ad
59 .sp .6
60 .RS 4n
61 Display a time stamp.
62 .sp
63 Specify \fBu\fR for a printed representation of the internal representation of
64 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
65 \fBdate\fR(1).
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fB-t\fR \fItype\fR...\fR
72 .ad
73 .sp .6
74 .RS 4n
75 Request status on contracts of the specified type (\fItype\fR).
76 .sp
77 This option accepts lists as arguments. Items in the list can be separated by
78 commas, or enclosed in quotes and separated by commas or spaces.
79 .sp
80 The following types are supported:
81 .sp
82 .ne 2
83 .na
84 \fB\fBprocess\fR\fR
85 .ad
86 .sp .6
87 .RS 4n
88 Process contracts
89 .RE
91 .RE
93 .sp
94 .ne 2
95 .na
96 \fB\fB-v\fR\fR
97 .ad
98 .sp .6
99 .RS 4n
100 Verbose output.
103 .SH OPERANDS
106 The following operands are supported:
108 .ne 2
110 \fB\fIinterval\fR\fR
112 .sp .6
113 .RS 4n
114 Report once each \fIinterval\fR seconds.
118 .ne 2
120 \fB\fIcount\fR\fR
122 .sp .6
123 .RS 4n
124 Print only \fIcount\fR reports.
127 .SH OUTPUT
130 The following list defines the column headings and the meanings of a
131 \fBctstat\fR report:
133 .ne 2
135 \fBCTID\fR
137 .sp .6
138 .RS 4n
139 The contract \fBID\fR of the contract.
143 .ne 2
145 \fBZONEID\fR
147 .sp .6
148 .RS 4n
149 The zone ID of the contract's creator.
153 .ne 2
155 \fBTYPE\fR
157 .sp .6
158 .RS 4n
159 The contract type.
163 .ne 2
165 \fBSTATE\fR
167 .sp .6
168 .RS 4n
169 The state of the contract:
171 .ne 2
173 \fBowned\fR
175 .sp .6
176 .RS 4n
177 Contract is owned by a process.
181 .ne 2
183 \fBinherited\fR
185 .sp .6
186 .RS 4n
187 The contract owner has exited abnormally and the contract has been inherited by
188 the owner's process contract.
192 .ne 2
194 \fBorphan\fR
196 .sp .6
197 .RS 4n
198 The contract owner has abandoned the contract, the contract owner exited
199 abnormally and the contract was not inherited by the owner's process contract,
200 or the process contract which had inherited the contract was abandoned by its
201 owner.
205 .ne 2
207 \fBdead\fR
209 .sp .6
210 .RS 4n
211 The contract is no longer active. It is removed from the system automatically
212 when all references to it (open file descriptors, contract templates, and
213 events) have been released.
219 .ne 2
221 \fBHOLDER\fR
223 .sp .6
224 .RS 4n
225 If the contract is in the \fBowned\fR state, the pid of the process that owns
226 the contract. If the contract is in the \fBinherited\fR state, the id of the
227 regent process contract.
231 .ne 2
233 \fBEVENTS\fR
235 .sp .6
236 .RS 4n
237 The number of unacknowledged critical events pending.
241 .ne 2
243 \fBQTIME\fR
245 .sp .6
246 .RS 4n
247 The time until quantum ends, or \fB-\fR if no negotiation is in progress.
251 .ne 2
253 \fBNTIME\fR
255 .sp .6
256 .RS 4n
257 The time until negotiation ends, or \fB-\fR if no negotiation is in progress.
260 .SH EXAMPLES
262 \fBExample 1 \fRReporting on all Contracts in the System
265 The following example reports on all contracts in the system:
268 .in +2
270 example% ctstat -a
272 CTID    TYPE    STATE   HOLDER  EVENTS  QTIME   NTIME
273 1       process owned   100579  0       -       -
274 2       process dead    -       1       -       -
275 3       process inherit 1       3       -       -
276 4       process orphan  -       0       -       -
278 .in -2
282 \fBExample 2 \fRObtaining a Verbose Report of All Contracts in the System
285 The following example obtains a verbose report of all contracts in the system:
288 .in +2
290 example% ctstat -av
292 CTID    TYPE    STATE   HOLDER  EVENTS  QTIME   NTIME
293 1       process owned   100579  0       -       -
294         informative event set: none
295         critical event set:    hwerr core
296         fatal event set:       hwerr
297         parameter set:         none
298         member processes:      100600 100601
299         inherited ctids:       none
300         service fmri:          svc:/system/init:default
301         svc_fmri ctid:         1
302         creator:               sched
303         aux:
305 2       process dead    -       1       -       -
306         informative event set: none
307         critical event set:    none
308         fatal event set:       hwerr core
309         parameter set:         pgrponly
310         member processes:      none
311         inherited ctids:       none
312         service fmri:          svc:/system/power:default
313         svc_fmri ctid:         19
314         creator:               svc.startd
315         aux:                   start
317 .in -2
320 .SH EXIT STATUS
323 The following exit values are returned:
325 .ne 2
327 \fB\fB0\fR\fR
329 .sp .6
330 .RS 4n
331 Successful completion.
335 .ne 2
337 \fB\fB1\fR\fR
339 .sp .6
340 .RS 4n
341 An error occurred.
345 .ne 2
347 \fB\fB2\fR\fR
349 .sp .6
350 .RS 4n
351 Invalid arguments.
354 .SH FILES
357 \fB/system/contract/*\fR
358 .SH ATTRIBUTES
361 See \fBattributes\fR(5) for descriptions of the following attributes:
366 box;
367 c | c
368 l | l .
369 ATTRIBUTE TYPE  ATTRIBUTE VALUE
371 Interface Stability     See below.
376 The human readable output is Uncommitted. The invocation is Committed.
377 .SH SEE ALSO
380 \fBctrun\fR(1), \fBctwatch\fR(1), \fBcontract\fR(4), \fBprocess\fR(4),
381 \fBattributes\fR(5)