zs_pset(3zonestat) 맨 페이지 - 윈디하나의 솔라나라

개요

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

zs_pset(3zonestat)

Zones Statistics Library Functions                          zs_pset(3ZONESTAT)



NAME
       zs_pset,       zs_pset_list,       zs_pset_walk,      zs_pset_property,
       zs_pset_total_time,       zs_pset_total_cpus,        zs_pset_used_time,
       zs_pset_used_cpus,      zs_pset_used_pct,      zs_pset_stolen_all_time,
       zs_pset_stolen_all_cpus,  zs_pset_stolen_all_pct,  zs_pset_stolen_time,
       zs_pset_stolen_cpus,   zs_pset_stolen_pct,   zs_pset_stolen_zones_time,
       zs_pset_stolen_zones_cpus, zs_pset_stolen_zones_pct - libzonestat  pset
       accessor methods

SYNOPSIS
       cc [ flag ... ] file... -lzonestat [ library ... ]
       #include <zonestat.h>

       int zs_pset_list(zs_usage_t usage, zs_pset_t *psetlist, int num);


       zs_pset_t zs_pset_walk(zs_usage_t usage, zs_pset_t pset);


       zs_property_t zs_pset_property(zs_pset_t pset, zs_pset_property_t prop);


       void zs_pset_total_time(zs_pset_t pset, timestruc_t *ts);


       uint64_t zs_pset_total_cpus(zs_pset_t pset);


       void zs_pset_used_time(zs_pset_t pset, zs_user_t user, timestruc_t *ts);


       uint64_t zs_pset_used_cpus(zs_pset_t pset, zs_user_t user);


       uint_t zs_pset_used_pct(zs_pset_t pset, zs_user_t user);


       void zs_pset_stolen_all_time(zs_pset_t pset, timestruc_t *ts);


       uint64_t zs_pset_stolen_all_cpus(zs_pset_t pset);


       uint_t zs_pset_stolen_all_pct(zs_pset_t pset);


       void zs_pset_stolen_time(zs_pset_t pset, timestruc_t *ts);


       uint64_t zs_pset_stolen_cpus(zs_pset_t pset);


       uint_t zs_pset_stolen_pct(zs_pset_t pset);


       void zs_pset_stolen_zones_time(zs_pset_t pset, timestruc_t *ts);


       uint64_t zs_pset_stolen_zones_cpus(zs_pset_t pset);


       uint_t zs_pset_stolen_zones_pct(zs_pset_t pset);

