1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
.\" 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. 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 the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH CTWATCH 1 "Jul 14, 2004"
.SH NAME
ctwatch \- watch events in a contract or group of contracts
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/ctwatch\fR [\fB-f\fR] [\fB-r\fR] [\fB-v\fR] \fIcontract-type\fR... | \fIcontract-id\fR...
.fi
.SH DESCRIPTION
.sp
.LP
The \fBctwatch\fR utility allows a user to observe the events occurring within
a set of contracts or contract types. By default, \fBctwatch\fR watches all
contracts.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
Report events starting at the front of the event queue. Normally, \fBctwatch\fR
reports only events which occur after it has been invoked. With the \fB-f\fR
option, any events that still exist in the contracts' event queues when
\fBctwatch\fR is invoked (for example, unacknowledged critical events) are also
reported.
.RE
.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 6n
Reliably watches all messages. Normally, the system may drop informative events
and acknowledged critical events at any time, so \fBctwatch\fR isn't guaranteed
to see them all. This option may only be used if the \fBctwatch\fR is invoked
with the \fB{PRIV_CONTRACT_EVENT}\fR privilege asserted in its effective set.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 6n
Request verbose event descriptions.
.RE
.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcontract-type\fR\fR
.ad
.RS 17n
Valid contract types are:
.sp
.ne 2
.na
\fBprocess\fR
.ad
.RS 11n
Process contracts.
.RE
.RE
.sp
.ne 2
.na
\fB\fIcontract-id\fR\fR
.ad
.RS 17n
A valid contract id.
.RE
.SH OUTPUT
.sp
.LP
The following list defines the column headings and the meanings of a
\fBctwatch\fR report:
.sp
.ne 2
.na
\fBCTID\fR
.ad
.RS 11n
The contract \fBID\fR generating the event.
.RE
.sp
.ne 2
.na
\fBEVID\fR
.ad
.RS 11n
The event \fBID\fR.
.RE
.sp
.ne 2
.na
\fBCRIT\fR
.ad
.RS 11n
Whether the event is informative, critical, or initiates an exit negotiation.
Values are \fBinfo\fR, \fBcrit\fR, or \fBneg\fR, respectively.
.RE
.sp
.ne 2
.na
\fBACK\fR
.ad
.RS 11n
The event has been acknowledged. Values are \fByes\fR or "\fBno\fR".
.RE
.sp
.ne 2
.na
\fBCTTYPE\fR
.ad
.RS 11n
The contract type.
.RE
.sp
.ne 2
.na
\fBSUMMARY\fR
.ad
.RS 11n
A type-specific summary of the event.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRWatching a process contract
.sp
.in +2
.nf
example% \fBctwatch -r 1\fR
CTID EVID CRIT ACK CTTYPE SUMMARY
1 2 crit no process pid 100569 was created
1 3 info no process pid 100569 encountered hardware error
1 4 info no process pid 100568 exited
1 5 info no process pid 100569 exited
1 6 crit no process contract empty
.fi
.in -2
.sp
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
An error occurred.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
Invalid arguments.
.RE
.SH FILES
.sp
.LP
\fB/system/contract/*\fR
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability See below.
.TE
.sp
.LP
Human Readable Output is Unstable. Invocation is Evolving.
.SH SEE ALSO
.sp
.LP
\fBctrun\fR(1), \fBctstat\fR(1), \fBcontract\fR(4), \fBprocess\fR(4),
\fBattributes\fR(5), \fBprivileges\fR(5)
.SH NOTES
.sp
.LP
Ordering of events is only guaranteed within a single contract, or within a
single type when a type is specified.
.sp
.LP
\fBctwatch\fR can only observe those events which are generated by contracts
owned or authored by processes with the same effective user ID as
\fBctwatch\fR, unless the \fB{PRIV_CONTRACT_OBSERVER}\fR privilege is asserted
in its effective set.
|