sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

ProcedureHow 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.

  1. 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.

  2. Bind all processes in the airmiles project to the laguardia pool.

    # poolbind -i project -p laguardia airmiles

ProcedureHow 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.

  1. 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.

  2. Add a project.pool attribute to each entry in the project database.

    # projmod -a -K project.pool=poolname project

ProcedureHow 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.

  1. Launch a process in the passes project.

    $ newtask -l -p passes

  2. 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.

Using poolstat to Report Statistics for Pool-Related Resources

The poolstat command is used to display statistics for pool-related resources. See Using poolstat to Monitor the Pools Facility and Resource Utilization and the poolstat(1M) man page for more information.

The following subsections use examples to illustrate how to produce reports for specific purposes.

Displaying Default poolstat Output

Typing poolstat without arguments outputs a header line and a line of information for each pool. The information line shows the pool ID, the name of the pool, and resource statistics for the processor set attached to the pool.

machine% poolstat
                              pset
       id pool           size used load
        0 pool_default      4  3.6  6.2
        1 pool_sales        4  3.3  8.4

Producing Multiple Reports at Specific Intervals

The following command produces three reports at 5-second sampling intervals.

machine% poolstat 5 3
                               pset
 id pool                 size used load
 46 pool_sales              2  1.2  8.3
  0 pool_default            2  0.4  5.2
                              pset
 id pool                 size used load
 46 pool_sales              2  1.4  8.4
  0 pool_default            2  1.9  2.0
                              pset
 id pool                 size used load
 46 pool_sales              2  1.1  8.0
  0 pool_default            2  0.3  5.0  

Reporting Resource Set Statistics

The following example uses the poolstat command with the -r option to report statistics for the processor set resource set. Note that the resource set pset_default is attached to more than one pool, so this processor set is listed once for each pool membership.

machine% poolstat -r pset
      id pool          type rid rset          min  max size used load
       0 pool_default  pset  -1 pset_default    1  65K    2  1.2  8.3
       6 pool_sales    pset   1 pset_sales      1  65K    2  1.2  8.3
       2 pool_other    pset  -1 pset_default    1  10K    2  0.4  5.2

Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.