6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / cfgadm.1m
blob782efa4be34438c22c441f21f5f8e4438adafafc
1 '\" te
2 .\"  Copyright (c) 2004, 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.
4 .\" 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.
5 .\" 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]
6 .TH CFGADM 1M "Oct 25, 2004"
7 .SH NAME
8 cfgadm \- configuration administration
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/cfgadm\fR [\fB-f\fR] [\fB-y\fR | \fB-n\fR] [\fB-v\fR] [\fB-o\fR \fIhardware_options\fR]
13      \fB-c\fR \fIfunction\fR \fIap_id\fR...
14 .fi
16 .LP
17 .nf
18 \fB/usr/sbin/cfgadm\fR [\fB-f\fR] [\fB-y\fR | \fB-n\fR] [\fB-v\fR] [\fB-o\fR \fIhardware_options\fR]
19      \fB-x\fR \fIhardware_function\fR \fIap_id\fR...
20 .fi
22 .LP
23 .nf
24 \fB/usr/sbin/cfgadm\fR [\fB-v\fR] [\fB-a\fR] [\fB-s\fR \fIlisting_options\fR]
25      [\fB-o\fR \fIhardware_options\fR] [\fB-l\fR [\fIap_id\fR | \fIap_type\fR]]
26 .fi
28 .LP
29 .nf
30 \fB/usr/sbin/cfgadm\fR [\fB-v\fR] [\fB-o\fR \fIhardware_options\fR] \fB-t\fR \fIap_id\fR...
31 .fi
33 .LP
34 .nf
35 \fB/usr/sbin/cfgadm\fR [\fB-v\fR] [\fB-o\fR \fIhardware_options\fR] \fB-h\fR
36      [\fIap_id\fR | \fIap_type\fR]
37 .fi
39 .SH DESCRIPTION
40 .sp
41 .LP
42 The \fBcfgadm\fR command provides configuration administration operations on
43 dynamically reconfigurable hardware resources. These operations include
44 displaying status, (\fB-l\fR), initiating testing, (\fB-t\fR), invoking
45 configuration state changes, (\fB-c\fR), invoking hardware specific functions,
46 (\fB-x\fR), and obtaining configuration administration help messages
47 (\fB-h\fR). Configuration administration is performed at \fBattachment
48 points\fR, which are places where system software supports dynamic
49 reconfiguration of hardware resources during continued operation of Solaris.
50 .sp
51 .LP
52 Configuration administration makes a distinction between hardware resources
53 that are physically present in the machine and hardware resources that are
54 configured and visible to Solaris. The nature of configuration administration
55 functions are hardware specific, and are performed by calling hardware specific
56 libraries.
57 .sp
58 .LP
59 Configuration administration operates on an \fBattachment point\fR. Hardware
60 resources located at attachment points can or can not be physically replaceable
61 during system operation, but are dynamically reconfigurable by way of the
62 configuration administration interfaces.
63 .sp
64 .LP
65 An attachment point defines two unique elements, which are distinct from the
66 hardware resources that exist beyond the attachment point. The two elements of
67 an attachment point are a \fBreceptacle\fR and an \fBoccupant\fR. Physical
68 insertion or removal of hardware resources occurs at attachment points and
69 results in a receptacle gaining or losing an occupant. Configuration
70 administration supports the physical insertion and removal operations as well
71 as other configuration administration functions at an attachment point.
72 .sp
73 .LP
74 Attachment points have associated state and condition information. The
75 configuration administration interfaces provide control for transitioning
76 attachment point states. A receptacle can exist in one of three states:
77 \fBempty\fR, \fBdisconnected\fR or \fBconnected\fR, while an occupant can exist
78 in one of two states: \fBconfigured\fR or \fBunconfigured\fR.
79 .sp
80 .LP
81 A receptacle can provide the \fBempty\fR state, which is the normal state of a
82 receptacle when the attachment point has no occupants. A receptacle can also
83 provide the \fBdisconnected\fR state if it has the capability of isolating its
84 occupants from normal system access. Typically this state is used for various
85 hardware specific testing prior to bringing the occupant's resources into full
86 use by the system, or as a step in preparing an occupant for physical removal
87 or reconfiguration. A receptacle in the disconnected state isolates its
88 occupant from the system as much as its hardware allows, but can provide access
89 for testing and setup. A receptacle must provide the \fBconnected\fR state,
90 which allows normal access to hardware resources contained on any occupants.
91 The connected state is the normal state of a receptacle that contains an
92 occupant and that is not currently undergoing configuration administration
93 operations.
94 .sp
95 .LP
96 The hardware resources contained on an occupant in the \fBunconfigured\fR state
97 are not represented by normal Solaris data structures and are thus not
98 available for use by Solaris. Operations allowed on an unconfigured occupant
99 are limited to configuration administration operations. The hardware resources
100 of an occupant in the \fBconfigured\fR state are represented by normal Solaris
101 data structures and thus some or all of those hardware resources can be in use
102 by Solaris. All occupants provide both the \fBconfigured\fR and
103 \fBunconfigured\fR states,
106 An attachment point can be in one of five conditions: \fBunknown\fR, \fBok\fR,
107 \fBfailing\fR, \fBfailed\fR, or \fBunusable\fR. An attachment point can enter
108 the system in any condition depending upon results of power-on tests and
109 non-volatile record keeping.
112 An attachment point with an occupant in the \fBconfigured\fR state is in one of
113 four conditions: \fBunknown\fR, \fBok\fR, \fBfailing\fR, or \fBfailed\fR. If
114 the condition is not \fBfailing\fR or \fBfailed\fR an attachment point can
115 change to \fBfailing\fR during the course of operation if a hardware dependent
116 recoverable error threshold is exceeded. If the condition is not \fBfailed\fR
117 an attachment point can change to \fBfailed\fR during operation as a result of
118 an unrecoverable error.
121 An attachment point with an occupant in the \fBunconfigured\fR state can be in
122 any of the defined conditions. The condition of an attachment point with an
123 \fBunconfigured\fR occupant can decay from \fBok\fR to \fBunknown\fR after a
124 machine dependent time threshold. Initiating a test function changes the
125 attachment point's condition to \fBok\fR, \fBfailing\fR or \fBfailed\fR
126 depending on the outcome of the test. An attachment point that does not provide
127 a test function can leave the attachment point in the \fBunknown\fR condition.
128 If a test is interrupted, the attachment point's condition can be set to the
129 previous condition, \fBunknown\fR or \fBfailed\fR. An attachment point in the
130 \fBunknown\fR, \fBok\fR, \fBfailing\fR, or \fBfailed\fR conditions can be
131 re-tested.
134 An attachment point can exist in the \fBunusable\fR condition for a variety of
135 reasons, such as inadequate power or cooling for the receptacle, an occupant
136 that is unidentifiable, unsupported, incorrectly configured, etc. An attachment
137 point in the \fBunusable\fR condition can never be used by the system. It
138 typically remains in this condition until the physical cause is remedied.
141 An attachment point also maintains busy information that indicates when a state
142 change is in progress or the condition is being reevaluated.
145 Attachment points are referred to using hardware specific identifiers
146 (\fIap_id\fRs) that are related to the type and location of the attachment
147 points in the system device hierarchy. An \fIap_id\fR can not be ambiguous, it
148 must identify a single attachment point. Two types of \fIap_id\fR
149 specifications are supported: physical and logical. A physical \fIap_id\fR
150 contains a fully specified pathname, while a logical \fIap_id\fR contains a
151 shorthand notation that identifies an attachment point in a more user-friendly
152 way.
155 For example, an attachment point representing a system's backplane slot number
156 \fB7\fR could have a physical \fIap_id\fR of
157 \fB/devices/central/fhc/sysctrl:slot7\fR while the logical \fIap_id\fR could be
158 \fBsystem:slot7\fR. Another example, the third receptacle on the second \fBPCI
159 I/O\fR bus on a system could have a logical \fIap_id\fR of \fBpci2:plug3\fR.
162 Attachment points may also be created dynamically. A dynamic attachment point
163 is named relative to a base attachment point which is present in the system.
164 \fBap_id\fRs for dynamic attachment points consist of a base component followed
165 by two colons (\fB::\fR) and a dynamic component. The base component is the
166 base attachment point \fBap_id\fR. The dynamic component is hardware specific
167 and generated by the corresponding hardware specific library.
170 For example, consider a base attachment point, which represents a \fBSCSI
171 HBA\fR, with the physical \fBap_id\fR
172 \fB/devices/sbus@1f,0/SUNW,fas@e,8800000:scsi\fR and logical \fBap_id c0\fR . A
173 disk attached to this \fBSCSI HBA\fR could be represented by a dynamic
174 attachment point with logical \fBap_id\fR \fBc0::dsk/c0t0d0\fR where \fBc0\fR
175 is the base component and \fBdsk/c0t0d0\fR is the hardware specific dynamic
176 component. Similarly the physical \fBap_id\fR for this dynamic attachment point
177 would be: \fB/devices/sbus@1f,0/SUNW,fas@e,8800000:scsi::dsk/c0t0d0\fR
180 An \fIap_type\fR is a partial form of a logical \fBap_id\fR that can be
181 ambiguous and not specify a particular attachment point. An \fIap_type\fR is a
182 substring of the portion of the logical \fBap_id\fR up to but not including the
183 colon (\fB:\fR) separator. For example, an \fIap_type\fR of \fBpci\fR would
184 show all attachment points whose logical \fIap_id\fRs begin with \fBpci\fR.
187 The use of \fIap_types\fR is discouraged. The new select sub-option to the
188 \fB-s\fR option provides a more general and flexible mechanism for selecting
189 attachment points. See \fBOPTIONS\fR.
192 The \fBcfgadm\fR command interacts primarily with hardware dependent functions
193 contained in hardware specific libraries and thus its behavior is hardware
194 dependent.
197 For each configuration administration operation a service interruption can be
198 required. Should the completion of the function requested require a noticeable
199 service interruption to interactive users, a prompt is output on the standard
200 error output for confirmation on the standard input before the function is
201 started. Confirmation can be overridden using the \fB-y\fR or \fB-n\fR options
202 to always answer yes or no respectively. Hardware specific options, such as
203 test level, are supplied as sub-options using the \fB-o\fR option.
206 Operations that change the state of the system configuration are audited by the
207 system log daemon \fBsyslogd\fR(1M).
210 The arguments for this command conform to the \fBgetopt\fR(3C) and
211 \fBgetsubopt\fR(3C) syntax convention.
212 .SH OPTIONS
215 The following options are supported:
217 .ne 2
219 \fB\fB-a\fR\fR
221 .sp .6
222 .RS 4n
223 Specifies that the \fB-l\fR option must also list dynamic attachment points.
227 .ne 2
229 \fB\fB-c\fR\fIfunction\fR\fR
231 .sp .6
232 .RS 4n
233 Performs the state change \fIfunction\fR on the attachment point specified by
234 \fIap_id.\fR
236 Specify \fIfunction\fR as \fBinsert\fR, \fBremove\fR, \fBdisconnect\fR,
237 \fBconnect\fR, \fBconfigure\fR or \fBunconfigure\fR. These functions cause
238 state transitions at the attachment point by calling hardware specific library
239 routines and are defined in the following list.
241 .ne 2
243 \fB\fBinsert\fR\fR
245 .RS 15n
246 Performs operations that allows the user to manually insert an occupant or to
247 activate a hardware supplied mechanism that performs the physical insertion.
248 \fBinsert\fR can have hardware specific side effects that temporarily suspend
249 activity in portions of the system. In such cases the hardware specific library
250 generates appropriate warning messages and informs the user of any special
251 considerations or procedures unique to that hardware. Various hardware specific
252 errors can cause this function to fail and set the receptacle condition to
253 \fBunusable\fR.
257 .ne 2
259 \fB\fBremove\fR\fR
261 .RS 15n
262 Performs operations that allow the user to manually remove an occupant or to
263 activate a hardware supplied mechanism to perform the physical removal.
264 \fBremove\fR can have hardware specific side effects that temporarily suspend
265 activity in portions of the system. In such cases the hardware specific library
266 generates appropriate warning messages and informs the user of any special
267 considerations or procedures unique to that hardware. Various hardware specific
268 errors can cause this function to fail and set the receptacle condition to
269 unusable.
273 .ne 2
275 \fB\fBdisconnect\fR\fR
277 .RS 15n
278 Performs hardware specific operations to put a receptacle in the disconnected
279 state, which can prevent an occupant from operating in a normal fashion through
280 the receptacle.
284 .ne 2
286 \fB\fBconnect\fR\fR
288 .RS 15n
289 Performs hardware specific operations to put the receptacle in the
290 \fBconnected\fR state, which allows an occupant to operate in a normal fashion
291 through the receptacle.
295 .ne 2
297 \fB\fBconfigure\fR\fR
299 .RS 15n
300 Performs hardware specific operations that allow an occupant's hardware
301 resources to be usable by Solaris. Occupants that are configured are part of
302 the system configuration and are available for manipulation by Solaris device
303 manipulation maintenance commands (eg: \fBpsradm\fR(1M), \fBmount\fR(1M),
304 \fBifconfig\fR(1M)).
308 .ne 2
310 \fB\fBunconfigure\fR\fR
312 .RS 15n
313 Performs hardware specific operations that logically remove an occupant's
314 hardware resources from the system. The occupant must currently be configured
315 and its hardware resources must not be in use by Solaris.
318 State transition functions can fail due to the condition of the attachment
319 point or other hardware dependent considerations. All state change
320 \fIfunction\fRs in the direction of adding resources, \fB(insert,\fR
321 \fBconnect\fR and \fBconfigure)\fR are passed onto the hardware specific
322 library when the attachment point is in the \fBok\fR or \fBunknown\fR
323 condition. All other conditions require the use of the force option to allow
324 these \fIfunction\fRs to be passed on to the hardware specific library.
325 Attachment point condition does not prevent a hardware specific library being
326 called for related to the removal (\fBremove,\fR \fBdisconnect\fR and
327 \fBunconfigure\fR), of hardware resources from the system. Hardware specific
328 libraries can reject state change \fIfunction\fRs if the attachment point is in
329 the \fBunknown\fR condition.
331 The condition of an attachment point is not necessarily changed by the state
332 change functions, however errors during state change operations can change the
333 attachment point condition. An attempt to override a condition and force a
334 state change that would otherwise fail can be made by specifying the force
335 option (\fB-f\fR). Hardware specific safety and integrity checks can prevent
336 the force option from having any effect.
340 .ne 2
342 \fB\fB-f\fR\fR
344 .sp .6
345 .RS 4n
346 Forces the specified action to occur. Typically, this is a hardware dependent
347 override of a safety feature. Forcing a state change operation can allow use of
348 the hardware resources of occupant that is not in the \fBok\fR or \fBunknown\fR
349 conditions, at the discretion of any hardware dependent safety checks.
353 .ne 2
355 \fB\fB\fR\fB-h\fR [\fIap_id\fR | \fIap_type\fR \|.\|.\|. ]\fR
357 .sp .6
358 .RS 4n
359 Prints out the help message text. If \fIap_id\fR or \fIap_type\fR is specified,
360 the help routine of the hardware specific library for the attachment point
361 indicated by the argument is called.
365 .ne 2
367 \fB\fB\fR\fB-l\fR [\fIap_id\fR | \fIap_type\fR \|.\|.\|. ]\fR
369 .sp .6
370 .RS 4n
371 Lists the state and condition of attachment points specified. Attachment points
372 can be filtered by using the \fB-s\fR option and \fBselect\fR sub-option.
373 Invoking \fBcfgadm\fR without one of the action options is equivalent to
374 \fB-l\fR without an argument. The format of the list display is controlled by
375 the \fB-v\fR and \fB-s\fR options. When the \fB-a\fR option is specified
376 attachment points are dynamically expanded.
380 .ne 2
382 \fB\fB-n\fR\fR
384 .sp .6
385 .RS 4n
386 Suppress any interactive confirmation and assume that the answer is \fIno\fR.
387 If neither \fB-n\fR or \fB-y\fR is specified, interactive confirmation is
388 obtained through the standard error output and the standard input. If either of
389 these standard channels does not correspond to a terminal (as determined by
390 \fBisatty\fR(3C)) then the \fB-n\fR option is assumed.
394 .ne 2
396 \fB\fB-o\fR\fIhardware_options\fR\fR
398 .sp .6
399 .RS 4n
400 Supplies hardware specific options to the main command option. The format and
401 content of the hardware option string is completely hardware specific. The
402 option string \fIhardware_options\fR conforms to the \fBgetsubopt\fR(3C) syntax
403 convention.
407 .ne 2
409 \fB\fB-s\fR\fIlisting_options\fR\fR
411 .sp .6
412 .RS 4n
413 Supplies listing options to the list (\fB-l\fR) command. \fIlisting_options\fR
414 conforms to the \fBgetsubopt\fR(3C) syntax convention. The sub-options are used
415 to specify the attachment point selection criteria (
416 \fBselect\fR=\fIselect_string\fR), the type of matching desired
417 (\fBmatch\fR=\fImatch_type\fR), order of listing (\fBsort\fR=\fIfield_spec\fR),
418 the data that is displayed (\fBcols=\fR\fIfield_spec\fR and
419 \fBcols2=\fR\fIfield_spec\fR), the column delimiter (\fBdelim=\fR\fIstring\fR)
420 and whether to suppress column headings (\fBnoheadings\fR).
422 When the \fBselect\fR sub-option is specified, only attachment points which
423 match the specified criteria will be listed. The \fBselect\fR sub-option has
424 the following syntax:
426 .in +2
428 cfgadm \fB-s\fR select=attr1(value1):attr2(value2)...
430 .in -2
433 where an \fIattr\fR is one of \fBap_id\fR, \fBclass\fR or \fBtype\fR.
434 \fBap_id\fR refers to the logical \fIap_id\fR field, \fBclass\fR refers to
435 attachment point class and \fBtype\fR refers to the type field. \fIvalue1\fR,
436 \fIvalue2\fR, etc. are the corresponding values to be matched. The type of
437 match can be specified by the \fBmatch\fR sub-option as follows:
439 .in +2
441 cfgadm \fB-s\fR match=\fImatch_type\fR,select=attr1(value1)...
443 .in -2
446 where \fImatch_type\fR can be either \fBexact\fR or \fBpartial\fR. The default
447 value is \fBexact\fR.
449 Arguments to the \fBselect\fR sub-option can be quoted to protect them from the
450 shell.
452 A \fIfield_spec\fR is one or more \fIdata-field\fRs concatenated using colon
453 (\fB:\fR), as in \fIdata-field\fR:\fIdata-field\fR:\fIdata-field\fR. A
454 \fIdata-field\fR is one of \fBap_id\fR, \fBphysid\fR, \fBr_state\fR,
455 \fBo_state\fR, \fBcondition\fR, \fBtype\fR, \fBbusy\fR, \fBstatus_time\fR,
456 \fBstatus_time_p\fR, \fBclass\fR, and \fBinfo\fR. The \fBap_id\fR field output
457 is the logical name for the attachment point, while the \fBphysid\fR field
458 contains the physical name. The \fBr_state\fR field can be \fBempty\fR,
459 \fBdisconnected\fR or \fBconnected\fR. The \fBo_state\fR field can be
460 \fBconfigured\fR or \fBunconfigured\fR. The \fBbusy\fR field can be either
461 \fBy\fR if the attachment point is busy, or \fBn\fR if it is not. The
462 \fBtype\fR and \fBinfo\fR fields are hardware specific. The \fBstatus_time\fR
463 field provides the time at which either the \fBr_state\fR, \fBo_state\fR, or
464 condition of the attachment point last changed. The \fBstatus_time_p\fR field
465 is a parsable version of the \fBstatus_time\fR field. If an attachment point
466 has an associated class, the \fBclass\fR field lists the class name. If an
467 attachment point does not have an associated class, the \fBclass\fR field lists
468 \fBnone\fR.
470 The order of the fields in \fIfield_spec\fR is significant: For the \fBsort\fR
471 sub-option, the first field given is the primary sort key. For the \fBcols\fR
472 and \fBcols2\fR sub-options, the fields are printed in the order requested. The
473 order of sorting on a \fIdata-field\fR can be reversed by placing a minus
474 (\fB\(mi\fR) before the \fIdata-field\fR name within the \fIfield_sec\fR for
475 the \fBsort\fR sub-option. The default value for \fBsort\fR is \fBap_id\fR. The
476 defaults values for \fBcols\fR and \fBcols2\fR depend on whether the \fB-v\fR
477 option is given: Without it \fBcols\fR is \fBap_id:r_state:o_state:condition\fR
478 and \fBcols2\fR is not set. With \fB-v\fR \fBcols\fR is
479 \fBap_id:r_state:o_state:condition:info\fR and \fBcols2\fR is
480 \fBstatus_time:type:busy:physid:\fR. The default value for \fBdelim\fR is a
481 single space. The value of \fBdelim\fR can be a string of arbitrary length. The
482 delimiter cannot include comma (\fB,\fR) character, see \fBgetsubopt\fR(3C).
483 These listing options can be used to create parsable output. See \fBNOTES\fR.
487 .ne 2
489 \fB\fB-t\fR\fR
491 .sp .6
492 .RS 4n
493 Performs a test of one or more attachment points. The test function is used to
494 re-evaluate the condition of the attachment point. Without a test level
495 specifier in \fIhardware_options\fR, the fastest test that identifies hard
496 faults is used.
498 More comprehensive tests are hardware specific and are selected using the
499 \fIhardware_options\fR.
501 The results of the test is used to update the condition of the specified
502 occupant to either \fBok\fR if no faults are found, \fBfailing\fR if
503 recoverable faults are found or \fBfailed\fR if any unrecoverable faults are
504 found.
506 If a test is interrupted, the attachment point's condition can be restored to
507 its previous value or set to \fBunknown\fR if no errors were found or
508 \fBfailing\fR if only recoverable errors were found or to \fBfailed\fR if any
509 unrecoverable errors were found. The attachment point should only be set to
510 \fBok\fR upon normal completion of testing with no errors.
514 .ne 2
516 \fB\fB-v\fR\fR
518 .sp .6
519 .RS 4n
520 Executes in verbose mode. For the \fB-c\fR, \fB-t\fR and \fB-x\fR options
521 outputs a message giving the results of each attempted operation. Outputs
522 detailed help information for the \fB-h\fR option. Outputs verbose information
523 for each attachment point for the \fB-l\fR option.
527 .ne 2
529 \fB\fB-x\fR\fIhardware_function\fR\fR
531 .sp .6
532 .RS 4n
533 Performs hardware specific functions. Private hardware specific functions can
534 change the state of a receptacle or occupant. Attachment point conditions can
535 change as the result of errors encountered during private hardware specific
536 functions. The format and content of the \fIhardware_function\fR string is
537 completely hardware specific. The option string \fIhardware_function\fR
538 conforms to the \fBgetsubopt\fR(3C) syntax convention.
542 .ne 2
544 \fB\fB-y\fR\fR
546 .sp .6
547 .RS 4n
548 Suppresses any interactive confirmation and assume that the answer is
549 \fByes\fR.
552 .SH USAGE
555 The required privileges to use this command are hardware dependent. Typically,
556 a default system configuration restricts all but the list option to the
557 superuser.
558 .SH EXAMPLES
560 \fBExample 1 \fRListing Attachment Points in the Device Tree
563 The following example lists all attachment points except dynamic attachment
564 points.
567 .in +2
569 example# cfgadm
571   Ap_Id         Type        Receptacle      Occupant       Cond
572 system:slot0    cpu/mem     connected       configured     ok
573 system:slot1    sbus-upa    connected       configured     ok
574 system:slot2    cpu/mem     connected       configured     ok
575 system:slot3    unknown     connected       unconfigured   unknown
576 system:slot4    dual-sbus   connected       configured     failing
577 system:slot5    cpu/mem     connected       configured     ok
578 system:slot6    unknown     disconnected    unconfigured   unusable
579 system:slot7    unknown     empty           unconfigured   ok
580 c0              scsi-bus    connected       configured     unknown
581 c1              scsi-bus    connected       configured     unknown
583 .in -2
587 \fBExample 2 \fRListing All Configurable Hardware Information
590 The following example lists all current configurable hardware information,
591 including those represented by dynamic attachment points:
594 .in +2
596 example# cfgadm -al
598   Ap_Id            Type         Receptacle      Occupant        Cond
599 system:slot0       cpu/mem      connected       configured      ok
600 system:slot1       sbus-upa     connected       configured      ok
601 system:slot2       cpu/mem      connected       configured      ok
602 system:slot3       unknown      connected       unconfigured    unknown
603 system:slot4       dual-sbus    connected       configured      failing
604 system:slot5       cpu/mem      connected       configured      ok
605 system:slot6       unknown      disconnected    unconfigured    unusable
606 system:slot7       unknown      empty           unconfigured    ok
607 c0                 scsi-bus     connected       configured      unknown
608 c0::dsk/c0t14d0    disk         connected       configured      unknown
609 c0::dsk/c0t11d0    disk         connected       configured      unknown
610 c0::dsk/c0t8d0     disk         connected       configured      unknown
611 c0::rmt/0          tape         connected       configured      unknown
612 c1                 scsi-bus     connected       configured      unknown
614 .in -2
618 \fBExample 3 \fRListing Selectively, Based on Attachment Point Attributes
621 The following example lists all attachment points whose class begins with
622 \fBscsi\fR, \fBap_id\fR begins with \fBc\fR and \fBtype\fR field begins with
623 \fBscsi\fR. The argument to the \fB-s\fR option is quoted to protect it from
624 the shell.
627 .in +2
629 example# cfgadm -s "match=partial,select=class(scsi):ap_id(c):type(scsi)"
631 Ap_Id         Type          Receptacle      Occupant           Cond
632  c0          scsi-bus      connected       configured         unknown
633  c1          scsi-bus      connected       configured         unknown
635 .in -2
639 \fBExample 4 \fRListing Current Configurable Hardware Information in Verbose
640 Mode
643 The following example lists current configurable hardware information for
644 \fIap-type\fR \fBsystem\fR in verbose mode:
647 .in +2
649 example# cfgadm -v -l system
650 Ap_Id                      Receptacle Occupant   Condition Information
651 When         Type      Busy     Phys_Id
652 system:slot1               connected  configured ok
653 Apr  4 23:50 sbus-upa  n        /devices/central/fhc/sysctrl:slot1
654 system:slot3               connected  configured ok        non-detachable
655 Apr 17 11:20 cpu/mem   n        /devices/central/fhc/sysctrl:slot3
656 system:slot5               connected  configured ok
657 Apr  4 23:50 cpu/mem   n        /devices/central/fhc/sysctrl:slot5
658 system:slot7               connected  configured ok
659 Apr  4 23:50 dual-sbus n        /devices/central/fhc/sysctrl:slot7
661 .in -2
666 The \fBWhen\fR column represents the \fBstatus_time\fR field.
668 \fBExample 5 \fRTesting Two Occupants Using the Hardware Specific
669 \fBExtended\fR Test
672 The following example tests two occupants using the hardware specific
673 \fBextended\fR test:
676 .in +2
678 example# cfgadm -v -o extended -t system:slot3 system:slot5
679 Testing attachment point system:slot3 ...  ok
680 Testing attachment point system:slot5 ...  ok
682 .in -2
686 \fBExample 6 \fRConfiguring an Occupant Using the Force Option
689 The following example configures an occupant in the \fBfailing\fR state to the
690 system using the force option:
693 .in +2
695 example# cfgadm -f -c configure system:slot3
697 .in -2
701 \fBExample 7 \fRUnconfiguring an Occupant From the System
704 The following example unconfigures an occupant from the system:
707 .in +2
709 example# cfgadm -c unconfigure system:slot4
711 .in -2
715 \fBExample 8 \fRConfiguring an Occupant at an Attachment Point
718 The following example configures an occupant:
721 .in +2
723 example# cfgadm -c configure c0::dsk/c0t0d0
725 .in -2
728 .SH ENVIRONMENT VARIABLES
731 See \fBenviron\fR(5) for descriptions of the following environment variables
732 that affect the execution of \fBcfgadm\fR: \fBLC_TIME\fR, \fBLC_MESSAGES\fR,
733 \fBNLSPATH\fR and \fBTZ\fR.
735 .ne 2
737 \fB\fBLC_MESSAGES\fR\fR
739 .RS 15n
740 Determines how \fBcfgadm\fR displays column headings and error messages.
741 Listing output data is not affected by the setting of this variable.
745 .ne 2
747 \fB\fBLC_TIME\fR\fR
749 .RS 15n
750 Determines how \fBcfgadm\fR displays human readable status changed time
751 (\fBstatus_time\fR).
755 .ne 2
757 \fB\fBTZ\fR\fR
759 .RS 15n
760 Specifies the timezone used when converting the status changed time. This
761 applies to both the human readable (\fBstatus_time\fR) and parsable
762 (\fBstatus_time_p\fR) formats.
765 .SH EXIT STATUS
768 The following exit values are returned:
770 .ne 2
772 \fB\fB0\fR\fR
774 .RS 5n
775 Successful completion.
779 .ne 2
781 \fB\fB1\fR\fR
783 .RS 5n
784 An error occurred.
788 .ne 2
790 \fB\fB2\fR\fR
792 .RS 5n
793 Configuration administration not supported on specified target.
797 .ne 2
799 \fB\fB3\fR\fR
801 .RS 5n
802 Usage error.
805 .SH SEE ALSO
808 \fBcfgadm_fp\fR(1M), \fBcfgadm_ib\fR(1M),
809 \fBcfgadm_pci\fR(1M),\fBcfgadm_sbd\fR(1M), \fBcfgadm_scsi\fR(1M),
810 \fBcfgadm_usb\fR(1M), \fBifconfig\fR(1M), \fBmount\fR(1M), \fBprtdiag\fR(1M),
811 \fBpsradm\fR(1M), \fBsyslogd\fR(1M), \fBconfig_admin\fR(3CFGADM),
812 \fBgetopt\fR(3C), \fBgetsubopt\fR(3C), \fBisatty\fR(3C), \fBattributes\fR(5),
813 \fBenviron\fR(5)
814 .SH DIAGNOSTICS
817 Diagnostic messages appear on the standard error output. Other than options and
818 usage errors, the following are diagnostic messages produced by this utility:
820 .in +2
822 cfgadm: Configuration administration not supported on\fIap_id\fR
824 .in -2
828 .in +2
830 cfgadm: No library found for \fIap_id\fR
832 .in -2
836 .in +2
838 cfgadm: \fIap_id\fRis ambiguous
840 .in -2
844 .in +2
846 cfgadm: \fIoperation\fR: Insufficient privileges
848 .in -2
852 .in +2
854 cfgadm: Attachment point is busy, try again
856 .in -2
860 .in +2
862 cfgadm: No attachment points with specified attributes found
864 .in -2
868 .in +2
870 cfgadm: System is busy, try again
872 .in -2
876 .in +2
878 cfgadm: \fIoperation\fR: Operation requires a service interruption
880 .in -2
884 .in +2
886 cfgadm: \fIoperation\fR: Data error: \fIerror_text\fR
888 .in -2
892 .in +2
894 cfgadm: \fIoperation\fR: Hardware specific failure: \fIerror_text\fR
896 .in -2
901 See \fBconfig_admin\fR(3CFGADM) for additional details regarding error
902 messages.
903 .SH NOTES
906 Hardware resources enter the unconfigured pool in a hardware specific manner.
907 This can occur at various times such as: system initialization or as a result
908 of an unconfigure operation. An occupant that is in the \fBunconfigured\fR
909 state is not available for use by the system until specific intervention
910 occurs. This intervention can be manifested as an operator initiated command or
911 it can be by way of an automatic configuring mechanism.
914 The listing option of the \fBcfgadm\fR command can be used to provide parsable
915 input for another command, for example within a shell script. For parsable
916 output, the \fB-s\fR option must be used to select the fields required. The
917 \fB-s\fR option can also be used to suppress the column headings. The following
918 fields always produce parsable output: \fBap_id\fR, \fBphysid\fR,
919 \fBr_state\fR, \fBo_state\fR, \fBcondition\fR, \fBbusy\fR \fBstatus_time_p\fR,
920 \fBclass\fR, and \fBtype\fR. Parsable output never has white-space characters
921 embedded in the field value.
924 The following shell script fragment finds the first good \fBunconfigured\fR
925 occupant of type \fBCPU.\fR
927 .in +2
929 found=
930 cfgadm -l -s "noheadings,cols=ap_id:r_state:condition:type" | \e
931 while read ap_id r_state cond type
933      if [ "$r_state" = unconfigured -a "$cond" = ok -a "$type" = CPU ]
934      then
935           if [ -z "$found" ]
936           then
937                found=$ap_id
938           fi
939      fi
940 done
941 if [ -n "$found" ]
942 then
943          echo "Found CPU $found"
946 .in -2
951 The format of the parsable time field (\fBstatus_time_p\fR) is
952 \fIYYYYMMDDhhmmss\fR, giving the year, month, day, hour, minute and second in a
953 form suitable for string comparison.
956 Reference should be made to the hardware specific documentation for details of
957 System Configuration Administration support.