Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
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.
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.
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]
/usr/sbin/poolbind -p poolname -e command [arguments]...
/usr/sbin/poolbind -p poolname [-i idtype] id...
/usr/sbin/poolbind -q pid...
/usr/sbin/poolbind -Q pid...
The poolbind command allows an authorized user to bind zones, projects, tasks, and processes to pools. With the -e option (see below), it can execute a command you specify, placing the executed command in a specified pool. It can also enable you to query a process to determine which pool a process is bound to.
The following options are supported: -e command [arguments...]
Executes command, bound to the pool you specify with -p.
This option, together with the idlist arguments, specifies one or more processes to which the poolbind command is to apply. The interpretation of idlist depends on the value of idtype. The valid idtype arguments and corresponding interpretations of idlist are as follows: pid
idlist is a list of process IDs. Binds the specified processes to the specified pool. This is the default behavior if no idtype is specified.
idlist is a list of task IDs. Bind all processes within the list of task IDs to the specified pool.
idlist is a list of project IDs. Bind all processes within the list of projects to the specified pool. Each project ID can be specified as either a project name or a numerical project ID. See project(4).
idlist is a list of zone IDs. Bind all processes within the list of zones to the specified pool. Each zone ID can be specified as either a zone name or a numerical zone ID. See zones(5).
Specifies the name of a pool to which the specified zone, project, tasks, or processes are to be bound.
Queries the pool bindings for a given list of process IDs. If the collection of resources associated with the process does not correspond to any currently existing pool, or if there are multiple pools with the set of resources that the process is bound to, the query fails for that particular process ID.
Queries the resource bindings for a given list of process IDs. The resource bindings are each reported on a separate line.
Example 1 Binding All Processes
The following command binds all processes in projects 5 and 7 to the pool web_app:
example# /usr/sbin/poolbind -p web_app -i projid 5 7
Example 2 Binding the Running Shell
The following command binds the running shell to the pool web_app:
example# /usr/sbin/poolbind -p web_app $$
Example 3 Querying the Pool Bindings
The following command queries the bindings to verify that the shell is bound to the given pool:
example# /usr/sbin/poolbind -q $$
Example 4 Querying the Resource Bindings
The following command queries the bindings to verify that the shell is bound to the given resources:
example# /usr/sbin/poolbind -Q $$
The following exit values are returned: 0
Successful completion.
Requested operation could not be completed.
Invalid command line options were specified.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability See below. |
The invocation is Evolving. The output is Unstable.
pooladm(1M), poolcfg(1M), libpool(3LIB), project(4), attributes(5), zones(5)