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

개요

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

zonestat(1)

zonestat(1)                      User Commands                     zonestat(1)



NAME
       zonestat - report active zone statistics

SYNOPSIS
       zonestat [-z zonelist] [-r reslist] [-n namelist] [-T u | d | i]
          [-R reports] [-q] [-x] [-b brandlist] [-p [-P lines]]
          [-S cols] interval [duration [report]]

DESCRIPTION
       The  zonestat  utility  reports  on  the  CPU,  memory, networking, and
       resource control utilization  of  the  currently  running  zones.  Each
       zone's utilization is reported both as a percentage of system resources
       and the zone's configured limits.


       The zonestat utility prints a series of interval reports at the  speci‐
       fied interval. It optionally also prints one or more summary reports at
       a specified interval.


       The default output is a summary of CPU, physical  and  virtual  memory,
       and  networking  utilization.  The  -r  option  can  be  used to choose
       detailed output for specific resources.

   Security
       When run from within a non-global zone (NGZ), only psets visible to the
       NGZ  are  reported.  The  NGZ  output  includes  all  of  other  system
       resources, such as memory and limits.


       For all reported resources, the per-NGZ use is reported.  Use  of  each
       resource by the system itself, i.e. that cannot be attributed to a par‐
       ticular zone, is reported as [system].


       Inside a solaris-kz brand zone, only that zone's resource use is  visi‐
       ble.


       proc_info privilege is required to use the zonestat utility. This priv‐
       ilege is a member of the basic privilege set.

