ctstat - display active system contracts
/usr/bin/ctstat [-a] [-i contractid...] [-t type...] [-v] [interval [count]]
The ctstat utility allows a user to observe the contracts active on a system.
Unless you specify the -i or -t option, ctstat displays statistics on all contracts in the system.
The following options are supported:
-aDisplay all contracts regardless of state. By default, only those contracts which are in the owned, inherited, or orphan states are displayed.
-i contractid...Request status on the specified contracts, identified by their numeric contract identifier (contract_id).
This option accepts lists as arguments . Items in the list can be separated by commas, or enclosed in quotes and separated by commas or spaces.
-t type...Request status on contracts of the specified type (type).
This option accepts lists as arguments. Items in the list can be separated by commas, or enclosed in quotes and separated by commas or spaces.
The following types are supported:
The following operands are supported:
intervalReport once each interval seconds.
countPrint only count reports.
The following list defines the column headings and the meanings of a ctstat report:
CTIDThe contract ID of the contract.
ZONEIDThe zone ID of the contracts creator.
TYPEThe contract type.
STATEThe state of the contract:
ownedContract is owned by a process.
inheritedThe contract owner has exited abnormally and the contract has been inherited by the owners process contract.
orphanThe contract owner has abandoned the contract, the contract owner exited abnormally and the contract was not inherited by the owners process contract, or the process contract which had inherited the contract was abandoned by its owner.
deadThe contract is no longer active. It is removed from the system automatically when all references to it (open file descriptors, contract templates, and events) have been released.
HOLDERIf the contract is in the owned state, the pid of the process that owns the contract. If the contract is in the inherited state, the id of the regent process contract.
EVENTSThe number of unacknowledged critical events pending.
QTIMEThe time until quantum ends, or - if no negotiation is in progress.
NTIMEThe time until negotiation ends, or - if no negotiation is in progress.
Example 1 Reporting on all Contracts in the System
The following example reports on all contracts in the system:
example% ctstat -a
CTID TYPE STATE HOLDER EVENTS QTIME NTIME 1 process owned 100579 0 - - 2 process dead - 1 - - 3 process inherit 1 3 - - 4 process orphan - 0 - -
Example 2 Obtaining a Verbose Report of All Contracts in the System
The following example obtains a verbose report of all contracts in the system:
example% ctstat -av
CTID TYPE STATE HOLDER EVENTS QTIME NTIME 1 process owned 100579 0 - - informative event set: none critical event set: hwerr core fatal event set: hwerr parameter set: none member processes: 100600 100601 inherited ctids: none service fmri: svc:/system/init:default svc_fmri ctid: 1 creator: sched aux:
2 process dead - 1 - - informative event set: none critical event set: none fatal event set: hwerr core parameter set: pgrponly member processes: none inherited ctids: none service fmri: svc:/system/power:default svc_fmri ctid: 19 creator: svc.startd aux: start
The following exit values are returned:
1An error occurred.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWcsu
The human readable output is Uncommitted. The invocation is Committed.
ctrun(1), ctwatch(1), contract(4), process(4), attributes(5)
|SunOS 5.11||ctstat (1)||25 Feb 2008|