pool_set_status(3pool) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

pool_set_status(3pool)

po...on(3POOL) Pool Configuration Manipulation Library Functionspo...on(3POOL)

NAME
       pool_dynamic_location,        pool_static_location,       pool_version,
       pool_get_status, pool_set_status,  pool_resource_type_list  -  resource
       pool framework functions

SYNOPSIS
       cc [ flag... ] file... -lpool [ library... ]
       #include <pool.h>

       const char *pool_dynamic_location(void);


       const char *pool_static_location(void);


       uint_t pool_version(uint_t ver);


       int pool_get_status(int *state);


       int pool_set_status(int state);


       int pool_resource_type_list(const char **reslist,
            uint_t *numres);

DESCRIPTION
       The  pool_dynamic_location()  function returns the location used by the
       pools framework to store the dynamic configuration. The dynamic config‐
       uration refers to the live state of the running system, and is also re‐
       ferred to as the "running" configuration.


       The pool_static_location() function returns the location  used  by  the
       pools  framework  to  store the default configuration file. This is the
       default configuration used by the pools command  line  utilities.  This
       file is applied during system boot if the pools SMF service is enabled.


       The  pool_version()  function  can be used to inquire about the version
       number of the library by specifying POOL_VER_NONE.  The  current  (most
       capable) version is POOL_VER_CURRENT. The user can set the version used
       by  the  library  by specifying the required version number. If this is
       not possible, the version returned will be POOL_VER_NONE.


       The pool_get_status() function retrieves the current state of  the  re‐
       source  pools service. If state is non-null, then on successful comple‐
       tion the state of the pools service is stored in the  location  pointed
       to  by state. The resource pools service is also represented by the SMF
       service svc:/system/pools:default.


       If the resource pools service is POOL_ENABLED, this means that the  de‐
       fault  pool configuration file /etc/pooladm.conf will be applied during
       system boot if it exists. If the status is POOL_DISABLED, the pool con‐
       figuration file will not be applied at system  boot.  In  either  case,
       libpool(3LIB),  pooladm(8),  and  poolcfg(8)  may be used to manipulate
       pools.


       The pool_set_status() function modifies the current state  of  the  re‐
       source  pools  service.  On  successful completion the state of the re‐
       source pools service is changed to match the value supplied  in  state.
       Only  two  values  are valid for state, POOL_DISABLED and POOL_ENABLED,
       both of which are defined in <pool.h>.


       The pool_resource_type_list() function enumerates  the  resource  types
       supported  by  the  pools  framework  on  this  platform. If numres and
       reslist are both non-null, reslist points to a buffer where a  list  of
       resource  types in the system is to be stored, and numres points to the
       maximum number of resource types the buffer  can  hold.  On  successful
       completion, the list of resource types up to the maximum buffer size is
       stored in the buffer pointed to by reslist.

RETURN VALUES
       The  pool_dynamic_location()  function returns the location used by the
       pools framework to store the dynamic configuration.


       The pool_static_location() function returns the location  used  by  the
       pools framework to store the default configuration.


       The  pool_version()  function returns the version number of the library
       or POOL_VER_NONE.


       Upon successful completion, pool_get_status(),  pool_set_status(),  and
       pool_resource_type_list()  all  return 0. Otherwise, −1 is returned and
       pool_error(3POOL) returns the pool specific error.

ERRORS
       No errors are defined  for  pool_dynamic_location(),  pool_static_loca‐
       tion(), and pool_version().


       The pool_get_status() function will fail if:

       POE_SYSTEM    A  system  error occurred when accessing the pool service
                     state.



       The pool_set_status() function will fail if:

       POE_SYSTEM    A system error occurred when modifying  the  kernel  pool
                     state.



       The pool_resource_type_list() function will fail if:

       POE_BADPARAM    The numres parameter was NULL.


EXAMPLES
       Example 1 Get the static location used by the pools framework.


         #include <sys/types.h>
         #include <unistd.h>
         #include <pool.h>

         ...

         const char *location = pool_dynamic_location();

         ...

             (void) fprintf(stderr, "pool dynamic location is %s\n",
                    location);


       Example 2 Enable the resource pools service.


         #include <stdio.h>
         #include <pool.h>

         ...

            if (pool_set_status(POOL_ENABLED) != 0) {
               (void) fprintf(stderr, "The pools service could not be enabled %s\n"
                      pool_strerror(pool_error()));
                      exit(2);
            }
         ...




ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ CSIEnabled _ Interface StabilityUncommitted _ MT-Level‐
       Safe


SEE ALSO
       libpool(3LIB), pool_error(3POOL), attributes(7), psrset(8)

Oracle Solaris 11.4               17 Aug 2018                   po...on(3POOL)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3