OPTIONS
       The following options are supported:

       -n name[,name]

           Specify a list of resource names  on  which  to  report.  For  pset
           resources,  this  is  the  name  of  the pset. For physical-memory,
           locked-memory, and virtual-memory resources,  the  only  names  are
           mem_default  and vm_default. For network resources, this is name of
           a datalink.

           Dedicated-cpu psets can be specified by  their  dedicated-cpu  pset
           name  (SYSzone_<zonename>) or by just their zonename. Psets created
           by psrset can  be  specified  by  their  psrset  pset  name  (SYSp‐
           srset_<id>),  or  just by their pset id. See resource-management(7)
           for more information on existing types of pools and psets.

           For sysstats and fsstats, all resource names that  belong  to  them
           can be used as names. In this case, only columns specified by names
           are printed. See example 7.

           In addition to a comma-separated list, multiple -n options  can  be
           specified to report on a set of resources.


       -p

           Parsable output.

           Print output in stable, machine--parsable format. Individual fields
           are delimited with a colon (:). The line format is:


             report type:resource:field[:field]*

           If the -T is specified, each line is prefixed with a timestamp:

           The report types are: report-total,  report-average,   report-high,
           and interval.

           For the list of existing resource types, see the -r option.

           On top of the resource types defined with the -r option, the header
           resource is a special resource used to start the  beginning  of  an
           interval  or  a  summary  report.  All  output lines between header
           resources belong to the same report. The header resource type  can‐
           not be used with the -r option.

           The  remaining  fields  are  resource  type  specific and, save for
           exceptions listed below, the ordering of the  fields  reflects  the
           ordering  of  columns in the default output for each resource type.
           See the zonestat utility output for details.

           For the summary resource, the remaining fields are as follows  (see
           the  OUTPUT  section  below for the explanation of the column head‐
           ings):



             line type (see -P):USED CPU:%PART:%CAP:%SHRU:USED PhysMem:
                 %USED PhysMem:%CAP PhysMem:USED VirtMem:%USED VirtMem:
                 %CAP VirtMem:PBYTE:%PUSE:STLN:%STLN


           For the network resource, the remaining fields are as follows,  for
           the default and extended (option -x) output, respectively:



             <zone view>:zonename:RBYTE:OBYTE:TOBYTE:MAXBW:%MAXBW:
                 PRBYTE:%PRBYTE:POBYTE:%POBYTE

             <link view>:linkname:zonename:RBYTE:OBYTE:TOBYTE:MAXBW:%MAXBW:
                 PRBYTE:%PRBYTE:POBYTE:%POBYTE


           For  the  processor-set  resource, the remaining fields are as fol‐
           lows:



             pset type:pset ID:line type (see -P):USED CPU:%USED CPU:CAP:%CAP:
                 SHRS:%SHR:%SHRU:USED CPU time [H]H-MM-SS.SS:STLN:%STLN


           All existing output fields are stable. Future versions might intro‐
           duce  new report and resource types. Future versions might also add
           additional new fields to the end of existing output lines.

           Running in a global zone, the statistics  provided  for  solaris-kz
           brand  zones  are  from the host point of view, and may differ from
           those reported within the zone; see solaris-kz(7).


       -P line[,line]

           For parsable output, specify lines to output. One or  more  of  the
           following line types can be chosen:

           header

               Each  interval  and  summary  report has a header, which prints
               details such as the interval timestamp,  interval  number,  and
               the  seconds count. If the header line is chosen, each interval
               is also finalized with a footer.


           resource

               The lines specifying each resource limit,  if  applicable.  For
               example,  there  are no limits specified for resources sysstats
               and fsstats.


           system

               The utilization of each resource by the system.  This  includes
               the  kernel,  and any resource consumption not contributed to a
               specific zone. When zonestat is run from within  a  non-global-
               zone, this value is the aggregate resource consumed by the sys‐
               tem  and  all  other  zones.  system  utilization  for  network
               resource type is not supported.


           total

               The total utilization of each resource.


           zones

               Lines detailing the per-zone utilization of each resource.


           By default, all lines are present in the parsable output.


       -q

           Quiet  mode.  Only  print summary reports (requires the -R option).
           All interval reports are omitted.


       -r resource[,resource]

           Specify resource types on which to report. The available  resources
           are: physical-memory, virtual-memory, locked-memory, processor-set,
           processes, lwps, shm-memory, shm-ids, sem-ids, msg-ids, lofi,  net‐
           work, sysstats, and fsstats.

           In  particular,  sysstats  shows  number  of  total syscall, forks,
           vforks, fork-fails, exec, semops, while  fsstats  shows  number  of
           read  calls,  write  calls,  bytes read by rdwr(), bytes written by
           rdwr(), and the number of pathname lookups.

           Additional resource names are  available  to  provide  some  common
           resource output combinations:


           summary         A  summary of CPU, physical-memory, virtual-memory,
                           and network usage is printed.


           memory          An    alias    for    "physical-memory,virtual-mem‐
                           ory,locked-memory".


           psets           Same as processor-set.


           default-pset    The default pset only is reported.


           limits          An alias for "processes,lwps,lofi".


           sysv            An alias for "shm-memory,shm-ids,sem-ids,msg-ids".


           all             All resource types.

           By default the summary resource is printed.

           In  addition  to a comma-separated list, multiple -r options can be
           specified to report on a set of resources types.

           The system's CPUs can be partitioned into psets.  By  default,  all
           CPUs are in a single pset named pset_default.

           Memory is not partition-able into sets. The zonestat utility output
           for these resources shows them as named mem_default and vm_default.

           The all resource  specifies  that  all  resource  types  should  be
           reported.


       -b brand[,brand]

           Display only the brand(s) specified by this option.


       -R report[,report]

           Print  a  summary  report. The supported report types are described
           below. In addition to a comma-separated list, multiple  -R  options
           can be specified for a set of summary reports.

           total

               Prints  a  summary  report  detailing  the  following  for each
               resource:

               psets

                   Total CPU used since start of command invocation. The  per‐
                   cent  used  for each zone includes time that a zone was not
                   running. For instance, if a zone used 100% of the CPU while
                   it  was  running,  but  the zone was halted for half of the
                   intervals, then the summary report shows the zone used  50%
                   of the CPU time.


               memory, limits, sysv

                   Average  resource used of all intervals reported since com‐
                   mand invocation. This average factors in intervals in which
                   a zone was not running. For example if a zone used on aver‐
                   age of 100M of physical memory while it  was  running,  and
                   was  only  running for half the intervals, then the summary
                   report shows that the zone used 50M of physical  memory  on
                   average.


               network

                   Sum  of  all bytes that are transmitted and received by all
                   datalink utilizing physical bandwidth. The  sum  is  calcu‐
                   lated  since  start of command invocation and is normalized
                   to number of bytes per second. The percentage used is based
                   on total available bandwidth.


               sysstats, fsstats

                   Sum of resources used by all CPUs visible to the zone.



           average

               Similar to total, but only intervals in which a zone is running
               are factored in. For example, if a zone was only running for  a
               single  interval,  and during that interval, the zone used 200M
               of virtual memory, then it's average  virtual-memory  is  200M,
               regardless  of the number of intervals reported before the sum‐
               mary report.


           high

               Print a summary report detailing  the  highest  usage  of  each
               resource  and  zone during any interval of the zonestat utility
               invocation.



       -S col[,col]

           Sort zones utilizing each resource.

           The following sorting columns can be specified:

           name

               Sort alpha-numerically by zone name.


           used

               Sort by quantity of resource  used.  For  networking  resource,
               this is same as sort by bytes.

               This is the default.


           cap

               Sort by configured cap.


           pcap

               Sort by percent of cap used.


           shr

               Sort by allocated share.


           pshru

               Sort by percent of share used.


           bytes

               Sort networking by total bytes transmitted and received.


           prbyte

               Sort networking by percentage of received bytes over the wire.


           pobyte

               Sort  networking  by  percentage  of transmitted bytes over the
               wire.


           maxbw

               Sort networking by percentage of bandwidth used.


           cpu

               Sort by CPU usage in the summary output. This is the default.


           physical-memory

               Sort by physical memory usage in the summary output.


           virtual-memory

               Sort by virtual memory usage in the summary output.


           network

               Sort by network usage in the summary output.


           exec, fork, fork-fail, name-lookup, read, readbyte, sema, syscall,
           vfork, write, writebyte

               Sort by quantity of corresponding resources used.



       -T u | d | i

           Include  timestamp  of  each report. The following formats are sup‐
           ported:

           d    Standard date format. See date(1). This option  is  not  valid
                with -p.


           i    Time formatted as the ISO 8601 compliant format:

                  YYYYMMDDThhmmssZ



           u    A  printed  representation  of  the internal representation of
                time. See time(2). This is also known as unix time.



       -x

           Display an extended view with more detailed information. For  exam‐
           ple,  when  used  with  network  resource,  the  extended view list
           details of each virtual datalink.


       -z zonename[,zonename]

           Specify a list of zones on which to report. By  default  all  zones
           are reported.

           In  addition  to a comma-separated list, multiple -z options can be
           specified to report on a set of  zones.  The  output  includes  any
           resources which have usage by the specified zones.