DESCRIPTION
       These  functions  are  used to access the processor sets (psets) in the
       usage object. These psets are the psets which existed at the time  when
       the zs_usage_read was called, and returned the usage object.


       By  default,  the  system has a single processor set which contains all
       cpus. Processor sets can be created by resource pools (pooladm(8)), the
       psrset(8) command, and by the zonecfg(8) dedicated cpu resource.


       The  zs_pset_list()  function  returns  the number of zs_pset_t objects
       contained within usage. If psetlist is  non-NULL,  the  psetlist  array
       will  be  filled  with  up to num zs_pset_t objects. The psetlist array
       must be first allocated by the caller. The first pset returned  in  the
       array  will  always  be the default pset. The remaining pset will be in
       alphanumeric ordered by pset name.


       The zs_pset_walk() function walks the psets contained in usage. If pset
       is  NULL,  the  first  pset  is  returned. The first pset is always the
       default pset. Otherwise, the psets are returned in alphanumeric  order.
       NULL will be returned if there are no more psets.


       The  zs_pset_property()  function  will  return  the prop property of a
       pset. See libzonestat(3LIB) for a  description  of  the  ZS_PSET_PROP_*
       property codes.


       The  zs_pset_total_time()  function  sets ts to the total cpu time that
       has been available in pset. For example, if a pset has 2  online  cpus,
       and  zs_open  as called 30 seconds before zs_usage_read, then the total
       time available in the pset is 60 seconds. ts must be allocated  by  the
       caller.


       The  zs_pset_total_cpus() function returns the number of online cpus in
       pset * 100. For instance, if the number of online cpus is 4, the  value
       returned will be 400.


       The zs_pset_used_time() function sets ts to the total cpu time that has
       been used in pset, starting at zero from the  point  when  zs_open  was
       first called.


       The zs_pset_used_cpus() function returns quantity of cpus used by user.
       The value returned is the number of cpus used * 100. For  instance,  if
       user ZS_USER_ZONES (which represents total pset usage by all zones) has
       used 2.5 cpus worth of cpu time, then the value returned is 250.


       The uint_t zs_pset_used_pct() function returns the  percentage  of  cpu
       time  used  by  user.  The  value returned is the percentage * 100. For
       example, if user ZS_USER_ALL (representing total  cpu  usage)  is  50%,
       then the value returned will be 5000.


       All  ZS_USER_* user codes are described in the libzonestat(3LIB) manual
       page.


       The zs_pset_stolen_all_time() function sets ts to the sum of  the  time
       stolen  from  the  pset and time stolen from all the zones bound to the
       pset. For more information about stolen time, see solaris-kz(7).


       The zs_pset_stolen_all_cpus() function returns the  sum  of  number  of
       cpus  stolen  from  the  pset with number of cpus stolen from the zones
       bound to the pset.


       The zs_pset_stolen_all_pct() function returns  the  percentage  of  cpu
       time stolen from the pset and all its zones.


       The  zs_pset_stolen_time() function sets ts to the time stolen from the
       pset. Stolen time is supported only when  running  inside  a  supported
       zone  brand.  If stolen time is not supported by the current system, ts
       is set to a zero structure.


       The zs_pset_stolen_cpus() function returns cpus stolen from  the  pset.
       If  the current system does not support stolen time, a special value of
       ZS_LIMIT_NONE is returned.


       The zs_pset_stolen_pct() function returns  percentage  of  time  stolen
       from  the  pset. If stolen time is not supported by the current system,
       special value of ZS_PCT_NONE is returned.


       The zs_pset_stolen_zones_time() function sets ts to the  total  sum  of
       time stolen from the zones bound to the pset.


       The  zs_pset_stolen_zones_cpus()  function returns cpus stolen from the
       zones bound to the pset.


       The zs_pset_stolen_zones_pct()  function  returns  percentage  of  time
       stolen from the zones bound to the pset.

RETURN VALUES
       See Description.

ERRORS
       If  a  zs_pset_*()  function  is  called with an invalid user code, the
       function will abort with abort(3C).

EXAMPLES
       Example 1 Retrieve information about all psets in a usage object.



       The following example traverses all psets in a usage object, retrieving
       information about each pset.


         #include <zonestat.h>
         ...
         extern zs_usage_t usage;        /* assume returned by zs_usage_read() */
         ...
         zs_pset_t pset;
         zs_property_t prop;
         char * psetname;
         uint64_t online;
         uint64_t used;
         uint64_t stolen;

         for (pset = zs_pset_first(usage); pset != NULL;
             pset = zs_pset_next(usage, pset)) {

         /* Get psetname */
         prop = zs_pset_property(pset, ZS_PSET_PROP_NAME);
         psetname = strdup(zs_property_string(prop)));

         /*
          * Get number of online cpus, quantity of cpu used, and time
          * stolen from the pset, all in number of cpus * 100.
          */
         online = zs_pset_total_cpus(pset);
         used = zs_pset_used_cpus(pset, ZS_USER_ALL);
         stolen = zs_pset_stolen_cpus(pset);
         }


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 _ Interface StabilityCommitted _ MT-LevelSafe


SEE ALSO
       zonestat(1), abort(3C), libpool(3LIB), libzonestat(3LIB), zs_open(3ZON‐
       ESTAT),         zs_property(3ZONESTAT),        zs_pset_zone(3ZONESTAT),
       zs_resource(3ZONESTAT),    zs_usage(3ZONESTAT),     zs_zone(3ZONESTAT),
       attributes(7), resource-controls(7), pooladm(8), psrset(8), rcapadm(8),
       swap(8), zoneadm(8), zonestatd(8)



Oracle Solaris 11.4               13 Nov 2020               zs_pset(3ZONESTAT)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3