Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man8 / poolcfg.8
blobbe4f6258798307d14953018832d646b3bc63c51e
1 '\" te
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"
7 .SH NAME
8 poolcfg \- create and modify resource pool configuration files
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/poolcfg\fR \fB-c\fR \fIcommand\fR [\fB-d\fR | [\fIfilename\fR]]
13 .fi
15 .LP
16 .nf
17 \fB/usr/sbin/poolcfg\fR \fB-f\fR \fIcommand_file\fR [\fB-d\fR | [\fIfilename\fR]]
18 .fi
20 .LP
21 .nf
22 \fB/usr/sbin/poolcfg\fR \fB-h\fR
23 .fi
25 .SH DESCRIPTION
26 .sp
27 .LP
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.
33 .sp
34 .LP
35 Pools configuration files are structured files that must have been constructed
36 using \fBpoolcfg\fR itself or \fBlibpool\fR(3LIB) directly.
37 .sp
38 .LP
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
41 writing.
42 .sp
43 .LP
44 The configurations which are created by this utility can be used by
45 \fBpooladm\fR to instantiate the configuration upon a target host.
46 .SH OPTIONS
47 .sp
48 .LP
49 The following options are supported:
50 .sp
51 .ne 2
52 .na
53 \fB\fB-c\fR \fIcommand\fR\fR
54 .ad
55 .RS 19n
56 Specify \fIcommand\fR as an editing command. See \fBUSAGE\fR.
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fB-d\fR\fR
63 .ad
64 .RS 19n
65 Operate directly on the kernel state. No \fIfilename\fR is allowed.
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fB-f\fR \fIcommand_file\fR\fR
72 .ad
73 .RS 19n
74 Take the commands from \fIcommand_file\fR. \fIcommand_file\fR consists of
75 editing commands, one per line.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fB-h\fR\fR
82 .ad
83 .RS 19n
84 Display extended information about the syntax of editing commands.
85 .RE
87 .SH USAGE
88 .SS "Scripts"
89 .sp
90 .LP
91 A script consists of editing commands, one per line, of the following:
92 .sp
93 .ne 2
94 .na
95 \fBinfo [\fIentity-name\fR]\fR
96 .ad
97 .sp .6
98 .RS 4n
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.
106 .ne 2
108 \fBcreate \fIentity-name\fR [\fIproperty-list\fR]\fR
110 .sp .6
111 .RS 4n
112 Make an entity of the specified type and name.
116 .ne 2
118 \fBdestroy \fIentity-name\fR\fR
120 .sp .6
121 .RS 4n
122 Remove the specified entity.
126 .ne 2
128 \fBmodify \fIentity-name\fR [\fIproperty-list\fR]\fR
130 .sp .6
131 .RS 4n
132 Change the listed properties on the named entity.
136 .ne 2
138 \fBassociate \fIpool-name\fR [\fIresource-list\fR]\fR
140 .sp .6
141 .RS 4n
142 Connect one or more resources to a pool, or replace one or more existing
143 connections.
147 .ne 2
149 \fBtransfer to\fR [\fIresourcetype\fR] \fIname\fR[\fIcomponent-list\fR]
151 .sp .6
152 .RS 4n
153 Transfer one or more discrete components to a resource .
157 .ne 2
159 \fBtransfer [\fIquantity\fR] from [\fIresourcetype\fR] [\fIsrc\fR] to
160 [\fItgt\fR]\fR
162 .sp .6
163 .RS 4n
164 Transfer a resource quantity from \fIsrc\fR to \fItgt\fR.
168 .ne 2
170 \fBtransfer [\fIquantity\fR] to [\fIresourcetype\fR] [\fItgt\fR] from
171 [\fIsrc\fR]\fR
173 .sp .6
174 .RS 4n
175 Transfer a resource quantity to \fItgt\fR from \fIsrc\fR.
179 .ne 2
181 \fBdiscover\fR
183 .sp .6
184 .RS 4n
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
191 the \fB-d\fR option.
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.
199 .ne 2
201 \fBrename \fIentity-name\fR to \fInew-name\fR\fR
203 .sp .6
204 .RS 4n
205 Change the name of an entity on the system to its new name.
208 .SS "Property Lists"
211 The property list is specified by:
213 .in +2
215 ( proptype name = value [ ; proptype name = value ]* )
217 .in -2
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.
223 .SS "Resource Lists"
226 A resource list is specified by:
228 .in +2
230 ( resourcetype name [ ; resourcetype name ]* )
232 .in -2
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:
243 .in +2
245 ( componenttype name [ ; componenttype name ]* )
247 .in -2
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"
255 .ne 2
257 \fBsystem\fR
259 .RS 10n
260 Machine level entity
264 .ne 2
266 \fBpool\fR
268 .RS 10n
269 Named collection of resource associations
272 .SS "Resource Types"
274 .ne 2
276 \fBpset\fR
278 .RS 8n
279 Processor set resource
282 .SS "Property Types"
284 .ne 2
286 \fBboolean\fR
288 .RS 11n
289 Takes one of two values true or false.
293 .ne 2
295 \fBint\fR
297 .RS 11n
298 A 64-bit signed integer value.
302 .ne 2
304 \fBuint\fR
306 .RS 11n
307 A 64-bit unsigned integer value.
311 .ne 2
313 \fBstring\fR
315 .RS 11n
316 Strings are delimited by quotes (\fB"\fR), and support the character escape
317 sequences defined in \fBformats\fR(5).
321 .ne 2
323 \fBfloat\fR
325 .RS 11n
326 Scientific notation is not supported.
329 .SH EXAMPLES
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.
339 .in +2
341 create pset small-1 ( uint pset.min = 1 ; uint pset.max = 4)
342 create pool Accounting
343 associate pool Accounting ( pset small-1 )
345 .in -2
348 \fBExample 2 \fRReporting on \fBpool_0\fR
351 The following command reports on \fBpool_0\fR to standard output in human
352 readable form:
355 .in +2
357  # poolcfg -c 'info pool pool_0' /etc/pooladm.conf
359 .in -2
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:
370 .in +2
372 # poolcfg -c 'destroy pool pool_0' /etc/pooladm.conf
374 .in -2
378 \fBExample 4 \fRDisplaying the Current Configuration
381 The following command displays the current configuration:
384 .in +2
386 $ poolcfg -c 'info' /etc/pooladm.conf
387 system example_system
388                int system.version 1
389                boolean system.bind-default true
390                string system.comment Discovered by libpool
392                pool pool_default
393                     boolean pool.default true
394                     boolean pool.active true
395                     int pool.importance 5
396                     string pool.comment
397                     string.pool.scheduler FSS
398                     pset pset_default
400                pset pset_default
401                     int pset.sys_id -1
402                     string pset.units population
403                     boolean pset.default true
404                     uint pset.max 4294967295
405                     uint pset.min 1
406                     string pset.comment
407                     boolean pset.escapable false
408                     uint pset.load 0
409                     uint pset.size 2
411                     cpu
412                          int cpu.sys_id 0
413                          string cpu.comment
415                     cpu
416                          int cpu.sys_id 2
417                          string cpu.comment
419 .in -2
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:
430 .in +2
432 # poolcfg -dc 'transfer to pset pset1 ( cpu 2 )'
434 .in -2
438 \fBExample 6 \fRMoving 2 cpus from Processor Set pset1 to Processor Set pset2
439 in the Kernel
442 The following command moves 2 \fBcpu\fRs from processor set \fBpset1\fR to
443 processor set \fBpset2\fR in the kernel:
446 .in +2
448 # poolcfg -dc 'transfer 2 from pset pset1 to pset2'
450 .in -2
453 .SH ATTRIBUTES
456 See \fBattributes\fR(5) for descriptions of the following attributes:
461 box;
462 c | c
463 l | l .
464 ATTRIBUTE TYPE  ATTRIBUTE VALUE
466 Interface Stability     See below.
471 The invocation is Committed. The output is Uncommitted.
472 .SH SEE ALSO
475 \fBpooladm\fR(8), \fBpoolbind\fR(8), \fBlibpool\fR(3LIB),
476 \fBattributes\fR(5), \fBformats\fR(5)
479 \fI\fR