POOLCFG(8) | Maintenance Commands and Procedures | POOLCFG(8) |
poolcfg - create and modify resource pool configuration files
/usr/sbin/poolcfg -c command [-d | [filename]]
/usr/sbin/poolcfg -f command_file [-d | [filename]]
/usr/sbin/poolcfg -h
The poolcfg utility provides configuration operations on pools and sets. These operations are performed upon an existing configuration and take the form of modifications to the specified configuration file. If you use the -d option, the modifications occur to the kernel state. Actual activation of the resulting configuration is achieved by way of the pooladm(8) utility.
Pools configuration files are structured files that must have been constructed using poolcfg itself or libpool(3LIB) directly.
An invocation of poolcfg with the pool dynamic location and write permission will hang if the dynamic location has already been opened for writing.
The configurations which are created by this utility can be used by pooladm to instantiate the configuration upon a target host.
The following options are supported:
-c command
-d
-f command_file
-h
A script consists of editing commands, one per line, of the following:
info [entity-name]
create entity-name [property-list]
destroy entity-name
modify entity-name [property-list]
associate pool-name [resource-list]
transfer to [resourcetype] name[component-list]
transfer [quantity] from [resourcetype] [src] to [tgt]
transfer [quantity] to [resourcetype] [tgt] from [src]
discover
This command is a NO-OP when poolcfg operates directly on the kernel. See the -d option.
You should avoid use of this command. The preferred method for creating a configuration is to export the dynamic configuration using pooladm(8) with the -s option.
rename entity-name to new-name
The property list is specified by:
( proptype name = value [ ; proptype name = value ]* )
where the last definition in the sequence for a given proptype, name pair is the one that holds. For property deletion, use ~ proptype name.
A resource list is specified by:
( resourcetype name [ ; resourcetype name ]* )
where the last specification in the sequence for a resource is the one that holds. There is no deletion syntax for resource lists.
A component list is specified by:
( componenttype name [ ; componenttype name ]* )
where the last specification in the sequence for a component is the one that holds. There is no deletion syntax for component lists.
system
pool
pset
boolean
int
uint
string
float
Example 1 Writing a poolcfg Script
The following poolcfg script creates a pool named Accounting, and a processor set, small-1. The processor set is created first, then the pool is created and associated with the set.
create pset small-1 ( uint pset.min = 1 ; uint pset.max = 4) create pool Accounting associate pool Accounting ( pset small-1 )
Example 2 Reporting on pool_0
The following command reports on pool_0 to standard output in human readable form:
# poolcfg -c 'info pool pool_0' /etc/pooladm.conf
Example 3 Destroying pool_0 and Its Associations
The following command destroys pool_0 and associations, but not the formerly associated resources:
# poolcfg -c 'destroy pool pool_0' /etc/pooladm.conf
Example 4 Displaying the Current Configuration
The following command displays the current configuration:
$ poolcfg -c 'info' /etc/pooladm.conf system example_system
int system.version 1
boolean system.bind-default true
string system.comment Discovered by libpool
pool pool_default
boolean pool.default true
boolean pool.active true
int pool.importance 5
string pool.comment
string.pool.scheduler FSS
pset pset_default
pset pset_default
int pset.sys_id -1
string pset.units population
boolean pset.default true
uint pset.max 4294967295
uint pset.min 1
string pset.comment
boolean pset.escapable false
uint pset.load 0
uint pset.size 2
cpu
int cpu.sys_id 0
string cpu.comment
cpu
int cpu.sys_id 2
string cpu.comment
Example 5 Moving cpu with ID 2 to Processor Set pset1 in the Kernel
The following command moves cpu with ID 2 to processor set pset1 in the kernel:
# poolcfg -dc 'transfer to pset pset1 ( cpu 2 )'
Example 6 Moving 2 cpus from Processor Set pset1 to Processor Set pset2 in the Kernel
The following command moves 2 cpus from processor set pset1 to processor set pset2 in the kernel:
# poolcfg -dc 'transfer 2 from pset pset1 to pset2'
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | See below. |
The invocation is Committed. The output is Uncommitted.
libpool(3LIB), attributes(7), formats(7), pooladm(8), poolbind(8)
November 29, 2007 | OmniOS |