OPERANDS
       The following operands are supported:

       interval

           Specifies  the  length  in  seconds  to pause between each interval
           report. An interval of default uses the configured interval of  the
           zones monitoring service. See zonestatd(8).

           interval  is required. An interval of zero is not permitted. inter‐
           val can be specified as [nh][nm][ns], such as 10s or 1m.


       duration

           Specifies the number of intervals to report. Defaults  to  infinity
           if  not specified. The command duration is (interval * duration). A
           duration of zero is invalid. A value of inf can also  be  specified
           to explicitly choose infinity.

           Duration can also be specified as [nh][nm][ns]. In this case, dura‐
           tion is interpreted as the duration of execution time.  The  actual
           duration is rounded up to the nearest multiple of the interval.


       report

           Specify the summary report period. For instance, a report of 4 pro‐
           duces reports every 4 intervals. If the command duration is  not  a
           multiple of report, then the last report is of any remaining inter‐
           vals.

           report can also be specified as [nh][nm][ns]. In this case, reports
           are  output at the specified time period, rounded up to the nearest
           interval. If the command duration is not a multiple of report, then
           the last report is of any remaining intervals.

           Requires  -R.  If  -R  is  specified  and report is not, the report
           period is the entire  command  duration,  producing  the  specified
           reports at the end of execution.


