2 .\" Copyright (c) 2007, 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 POOLCFG 8 "Nov 29, 2007"
8 poolcfg \- create and modify resource pool configuration files
12 \fB/usr/sbin/poolcfg\fR \fB-c\fR \fIcommand\fR [\fB-d\fR | [\fIfilename\fR]]
17 \fB/usr/sbin/poolcfg\fR \fB-f\fR \fIcommand_file\fR [\fB-d\fR | [\fIfilename\fR]]
22 \fB/usr/sbin/poolcfg\fR \fB-h\fR
28 The \fBpoolcfg\fR utility provides configuration operations on pools and sets.
29 These operations are performed upon an existing configuration and take the form
30 of modifications to the specified configuration file. If you use the \fB-d\fR
31 option, the modifications occur to the kernel state. Actual activation of the
32 resulting configuration is achieved by way of the \fBpooladm\fR(8) utility.
35 Pools configuration files are structured files that must have been constructed
36 using \fBpoolcfg\fR itself or \fBlibpool\fR(3LIB) directly.
39 An invocation of \fBpoolcfg\fR with the pool dynamic location and write
40 permission will hang if the dynamic location has already been opened for
44 The configurations which are created by this utility can be used by
45 \fBpooladm\fR to instantiate the configuration upon a target host.
49 The following options are supported:
53 \fB\fB-c\fR \fIcommand\fR\fR
56 Specify \fIcommand\fR as an editing command. See \fBUSAGE\fR.
65 Operate directly on the kernel state. No \fIfilename\fR is allowed.
71 \fB\fB-f\fR \fIcommand_file\fR\fR
74 Take the commands from \fIcommand_file\fR. \fIcommand_file\fR consists of
75 editing commands, one per line.
84 Display extended information about the syntax of editing commands.
91 A script consists of editing commands, one per line, of the following:
95 \fBinfo [\fIentity-name\fR]\fR
99 Display configuration (or specified portion) in human readable form to standard
100 output. If no entity is specified, system information is displayed. Therefore,
101 \fBpoolcfg\fR \fB-c\fR \fB\&'info' afile\fR is an equivalent invocation to
102 \fBpoolcfg\fR \fB-c\fR \fB\&'info system name' afile\fR.
108 \fBcreate \fIentity-name\fR [\fIproperty-list\fR]\fR
112 Make an entity of the specified type and name.
118 \fBdestroy \fIentity-name\fR\fR
122 Remove the specified entity.
128 \fBmodify \fIentity-name\fR [\fIproperty-list\fR]\fR
132 Change the listed properties on the named entity.
138 \fBassociate \fIpool-name\fR [\fIresource-list\fR]\fR
142 Connect one or more resources to a pool, or replace one or more existing
149 \fBtransfer to\fR [\fIresourcetype\fR] \fIname\fR[\fIcomponent-list\fR]
153 Transfer one or more discrete components to a resource .
159 \fBtransfer [\fIquantity\fR] from [\fIresourcetype\fR] [\fIsrc\fR] to
164 Transfer a resource quantity from \fIsrc\fR to \fItgt\fR.
170 \fBtransfer [\fIquantity\fR] to [\fIresourcetype\fR] [\fItgt\fR] from
175 Transfer a resource quantity to \fItgt\fR from \fIsrc\fR.
185 Create a system entity, with one pool entity and resources to match current
186 system configuration. All discovered resources of each resource type are
187 recorded in the file, with the single pool referring to the default resource
188 for each resource type.
190 This command is a NO-OP when \fBpoolcfg\fR operates directly on the kernel. See
193 You should avoid use of this command. The preferred method for creating a
194 configuration is to export the dynamic configuration using \fBpooladm\fR(8)
195 with the \fB-s\fR option.
201 \fBrename \fIentity-name\fR to \fInew-name\fR\fR
205 Change the name of an entity on the system to its new name.
211 The property list is specified by:
215 ( proptype name = value [ ; proptype name = value ]* )
221 where the last definition in the sequence for a given proptype, name pair is
222 the one that holds. For property deletion, use \fB~ proptype name\fR.
226 A resource list is specified by:
230 ( resourcetype name [ ; resourcetype name ]* )
236 where the last specification in the sequence for a resource is the one that
237 holds. There is no deletion syntax for resource lists.
238 .SS "Component Lists"
241 A component list is specified by:
245 ( componenttype name [ ; componenttype name ]* )
251 where the last specification in the sequence for a component is the one that
252 holds. There is no deletion syntax for component lists.
253 .SS "Recognized Entities"
269 Named collection of resource associations
279 Processor set resource
289 Takes one of two values true or false.
298 A 64-bit signed integer value.
307 A 64-bit unsigned integer value.
316 Strings are delimited by quotes (\fB"\fR), and support the character escape
317 sequences defined in \fBformats\fR(5).
326 Scientific notation is not supported.
331 \fBExample 1 \fRWriting a poolcfg Script
334 The following \fBpoolcfg\fR script creates a pool named \fBAccounting\fR, and a
335 processor set, \fBsmall-1\fR. The processor set is created first, then the pool
336 is created and associated with the set.
341 create pset small-1 ( uint pset.min = 1 ; uint pset.max = 4)
342 create pool Accounting
343 associate pool Accounting ( pset small-1 )
348 \fBExample 2 \fRReporting on \fBpool_0\fR
351 The following command reports on \fBpool_0\fR to standard output in human
357 # poolcfg -c 'info pool pool_0' /etc/pooladm.conf
363 \fBExample 3 \fRDestroying pool_0 and Its Associations
366 The following command destroys \fBpool_0\fR and associations, but not the
367 formerly associated resources:
372 # poolcfg -c 'destroy pool pool_0' /etc/pooladm.conf
378 \fBExample 4 \fRDisplaying the Current Configuration
381 The following command displays the current configuration:
386 $ poolcfg -c 'info' /etc/pooladm.conf
387 system example_system
389 boolean system.bind-default true
390 string system.comment Discovered by libpool
393 boolean pool.default true
394 boolean pool.active true
395 int pool.importance 5
397 string.pool.scheduler FSS
402 string pset.units population
403 boolean pset.default true
404 uint pset.max 4294967295
407 boolean pset.escapable false
423 \fBExample 5 \fRMoving cpu with ID 2 to Processor Set pset1 in the Kernel
426 The following command moves \fBcpu\fR with ID \fB2\fR to processor set
427 \fBpset1\fR in the kernel:
432 # poolcfg -dc 'transfer to pset pset1 ( cpu 2 )'
438 \fBExample 6 \fRMoving 2 cpus from Processor Set pset1 to Processor Set pset2
442 The following command moves 2 \fBcpu\fRs from processor set \fBpset1\fR to
443 processor set \fBpset2\fR in the kernel:
448 # poolcfg -dc 'transfer 2 from pset pset1 to pset2'
456 See \fBattributes\fR(5) for descriptions of the following attributes:
464 ATTRIBUTE TYPE ATTRIBUTE VALUE
466 Interface Stability See below.
471 The invocation is Committed. The output is Uncommitted.
475 \fBpooladm\fR(8), \fBpoolbind\fR(8), \fBlibpool\fR(3LIB),
476 \fBattributes\fR(5), \fBformats\fR(5)