Setting Pool Attributes and Binding to a Pool
You can set a project.pool attribute to associate a resource pool with a project.
You can bind a running process to a pool in two ways:
You can use the poolbind command described in poolbind(1M) command to bind a specific process to a named resource pool.
You can use the project.pool attribute in the project database to identify the pool binding for a new login session or a task that is launched through the newtask command. See the newtask(1), projmod(1M), and project(4) man pages.
How to Bind Processes to a Pool
The following procedure uses poolbind with the -p option to manually bind
a process (in this case, the current shell) to a pool named ohare.
- Become superuser, or assume a role that includes the Process Management profile.
The System Administrator role includes the Process Management profile. For more information about
roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
- Manually bind a process to a pool:
# poolbind -p ohare $$
- Verify the pool binding for the process by using poolbind with the -q
option.
$ poolbind -q $$
155509 ohare
The system displays the process ID and the pool binding.
How to Bind Tasks or Projects to a Pool
To bind tasks or projects to a pool, use the poolbind command with
the -i option. The following example binds all processes in the airmiles project
to the laguardia pool.
- Become superuser, or assume a role that includes the Process Management profile.
The System Administrator role includes the Process Management profile. For more information about
roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
- Bind all processes in the airmiles project to the laguardia pool.
# poolbind -i project -p laguardia airmiles
How to Set the project.pool Attribute for a Project
You can set the project.pool attribute to bind a project's processes to a
resource pool.
- Become superuser, or assume a role that includes the Process Management profile.
The System Administrator role includes the Process Management profile. For more information about
roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
- Add a project.pool attribute to each entry in the project database.
# projmod -a -K project.pool=poolname project
How to Use project Attributes to Bind a Process to a Different Pool
Assume you have a configuration with two pools that are named studio
and backstage. The /etc/project file has the following contents:
user.paul:1024::::project.pool=studio
user.george:1024::::project.pool=studio
user.ringo:1024::::project.pool=backstage
passes:1027::paul::project.pool=backstage
With this configuration, processes that are started by user paul are bound by
default to the studio pool.
User paul can modify the pool binding for processes he starts. paul can
use newtask to bind work to the backstage pool as well, by launching
in the passes project.
- Launch a process in the passes project.
$ newtask -l -p passes
- Use the poolbind command with the -q option to verify the pool binding
for the process. Also use a double dollar sign ($$) to pass the
process number of the parent shell to the command.
$ poolbind -q $$
6384 pool backstage
The system displays the process ID and the pool binding.