OUTPUT
       The following list defines the column heading of the command output:

       SYSTEM-MEMORY

           The total amount of memory available on the physical host.


       SYSTEM-LIMIT

           The maximum amount of resource available on the physical host.


       CPUS

           The number of CPUs allocated to a pset


       ONLINE

           Of  the CPUs allocated to a pset, the number of CPUs which can exe‐
           cute processes.


       MIN/MAX

           The minimum and maximum number of CPUs which can  be  allocated  to
           the pset by the system.


       ZONE

           The zone using the resource. In addition to zone names, this column
           can also contain:

           [total]     The total quantity of resource used system-wide.


           [system]    The quantity of resource used by the  kernel  or  in  a
                       manner not associated with any particular zone.

                       When  zonestat  is used within a non-global zone, [sys‐
                       tem] designates the aggregate resource used by the sys‐
                       tem and by all other zones.

                       For  network  resources, system usage of network is not
                       available.



       USED

           The amount of resource used.


       %USED

           The amount of resource used as a percent of the total resource.


       STLN

           The amount of CPU time stolen from the zone.  The  Stolen  Time  is
           supported  only  by  some  zone  brands.  The  value of Stolen Time
           reflects the time when the zone could not run due to the host using
           CPU resources for other purposes. For more information about Stolen
           Time refer to solaris-kz(7).

           For the [system] row Stolen Time of the current system is reported.
           For  the  [total]  row sum of Stolen Time of the current system and
           all the zones in the system is reported.


       %STLN

           The amount of CPU time stolen as a percent of the  total  CPU  time
           available.


       %PART

           The  amount  of CPU used as a percentage of the total CPU in a pro‐
           cessor-set to which the zone is bound. A zone can  only  have  pro‐
           cesses  bound  to  multiple  psets  if it is the global zone, or if
           psrset(8) psets are used. If multiple binding are found for a zone,
           its  %PART is the fraction used of all bound psets. For [total] and
           [system], %PART is the percent used of all CPUs on the system.


       CAP

           If a zone is configured to have a cap on the  given  resource,  the
           cap is displayed in this column.


       %CAP

           The amount of resource used as a percent of zone's configured cap.


       SHRS

           The  number  of  shares allocated to the zone. For the [total] row,
           this is the total number of shares allocated to all  zones  sharing
           the  resource.  If  a  zone is not configured to use shares, and is
           sharing a resource with other zones  that  are  configured  to  use
           shares, this column contains no-fss for the zone.


       %SHRS

           The  fraction  of  the  total  shares  allocated  to  the zone. For
           instance, if 2 zones share a pset, each with 10 shares,  then  each
           zone has a %SHR of 50%.


       %SHRU

           Of the share allocated to the zone, the actual used resource as the
           fraction of resource 100%. Because shares are  only  enforced  when
           there  is  resource contention, it is possible for a zone to have a
           %SHRU in excess of 100%.


       TOBYTE

           The total number of bytes transmitted and received by datalinks  or
           virtual links.


       PRBYTE

           The number of received bytes that consumes physical bandwidth.


       RBYTE

           The number of received bytes.


       POBYTE

           The number of transmitted bytes that consumes physical bandwidth.


       OBYTE

           The number of transmitted bytes.


       %PRBYTE

           The  percentage  of  available  physical  bandwidth used to receive
           PRBYTE.


       %POBYTE

           The percentage of available physical  bandwidth  used  to  transmit
           POBYTE.


       PBYTE

           The sum of PRBYTE and POBYTE.


       %PUSE

           PBYTE as a percent of the total available physical bandwidth.


       LINK

           The name of a datalink.


       MAXBW

           The maximum bandwidth configured on a datalink.


       %MAXBW

           The  sum  of  all transmitted and received bytes as a percentage of
           configured maximum bandwidth.


       exec, fork, fork-fail, name-lookup, read, readbyte, sema, syscall,
       vfork, write, writebyte

           The amount of resources used by each resource name.


