6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / psradm.1m
blob917e715b277fad0cc4690d4a1dcc93ef1ddb70a9
1 '\" te
2 .\"  Copyright (c) 2008 Sun Microsystems, Inc.
3 .\" All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH PSRADM 1M "Feb 25, 2008"
8 .SH NAME
9 psradm \- change processor operational status
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBpsradm\fR \fB-f\fR | \fB-i\fR | \fB-n\fR | \fB-s\fR [\fB-v\fR] [\fB-F\fR] \fIprocessor_id\fR
14 .fi
16 .LP
17 .nf
18 \fBpsradm\fR \fB-a\fR \fB-f\fR | \fB-i\fR | \fB-n\fR | \fB-s\fR [\fB-v\fR] [\fB-F\fR]
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 The \fBpsradm\fR utility changes the operational status of processors. The
25 legal states for the processor are \fBon-line\fR, \fBoff-line\fR, \fBspare\fR,
26 \fBfaulted\fR, and \fBno-intr\fR.
27 .sp
28 .LP
29 An \fBon-line\fR processor processes \fBLWPs\fR (lightweight processes) and can
30 be interrupted by I/O devices in the system.
31 .sp
32 .LP
33 An \fBoff-line\fR processor does not process any \fBLWPs.\fR Usually, an
34 \fBoff-line\fR processor is not interruptible by I/O devices in the system. On
35 some processors or under certain conditions, it might not be possible to
36 disable interrupts for an \fBoff-line\fR processor. Thus, the actual effect of
37 being \fBoff-line\fR might vary from machine to machine.
38 .sp
39 .LP
40 A spare processor does not process any LWPs. A spare processor can be brought
41 \fBon-line\fR, \fBoff-line\fR or to \fBno-intr\fR by a privileged user of the
42 system or by the kernel in response to changes in the system state.
43 .sp
44 .LP
45 A faulted processor is identified by the kernel, which monitors the behavior of
46 processors over time. A privileged user can set the state of a faulted
47 processor to be \fBon-line\fR, \fBoff-line\fR, \fBspare\fR or \fBno-intr\fR,
48 but must use the force option to do so.
49 .sp
50 .LP
51 A \fBno-intr\fR processor processes \fBLWPs\fR but is not interruptible by I/O
52 devices.
53 .sp
54 .LP
55 A processor can not be taken \fBoff-line\fR or made \fBspare\fR if there are
56 LWPs that are bound to the processor unless the additional \fB-F\fR option is
57 used. The \fB-F\fR option removes processor bindings of such LWPs before
58 changing the processor's operational status. On some architectures, it might
59 not be possible to take certain processors \fBoff-line\fR or \fBspare\fR if,
60 for example, the system depends on some resource provided by the processor.
61 .sp
62 .LP
63 At least one processor in the system must be able to process \fBLWPs.\fR At
64 least one processor must also be able to be interrupted. Since an
65 \fBoff-line\fR or \fBspare\fR processor can be interruptible, it is possible to
66 have an operational system with one processor \fBno-intr\fR and all other
67 processors \fBoff-line\fR or \fBspare\fR but with one or more accepting
68 interrupts.
69 .sp
70 .LP
71 If any of the specified processors are powered off, \fBpsradm\fR might power on
72 one or more processors.
73 .sp
74 .LP
75 Only users with the \fBPRIV_SYS_RES_CONFIG\fR privilege can use the
76 \fBpsradm\fR utility.
77 .SH OPTIONS
78 .sp
79 .LP
80 The following options are supported:
81 .sp
82 .ne 2
83 .na
84 \fB\fB-a\fR\fR
85 .ad
86 .RS 6n
87 Perform the action on all processors, or as many as possible.
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fB-f\fR\fR
94 .ad
95 .RS 6n
96 Take the specified processors \fBoff-line\fR.
97 .RE
99 .sp
100 .ne 2
102 \fB\fB-F\fR\fR
104 .RS 6n
105 Force the transition to the additional specified state. Required if one or more
106 of the specified processors was in the faulted state. Set the specified
107 processors to faulted, if no other transition option was specified. Forced
108 transitions can only be made to \fBfaulted\fR, \fBspare\fR, or \fBoff-line\fR
109 states. Administrators are encouraged to use the \fB-Q\fR option for
110 \fBpbind\fR(1M) to find out which threads will be affected by forced a
111 processor state transition.
115 .ne 2
117 \fB\fB-i\fR\fR
119 .RS 6n
120 Set the specified processors \fBno-intr\fR.
124 .ne 2
126 \fB\fB-n\fR\fR
128 .RS 6n
129 Bring the specified processors \fBon-line\fR.
133 .ne 2
135 \fB\fB-s\fR\fR
137 .RS 6n
138 Make the specified processors spare.
142 .ne 2
144 \fB\fB-v\fR\fR
146 .RS 6n
147 Output a message giving the results of each attempted operation.
150 .SH OPERANDS
153 The following operands are supported:
155 .ne 2
157 \fB\fIprocessor_id\fR\fR
159 .RS 16n
160 The processor \fBID\fR of the processor to be set \fBon-line\fR or
161 \fBoff-line\fR, \fBspare\fR, or \fBno-intr\fR.
163 Specify \fIprocessor_id\fR as an individual processor number (for example,
164 \fB3\fR), multiple processor numbers separated by spaces (for example, \fB1 2
165 3\fR), or a range of processor numbers (for example, \fB1-4\fR). It is also
166 possible to combine ranges and (individual or multiple) \fIprocessor_id\fRs
167 (for example, \fB1-3 5 7-8 9\fR).
170 .SH EXAMPLES
172 \fBExample 1 \fRSetting Processors to \fBoff-line\fR
175 The following example sets processors 2 and 3 \fBoff-line\fR:
178 .in +2
180 % psradm \fB-f\fR 2 3
182 .in -2
186 \fBExample 2 \fRSetting Processors to no-intr
189 The following example sets processors 1 and 2 \fBno-intr\fR:
192 .in +2
194 % psradm \fB-i\fR 1 2
196 .in -2
200 \fBExample 3 \fRSetting Processors to \fBspare\fR
203 The following example sets processors 1 and 2 spare, even if either of the
204 processors was in the faulted state:
207 .in +2
209 % psradm -F -s 1 2
211 .in -2
215 \fBExample 4 \fRSetting All Processors \fBon-line\fR
217 .in +2
219 % psradm \fB-a\fR \fB-n\fR
221 .in -2
225 \fBExample 5 \fRForcing Processors to \fBoff-line\fR
228 The following example sets processors 1 and 2 offline, and revokes the
229 processor bindings from the processes bound to them:
232 .in +2
234 % psradm \fB-F\fR \fB-f\fR 1 2
236 .in -2
239 .SH EXIT STATUS
242 The following exit values are returned:
244 .ne 2
246 \fB\fB0\fR\fR
248 .RS 6n
249 Successful completion.
253 .ne 2
255 \fB\fB>0\fR\fR
257 .RS 6n
258 An error occurred.
261 .SH FILES
263 .ne 2
265 \fB\fB/etc/wtmpx\fR\fR
267 .RS 14n
268 Records logging processor status changes
271 .SH SEE ALSO
274 \fBpbind\fR(1M), \fBpsrinfo\fR(1M), \fBpsrset\fR(1M), \fBp_online\fR(2),
275 \fBprocessor_bind\fR(2), \fBattributes\fR(5)
276 .SH DIAGNOSTICS
278 .ne 2
280 \fB\fBpsradm: processor 4: Invalid argument\fR\fR
282 .sp .6
283 .RS 4n
284 The specified processor does not exist in the configuration.
288 .ne 2
290 \fB\fBpsradm: processor 3: Device busy\fR\fR
292 .sp .6
293 .RS 4n
294 The specified processor could not be taken \fBoff-line\fR because it either has
295 LWPs bound to it, is the last \fBon-line\fR processor in the system, or is
296 needed by the system because it provides some essential service.
300 .ne 2
302 \fB\fBpsradm: processor 3: Device busy\fR\fR
304 .sp .6
305 .RS 4n
306 The specified processor could not be set \fBno-intr\fR because it is the last
307 interruptible processor in the system, or or it is the only processor in the
308 system that can service interrupts needed by the system.
312 .ne 2
314 \fB\fBpsradm: processor 3: Device busy\fR\fR
316 .sp .6
317 .RS 4n
318 The specified processor is powered off, and it cannot be powered on because
319 some platform-specific resource is unavailable.
323 .ne 2
325 \fB\fBpsradm: processor 0: Not owner\fR\fR
327 .sp .6
328 .RS 4n
329 The user does not have permission to change processor status.
333 .ne 2
335 \fB\fBpsradm: processor 2: Operation not supported\fR\fR
337 .sp .6
338 .RS 4n
339 The specified processor is powered off, and the platform does not support power
340 on of individual processors.