Solaris Containers: Resource Management and Solaris Zones Developer's Guide

List All Resource Pools

The following example lists all resource pools defined in an application's pools pset.

The key points of the example include the following:

conf	= pool_conf_alloc();
pool_conf_open(conf, pool_dynamic_location(), PO_RDONLY);
pl = pool_query_pools(conf, &nelem, NULL);
pval = pool_value_alloc();
for (i = 0; i < nelem; i++) {
    pool_get_property(conf, pool_to_elem(conf, pl[i]), "", pval);
    pool_value_get_string(pval, &fname);
    printf("%s\n", name);