EXAMPLES
       Example  1  Using  zonestat to display a summary of CPU and memory uti‐
       lization



       The following command shows a summary of  CPU  and  memory  utilization
       every 2 seconds for 100 intervals:



         $ zonestat 2 100
         Collecting data for first interval...
         Interval: 1, Duration: 0:00:02
         SUMMARY       Cpus/Online: 56/56    PhysMem: 255G   VirtMem: 259G
                   ----------CPU---------- --PhysMem-- --VirtMem-- --PhysNet--
              ZONE  USED %PART  STLN %STLN  USED %USED  USED %USED PBYTE %PUSE
           [total]  3.43 6.13%  0.00 0.00% 30.7G 12.0% 34.0G 13.0% 9937K 0.98%
          [system]  0.03 0.06%  0.00 0.00% 19.5G 7.65% 32.6G 12.5%     -     -
            on-sru  2.54 5.53%  0.00 0.00% 10.0G 3.91% 36.3M 0.01%     0 0.00%
            tzone1  0.54 6.76%     -     -  668M 0.25%  696M 0.26%     0 0.00%
            global  0.30 0.64%     -     -  516M 0.19%  700M 0.26% 9937K 0.98%

         Interval: 2, Duration: 0:00:04
         SUMMARY       Cpus/Online: 56/56    PhysMem: 255G   VirtMem: 259G
                   ----------CPU---------- --PhysMem-- --VirtMem-- --PhysNet--
              ZONE  USED %PART  STLN %STLN  USED %USED  USED %USED PBYTE %PUSE
           [total]  3.64 6.51%  0.00 0.00% 30.7G 12.0% 34.0G 13.0% 14.5M 1.43%
          [system]  0.00 0.00%  0.00 0.00% 19.5G 7.65% 32.5G 12.5%     -     -
            on-sru  2.32 5.05%  0.00 0.00% 10.0G 3.91% 36.3M 0.01%     0 0.00%
            global  0.71 1.48%     -     -  516M 0.19%  700M 0.26% 14.5M 1.43%
            tzone1  0.61 7.62%     -     -  688M 0.26%  716M 0.26%     0 0.00%
         <output from other intervals omitted>



       Example 2 Using zonestat to produce parsable output



       The  following  command  produces  parsable  output.  For each zone, it
       prints a line of output for every pset usable in that  zone.  It  sepa‐
       rates each interval by the header and footer lines:



         $ zonestat -p -P header,zones -r psets 1 100
         <output omitted>



       Example 3 Using zonestat to report on the default pset



       The following command reports on the default pset once a second for one
       minute:



         $ zonestat -r default-pset 1 1m
         <output omitted>



       Example 4 Using zonestat to report total and high utilization



       The following command monitors silently at a 10 second interval for  24
       hours, producing a total and high report every 1 hour:



         $ zonestat -q -R total,high 10s 24h 1h
         <output omitted>



       Example 5 Using zonestat to report datalink utilization



       The following command reports on a datalink named e1000g0 at a 5 second
       interval for 5 times:



         $ zonestat -r network -n net0 5 5
         Collecting data for first interval...
         Interval: 1, Duration: 0:00:05
         NETWORK-DEVICE             SPEED        STATE        TYPE
         net0                    1000mbps           up        phys
                        ZONE TOBYTE  MAXBW %MAXBW PRBYTE %PRBYTE POBYTE %POBYTE
                     [total]  8853K      -      -  8342K   0.26%   507K   0.01%
                      global  8758K      -      -  8296K   0.26%   461K   0.01%
                      tzone1  93.4K      -      -  46.3K   0.00%  46.5K   0.00%
                      on-sru    602      -      -      0   0.00%    346   0.00%
         <output from other intervals omitted>



       Example 6 Using zonestat to report on the sysstats resources



         $ zonestat -r sysstats 1 1
         Collecting data for first interval...
         Interval: 1, Duration: 0:00:01
         SYSSTATS
              ZONE syscall  fork vfork fork-fail  exec spawn  sema
              [total]    126K   265     0         0   264     0     0
             [system]       0     0     0         0     0     0     0
               global    111K     3     0         0     3     0     0
               on-sru      22     0     0         0     0     0     0
               tzone1   14.1K   262     0         0   261     0     0



       Example 7 Using zonestat to report the number of fork, exec  and  name-
       lookup related system calls only



         $ zonestat -n fork,exec,name-lookup 1 1
         Collecting data for first interval...
         Interval: 1, Duration: 0:00:01
         SYSSTATS
                   ZONE  fork  exec
                   [total]   260   260
                  [system]     0     0
                    global     2     2
                    on-sru     0     0
                    tzone1   258   258
         FSSTATS
                   ZONE name-lookup
                   [total]        5276
                  [system]           0
                    global          97
                    on-sru           0
                    tzone1        5179



EXIT STATUS
       The following exit values are returned:

       0    Successful completion.


       1    An error occurred.


       2    Invalid usage.


       3    svc:system/zones_monitoring:  default  not running or not respond‐
            ing.


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  _  Availabilitysystem/zones  _  Interface  StabilitySee
       below.



       Command invocation and parsable output  is  Committed.  Human  readable
       output (default output) is Uncommitted.

SEE ALSO
       attributes(7),   date(1),   pooladm(8),  poolcfg(8),  prctl(1),  privi‐
       leges(7), psrset(8), rcapadm(8), resource-controls(7), resource-manage‐
       ment(7),  solaris-kz(7),  time(2), timezone(5), zoneadm(8), zonecfg(8),
       zonestatd(8)

NOTES
       The zonestat utility depends on the zones monitoring service:  svc/sys‐
       tem/zonestat:default. If the zonestat service is stopped while the zon‐
       estat utility is running, the zonestat command invocation quits without
       printing additional reports. The reports (-R) is printed if zonestat is
       interrupted (by CTRL/c, SIGINT) before reaching the next report period.



Oracle Solaris 11.4              23 July 2018                      zonestat(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3