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"
8 ctstat \- display active system contracts
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]]
19 The \fBctstat\fR utility allows a user to observe the contracts active on a
23 Unless you specify the \fB-i\fR or \fB-t\fR option, \fBctstat\fR displays
24 statistics on all contracts in the system.
28 The following options are supported:
36 Display all contracts regardless of state. By default, only those contracts
37 which are in the owned, inherited, or orphan states are displayed.
43 \fB\fB-i\fR \fIcontractid\fR...\fR
47 Request status on the specified contracts, identified by their numeric contract
48 identifier (\fIcontract_id\fR).
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.
57 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
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
71 \fB\fB-t\fR \fItype\fR...\fR
75 Request status on contracts of the specified type (\fItype\fR).
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.
80 The following types are supported:
106 The following operands are supported:
114 Report once each \fIinterval\fR seconds.
124 Print only \fIcount\fR reports.
130 The following list defines the column headings and the meanings of a
139 The contract \fBID\fR of the contract.
149 The zone ID of the contract's creator.
169 The state of the contract:
177 Contract is owned by a process.
187 The contract owner has exited abnormally and the contract has been inherited by
188 the owner's process contract.
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
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.
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.
237 The number of unacknowledged critical events pending.
247 The time until quantum ends, or \fB-\fR if no negotiation is in progress.
257 The time until negotiation ends, or \fB-\fR if no negotiation is in progress.
262 \fBExample 1 \fRReporting on all Contracts in the System
265 The following example reports on all contracts in the system:
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 - -
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:
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
298 member processes: 100600 100601
299 inherited ctids: none
300 service fmri: svc:/system/init:default
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
323 The following exit values are returned:
331 Successful completion.
357 \fB/system/contract/*\fR
361 See \fBattributes\fR(5) for descriptions of the following attributes:
369 ATTRIBUTE TYPE ATTRIBUTE VALUE
371 Interface Stability See below.
376 The human readable output is Uncommitted. The invocation is Committed.
380 \fBctrun\fR(1), \fBctwatch\fR(1), \fBcontract\fR(4), \fBprocess\fR(4),