xref: /illumos-gate/usr/src/man/man1/zonestat.1 (revision 43a6dad6)
11c085a54SAndy Fiddaman.\"
21c085a54SAndy Fiddaman.\" This file and its contents are supplied under the terms of the
31c085a54SAndy Fiddaman.\" Common Development and Distribution License ("CDDL"), version 1.0.
41c085a54SAndy Fiddaman.\" You may only use this file in accordance with the terms of version
51c085a54SAndy Fiddaman.\" 1.0 of the CDDL.
61c085a54SAndy Fiddaman.\"
71c085a54SAndy Fiddaman.\" A full copy of the text of the CDDL should have accompanied this
81c085a54SAndy Fiddaman.\" source.  A copy of the CDDL is also available via the Internet at
91c085a54SAndy Fiddaman.\" http://www.illumos.org/license/CDDL.
101c085a54SAndy Fiddaman.\"
111c085a54SAndy Fiddaman.\" Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
121c085a54SAndy Fiddaman.\" Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
13*43a6dad6SPeter Tribble.\" Copyright 2023 Peter Tribble.
141c085a54SAndy Fiddaman.\"
15*43a6dad6SPeter Tribble.Dd February 18, 2023
16123e0aa3SPeter Tribble.Dt ZONESTAT 1
171c085a54SAndy Fiddaman.Os
181c085a54SAndy Fiddaman.Sh NAME
191c085a54SAndy Fiddaman.Nm zonestat
20123e0aa3SPeter Tribble.Nd report active zone statistics
211c085a54SAndy Fiddaman.Sh SYNOPSIS
221c085a54SAndy Fiddaman.Nm
231c085a54SAndy Fiddaman.Op Fl z Ar zonelist
241c085a54SAndy Fiddaman.Op Fl r Ar reslist
251c085a54SAndy Fiddaman.Op Fl n Ar namelist
261c085a54SAndy Fiddaman.Op Fl T Ar u Ns | Ns Ar d Ns | Ns Ar i
271c085a54SAndy Fiddaman.Op Fl R Ar reports
281c085a54SAndy Fiddaman.Op Fl q
291c085a54SAndy Fiddaman.Op Fl p Oo Fl P Ar lines Oc
301c085a54SAndy Fiddaman.Op Fl S Ar cols
311c085a54SAndy Fiddaman.Ar interval
321c085a54SAndy Fiddaman.Oo Ar duration
331c085a54SAndy Fiddaman.Oo Ar report
341c085a54SAndy Fiddaman.Oc Oc
351c085a54SAndy Fiddaman.Sh DESCRIPTION
361c085a54SAndy FiddamanThe
371c085a54SAndy Fiddaman.Nm
381c085a54SAndy Fiddamanutility reports on the cpu, memory, and resource control utilization of the
391c085a54SAndy Fiddamancurrently running zones.
401c085a54SAndy FiddamanEach zone's utilization is reported both as a percentage of system resources
411c085a54SAndy Fiddamanand the zone's configured limits.
421c085a54SAndy Fiddaman.Pp
431c085a54SAndy FiddamanThe
441c085a54SAndy Fiddaman.Nm
451c085a54SAndy Fiddamanutility prints a series of interval reports at the specified interval.
461c085a54SAndy FiddamanIt optionally also prints one or more summary reports at a specified interval.
471c085a54SAndy Fiddaman.Pp
481c085a54SAndy FiddamanThe default output is a summary of cpu, physical, and virtual memory
491c085a54SAndy Fiddamanutilization.
50*43a6dad6SPeter TribbleThe -r option can be used to select the specific resources to be shown in
51*43a6dad6SPeter Tribblethe output.
521c085a54SAndy Fiddaman.Pp
531c085a54SAndy FiddamanThe following options are supported:
541c085a54SAndy Fiddaman.Bl -tag -width Ds
551c085a54SAndy Fiddaman.It Fl z Ar zonename Ns Oo Ar ,zonename Ns ... Oc
561c085a54SAndy FiddamanSpecify a list of zones on which to report.
571c085a54SAndy FiddamanBy default all zones are reported.
581c085a54SAndy FiddamanIn addition to a comma-separated list, multiple
591c085a54SAndy Fiddaman.Fl z
601c085a54SAndy Fiddamanoptions can be specified to report on a set of zones.
611c085a54SAndy FiddamanThe output will include any resources which have usage by the specified zone(s).
621c085a54SAndy Fiddaman.It Fl r Ar resource Ns Oo Ar ,resource Ns ... Oc
631c085a54SAndy FiddamanSpecify resource types on which to report.
641c085a54SAndy FiddamanThe available resources are:
651c085a54SAndy Fiddaman.Bd -ragged -offset indent
661c085a54SAndy Fiddaman.Em physical-memory ,
671c085a54SAndy Fiddaman.Em virtual-memory ,
681c085a54SAndy Fiddaman.Em locked-memory ,
69*43a6dad6SPeter Tribble.Em processor-set ,
701c085a54SAndy Fiddaman.Em processes ,
711c085a54SAndy Fiddaman.Em lwps ,
721c085a54SAndy Fiddaman.Em shm-memory ,
731c085a54SAndy Fiddaman.Em shm-ids ,
741c085a54SAndy Fiddaman.Em sem-ids ,
751c085a54SAndy Fiddaman.Em msg-ids ,
761c085a54SAndy Fiddaman.Em lofi
771c085a54SAndy Fiddaman.Ed
781c085a54SAndy Fiddaman.Pp
791c085a54SAndy FiddamanThe following nicknames can also be specified as resource names:
801c085a54SAndy Fiddaman.Bl -tag -width indent
811c085a54SAndy Fiddaman.It Em summary
82*43a6dad6SPeter TribbleA summary of cpu, physical-memory, and virtual-memory usage.
831c085a54SAndy Fiddaman.It Em memory
84*43a6dad6SPeter Tribblephysical-memory, virtual-memory, and locked-memory.
851c085a54SAndy Fiddaman.It Em psets
86*43a6dad6SPeter Tribbleprocessor-set
871c085a54SAndy Fiddaman.It Em default-pset
881c085a54SAndy FiddamanThe default pset only.
891c085a54SAndy Fiddaman.It Em limits
90*43a6dad6SPeter Tribbleprocesses, lwps, and lofi
911c085a54SAndy Fiddaman.It Em sysv
92*43a6dad6SPeter Tribbleshm-memory, shm-ids, sem-ids, and msg-ids
931c085a54SAndy Fiddaman.It Em all
941c085a54SAndy Fiddamanall resource types.
951c085a54SAndy Fiddaman.El
961c085a54SAndy Fiddaman.Pp
971c085a54SAndy FiddamanBy default the summary resource is printed.
981c085a54SAndy Fiddaman.Pp
991c085a54SAndy FiddamanIn addition to a comma-separated list, multiple
1001c085a54SAndy Fiddaman.Fl r
1011c085a54SAndy Fiddamanoptions can be specified to report on a set of resources types.
1021c085a54SAndy Fiddaman.Pp
1031c085a54SAndy FiddamanThe system's cpus can be partitioned into processor sets
1041c085a54SAndy Fiddaman(psets)  By default, all cpus are in a single pset named
1051c085a54SAndy Fiddaman.Em pset_default .
1061c085a54SAndy Fiddaman.Pp
1071c085a54SAndy FiddamanMemory is not partition-able into sets.
1081c085a54SAndy FiddamanThe zonestat utility output for these resources will show them as named
1091c085a54SAndy Fiddaman.Em mem_default
1101c085a54SAndy Fiddamanand
1111c085a54SAndy Fiddaman.Em vm_default .
1121c085a54SAndy Fiddaman.Pp
1131c085a54SAndy FiddamanThe
1141c085a54SAndy Fiddaman.Em all
1151c085a54SAndy Fiddamanresource specifies that all resource types should be reported.
1161c085a54SAndy Fiddaman.It Fl n Ar name Ns Oo Ar ,name Oc
117*43a6dad6SPeter TribbleSpecify a list of resource names on which to report.
1181c085a54SAndy FiddamanFor pset resources, this is the name of the processor set.
1191c085a54SAndy FiddamanFor physical-memory, locked-memory, and virtual-memory resources,
1201c085a54SAndy Fiddamanthe only names are
1211c085a54SAndy Fiddaman.Em mem_default
1221c085a54SAndy Fiddamanand
1231c085a54SAndy Fiddaman.Em vm_default .
1241c085a54SAndy Fiddaman.Pp
1251c085a54SAndy FiddamanDedicated-cpu processor sets can be specified by their pset
1261c085a54SAndy Fiddamanname, or by just their zonename.
1271c085a54SAndy Fiddaman.Pp
1281c085a54SAndy FiddamanProcessor sets created by psrset can be specified by their pool
1291c085a54SAndy Fiddamanpset name, or just by their psetid.
1301c085a54SAndy Fiddaman.Pp
1311c085a54SAndy FiddamanIn addition to a comma-separated list, multiple
1321c085a54SAndy Fiddaman.Fl n
1331c085a54SAndy Fiddamanoptions can be specified to report on a set of resources.
1341c085a54SAndy Fiddaman.It Fl T Ar u Ns | Ns Ar d Ns | Ns Ar i
135*43a6dad6SPeter TribbleInclude the timestamp of each report.
1361c085a54SAndy FiddamanThe following formats are supported:
1371c085a54SAndy Fiddaman.Bl -tag -width indent
1381c085a54SAndy Fiddaman.It u
1391c085a54SAndy FiddamanA printed representation of the internal representation of time;
1401c085a54SAndy Fiddamansee
1411c085a54SAndy Fiddaman.Xr time 2 .
1421c085a54SAndy FiddamanThis is also known as unix time.
1431c085a54SAndy Fiddaman.It d
1441c085a54SAndy FiddamanStandard date format; see
1451c085a54SAndy Fiddaman.Xr date 1 .
1461c085a54SAndy FiddamanThis option is not valid with
1471c085a54SAndy Fiddaman.Fl p .
1481c085a54SAndy Fiddaman.It i
1491c085a54SAndy FiddamanTime formatted as the ISO 8601 compliant format:
1501c085a54SAndy Fiddaman.D1     YYYYMMDDThhmmssZ
1511c085a54SAndy Fiddaman.El
1521c085a54SAndy Fiddaman.It Fl R Ar report Ns Oo Ar ,report Oc
1531c085a54SAndy FiddamanPrint a summary report.
1541c085a54SAndy FiddamanThe supported report types are described below.
1551c085a54SAndy FiddamanIn addition to a comma-separated list, multiple
1561c085a54SAndy Fiddaman.Fl R
1571c085a54SAndy Fiddamanoptions may be specified for a set of summary reports.
1581c085a54SAndy Fiddaman.Bl -tag -width indent
1591c085a54SAndy Fiddaman.It total
1601c085a54SAndy FiddamanPrints a summary report detailing the following for each resource:
1611c085a54SAndy Fiddaman.Bl -tag -width indent
1621c085a54SAndy Fiddaman.It psets
1631c085a54SAndy FiddamanTotal cpu used since start of command invocation.
1641c085a54SAndy FiddamanThe percent used for each zone includes time that a zone was not running.
1651c085a54SAndy FiddamanFor instance, if a zone used 100% of the cpu while it was running, but the zone
1661c085a54SAndy Fiddamanwas halted for half of the intervals, then the summary report will show the
1671c085a54SAndy Fiddamanzone used 50% of the cpu time.
1681c085a54SAndy Fiddaman.It memory, limits, sysv
1691c085a54SAndy FiddamanAverage resource used of all intervals reported since command invocation.
1701c085a54SAndy FiddamanThis average factors in intervals in which a zone was not running.
1711c085a54SAndy FiddamanFor example if a zone used on average of 100M of physical memory while it was
1721c085a54SAndy Fiddamanrunning, and was only running for half the intervals, then the summary report
1731c085a54SAndy Fiddamanwill show that the zone used 50M of physical memory on average.
1741c085a54SAndy Fiddaman.El
1751c085a54SAndy Fiddaman.It average
1761c085a54SAndy FiddamanSimilar to
1771c085a54SAndy Fiddaman.Em total ,
1781c085a54SAndy Fiddamanbut only intervals in which a zone is running are factored in.
1791c085a54SAndy FiddamanFor example, if a zone was only running for a single interval, and during that
1801c085a54SAndy Fiddamaninterval, the zone used 200M of virtual memory, then its average
1811c085a54SAndy Fiddamanvirtual-memory will be 200M, regardless of the number of intervals reported
1821c085a54SAndy Fiddamanbefore the summary report.
1831c085a54SAndy Fiddaman.It high
1841c085a54SAndy FiddamanPrint a summary report detailing the highest usage of each resource and zone
1851c085a54SAndy Fiddamanduring any interval of the zonestat utility invocation.
1861c085a54SAndy Fiddaman.El
1871c085a54SAndy Fiddaman.It Fl S Ar col Ns Oo Ar ,col Oc
1881c085a54SAndy FiddamanSort zones utilizing each resource.
1891c085a54SAndy FiddamanThe following sorting columns can be specified.
1901c085a54SAndy Fiddaman.Bl -tag -width indent
1911c085a54SAndy Fiddaman.It name
1921c085a54SAndy FiddamanSort alphanumerically by zone name.
1931c085a54SAndy Fiddaman.It used
1941c085a54SAndy FiddamanSort by quantity of resource used.
1951c085a54SAndy Fiddaman.It cap
1961c085a54SAndy FiddamanSort by configured cap.
1971c085a54SAndy Fiddaman.It pcap
1981c085a54SAndy FiddamanSort by percent of cap used.
1991c085a54SAndy Fiddaman.It shr
2001c085a54SAndy FiddamanSort by allocated share.
2011c085a54SAndy Fiddaman.It pshru
2021c085a54SAndy FiddamanSort by percent of share used.
2031c085a54SAndy Fiddaman.El
2041c085a54SAndy Fiddaman.Pp
2051c085a54SAndy FiddamanBy default, output is sorted by quantity of resource used.
206*43a6dad6SPeter Tribble.Pp
207*43a6dad6SPeter TribbleThe values cpu, physical-memory, and virtual-memory can also be specified as
208*43a6dad6SPeter Tribblesort values and determine which of cpu, physical-memory, and virtual-memory
209*43a6dad6SPeter Tribbleis used as the sort key in the summary output.
2101c085a54SAndy Fiddaman.It Fl q
2111c085a54SAndy FiddamanOnly print summary reports (requires
2121c085a54SAndy Fiddaman.Fl R ) .
2131c085a54SAndy FiddamanAll interval reports are omitted.
2141c085a54SAndy Fiddaman.It Fl p
2151c085a54SAndy FiddamanPrint output in stable, machine-parsable format.
2161c085a54SAndy FiddamanIndividual fields will be delimited with :.
2171c085a54SAndy FiddamanThe line format is:
2181c085a54SAndy Fiddaman.Pp
219*43a6dad6SPeter Tribble.D1    <report type>:<resource type>:<field>[:<field>]*
2201c085a54SAndy Fiddaman.Pp
2211c085a54SAndy FiddamanIf
2221c085a54SAndy Fiddaman.Fl T
2231c085a54SAndy Fiddamanis specified each line is prefixed with a timestamp:
2241c085a54SAndy Fiddaman.Pp
225*43a6dad6SPeter Tribble.D1    <timestamp>:<report type>:<resource type>:<field>[:<field>]*
2261c085a54SAndy Fiddaman.Pp
2271c085a54SAndy FiddamanThe report types are:
2281c085a54SAndy Fiddaman.Bd -ragged -offset indent
2291c085a54SAndy Fiddaman.Em report-total ,
2301c085a54SAndy Fiddaman.Em report-average ,
2311c085a54SAndy Fiddaman.Em report-high ,
2321c085a54SAndy Fiddaman.Em interval
2331c085a54SAndy Fiddaman.Ed
2341c085a54SAndy Fiddaman.Pp
2351c085a54SAndy FiddamanThe resource types are:
2361c085a54SAndy Fiddaman.Bd -ragged -offset indent
2371c085a54SAndy Fiddaman.Em header ,
2381c085a54SAndy Fiddaman.Em footer ,
2391c085a54SAndy Fiddaman.Em summary ,
2401c085a54SAndy Fiddaman.Em physical-memory ,
2411c085a54SAndy Fiddaman.Em virtual-memory ,
2421c085a54SAndy Fiddaman.Em locked-memory ,
2431c085a54SAndy Fiddaman.Em processor-set ,
2441c085a54SAndy Fiddaman.Em processes ,
2451c085a54SAndy Fiddaman.Em lwps ,
246*43a6dad6SPeter Tribble.Em shm-memory ,
247*43a6dad6SPeter Tribble.Em shm-ids ,
248*43a6dad6SPeter Tribble.Em sem-ids ,
249*43a6dad6SPeter Tribble.Em msg-ids ,
2501c085a54SAndy Fiddaman.Em lofi
2511c085a54SAndy Fiddaman.Ed
2521c085a54SAndy Fiddaman.Pp
2531c085a54SAndy FiddamanThe
2541c085a54SAndy Fiddaman.Em header
255*43a6dad6SPeter Tribbleresource is a special resource used to mark the beginning of an interval or
2561c085a54SAndy Fiddamansummary report.
2571c085a54SAndy FiddamanAll output lines between header resources belong to the same report.
2581c085a54SAndy FiddamanEach header has a matching footer.
2591c085a54SAndy Fiddaman.Pp
2601c085a54SAndy FiddamanThe remaining fields are resource type specific.
2611c085a54SAndy FiddamanSee the zonestat utility output for details.
2621c085a54SAndy Fiddaman.Pp
2631c085a54SAndy FiddamanAll existing output fields are stable.
2641c085a54SAndy FiddamanFuture versions may introduce new report and resource types.
2651c085a54SAndy FiddamanFuture versions may also add additional new fields to the end of existing
2661c085a54SAndy Fiddamanoutput lines.
2671c085a54SAndy Fiddaman.It Fl P Ar line Ns Oo Ar ,line Oc
2681c085a54SAndy FiddamanFor parsable output, specify lines to output in parsable output.
2691c085a54SAndy FiddamanOne or more of the following line types can be chosen:
2701c085a54SAndy Fiddaman.Bl -tag -width indent
2711c085a54SAndy Fiddaman.It resource
2721c085a54SAndy FiddamanThe lines describing each resource.
2731c085a54SAndy Fiddaman.It total
2741c085a54SAndy FiddamanThe total utilization of each resource.
2751c085a54SAndy Fiddaman.It system
2761c085a54SAndy FiddamanThe utilization of each resource by the system.
277*43a6dad6SPeter TribbleThis includes the kernel, and any resource consumption not attributable to a
2781c085a54SAndy Fiddamanspecific zone.
2791c085a54SAndy FiddamanWhen zonestat is run from within a non-global-zone, this value will be the
2801c085a54SAndy Fiddamanaggregate resource consumed by the system and all other zones.
2811c085a54SAndy Fiddaman.It zones
2821c085a54SAndy FiddamanLines detailing the per-zone utilization of each resource.
2831c085a54SAndy Fiddaman.It header, footer
2841c085a54SAndy FiddamanEach interval and summary report has a header, which prints details such
2851c085a54SAndy Fiddamanas the interval and count information.
2861c085a54SAndy FiddamanAfter each report, any footer is also printed
2871c085a54SAndy Fiddaman.El
2881c085a54SAndy Fiddaman.El
2891c085a54SAndy Fiddaman.Ss OPERANDS
2901c085a54SAndy Fiddaman.Bl -tag -width indent
2911c085a54SAndy Fiddaman.It interval
2921c085a54SAndy FiddamanSpecifies the length in seconds to pause between each interval report.
293*43a6dad6SPeter TribbleAn interval specified as the textual value
2941c085a54SAndy Fiddaman.Em default
2951c085a54SAndy Fiddamanwill use the configured interval of the zones
2961c085a54SAndy Fiddamanmonitoring service - see
297bbf21555SRichard Lowe.Xr zonestatd 8 .
2981c085a54SAndy Fiddaman.Pp
2991c085a54SAndy FiddamanInterval is required.
3001c085a54SAndy FiddamanAn interval of zero is not permitted.
3011c085a54SAndy FiddamanThe interval can be specified as [nh][nm][ns], such as 10s or 1m.
3021c085a54SAndy Fiddaman.It duration
3031c085a54SAndy FiddamanSpecifies the number of intervals to report.
3041c085a54SAndy FiddamanDefaults to infinity if not specified.
3051c085a54SAndy FiddamanThe command duration is (interval * duration).
3061c085a54SAndy FiddamanA duration of zero is invalid.
307*43a6dad6SPeter TribbleA duration specified as the textual value
3081c085a54SAndy Fiddaman.Em inf
3091c085a54SAndy Fiddamancan also be specified to explicitly choose infinity.
3101c085a54SAndy Fiddaman.Pp
3111c085a54SAndy FiddamanDuration can also be specified as [nh][nm][ns].
3121c085a54SAndy FiddamanIn this case, duration will be interpreted as the duration of execution time.
3131c085a54SAndy FiddamanThe actual duration will be rounded up to the nearest multiple of the interval.
3141c085a54SAndy Fiddaman.It report
3151c085a54SAndy FiddamanSpecify the summary report period.
3161c085a54SAndy FiddamanFor instance, a report of 4 would produce reports every 4 intervals.
3171c085a54SAndy FiddamanIf the command duration is not a multiple of report, then the last report will
3181c085a54SAndy Fiddamanbe of any remaining intervals.
3191c085a54SAndy Fiddaman.Pp
3201c085a54SAndy FiddamanReport can also be specified as [nh][nm][ns].
3211c085a54SAndy FiddamanIn this case, reports will be output at the specified time period, rounded up
3221c085a54SAndy Fiddamanto the nearest interval.
3231c085a54SAndy FiddamanIf the command duration is not a multiple of report, then the last report will
3241c085a54SAndy Fiddamanbe of any remaining intervals.
3251c085a54SAndy Fiddaman.Pp
3261c085a54SAndy FiddamanRequires
3271c085a54SAndy Fiddaman.Fl R .
3281c085a54SAndy FiddamanIf
3291c085a54SAndy Fiddaman.Fl R
3301c085a54SAndy Fiddamanis specified and report is not, the report period will be the entire command
3311c085a54SAndy Fiddamanduration, producing the specified reports at the end of execution.
3321c085a54SAndy Fiddaman.El
3331c085a54SAndy Fiddaman.Ss OUTPUT
334*43a6dad6SPeter TribbleThe column headings in the output have the following meanings:
3351c085a54SAndy Fiddaman.Bl -tag -width indent
3361c085a54SAndy Fiddaman.It SYSTEM-MEMORY
3371c085a54SAndy FiddamanThe total amount of memory available on the physical host.
3381c085a54SAndy Fiddaman.It SYSTEM-LIMIT
3391c085a54SAndy FiddamanThe maximum amount of resource available on the physical host.
3401c085a54SAndy Fiddaman.It CPUS
3411c085a54SAndy FiddamanThe number of cpus allocated to a processor set.
3421c085a54SAndy Fiddaman.It ONLINE
3431c085a54SAndy FiddamanOf the cpus allocated to a processor set, the number of cpus
3441c085a54SAndy Fiddamanwhich can execute processes.
3451c085a54SAndy Fiddaman.It MIN/MAX
3461c085a54SAndy FiddamanThe minimum and maximum number of cpus which may be allocated
3471c085a54SAndy Fiddamanto the processor set by the system.
3481c085a54SAndy Fiddaman.It ZONE
3491c085a54SAndy FiddamanThe zone using the resource.
3501c085a54SAndy FiddamanIn addition to zone names, this column may also contain:
3511c085a54SAndy Fiddaman.Bl -tag -width indent
3521c085a54SAndy Fiddaman.It [total]
3531c085a54SAndy FiddamanThe total quantity of resource used system-wide.
3541c085a54SAndy Fiddaman.It [system]
3551c085a54SAndy FiddamanThe quantity of resource used by the kernel or in a manner not associated with
3561c085a54SAndy Fiddamanany particular zone.
3571c085a54SAndy Fiddaman.Pp
3581c085a54SAndy FiddamanWhen zonestat is used within a non-global zone, [system] designates the
3591c085a54SAndy Fiddamanaggregate resource used by the system and by all other zones.
3601c085a54SAndy Fiddaman.El
3611c085a54SAndy Fiddaman.It USED
3621c085a54SAndy FiddamanThe amount of resource used.
3631c085a54SAndy Fiddaman.It PCT
3641c085a54SAndy FiddamanThe amount of resource used as a percent of the total resource.
3651c085a54SAndy Fiddaman.It %PART
366*43a6dad6SPeter TribbleThe amount of cpu used as a percentage of the total cpu in a processor-set to
3671c085a54SAndy Fiddamanwhich the zone is bound.
3681c085a54SAndy FiddamanA zone can only have processes bound to multiple processor sets if it is the
369bbf21555SRichard Loweglobal zone, or if psrset(8) psets are used.
3701c085a54SAndy FiddamanIf multiple binding are found for a zone, its %PART will be the fraction used
3711c085a54SAndy Fiddamanof all bound psets.
3721c085a54SAndy FiddamanFor [total] and [system], %PART is the percent used of all cpus on the system.
3731c085a54SAndy Fiddaman.It CAP
3741c085a54SAndy FiddamanIf a zone is configured to have a cap on the given resource, the cap will be
3751c085a54SAndy Fiddamandisplayed in this column.
3761c085a54SAndy Fiddaman.It %CAP
3771c085a54SAndy FiddamanThe amount of resource used as a percent of zone's configured cap.
3781c085a54SAndy Fiddaman.It SHRS
3791c085a54SAndy FiddamanThe number of shares allocated to the zone.
3801c085a54SAndy FiddamanFor the [total] row, this will be the total number of shares allocated to all
3811c085a54SAndy Fiddamanzones sharing the resource.
3821c085a54SAndy Fiddaman.Pp
3831c085a54SAndy FiddamanIf a zone is not configured to use shares, and is sharing a
3841c085a54SAndy Fiddamanresource with other zones that are configured to use shares,
3851c085a54SAndy Fiddamanthis column will contain
3861c085a54SAndy Fiddaman.Em no-fss
3871c085a54SAndy Fiddamanfor the zone.
3881c085a54SAndy Fiddaman.It %SHR
3891c085a54SAndy FiddamanThe fraction of the total shares allocated to the zone.
3901c085a54SAndy FiddamanFor instance, if 2 zones share a processor set, each with 10 shares, then each
3911c085a54SAndy Fiddamanzone will have a %SHR of 50%.
3921c085a54SAndy Fiddaman.It %SHRU
3931c085a54SAndy FiddamanOf the share allocated to the zone, the fraction of resource
3941c085a54SAndy Fiddamanused.
3951c085a54SAndy FiddamanZones using all of their share will have a %SHRU of 100%.
3961c085a54SAndy FiddamanBecause shares are only enforced when there is resource contention, it is
3971c085a54SAndy Fiddamanpossible for a zone to have a %SHRU in excess of 100%.
3981c085a54SAndy Fiddaman.El
3991c085a54SAndy Fiddaman.Sh IMPLEMENTATION NOTES
400*43a6dad6SPeter TribbleThe zonestat utility depends on the zones-monitoring service:
4011c085a54SAndy Fiddaman.Pp
402*43a6dad6SPeter Tribble.D1 svc:/system/zones-monitoring:default
4031c085a54SAndy Fiddaman.Pp
404*43a6dad6SPeter TribbleIf the zones-monitoring service is stopped while the zonestat utility is
405*43a6dad6SPeter Tribblerunning, the zonestat command invocation will quit without printing additional
406*43a6dad6SPeter Tribblereports.
4071c085a54SAndy Fiddaman.Pp
4081c085a54SAndy FiddamanThe reports will be printed if zonestat is interrupted (by ctrl-c,
4091c085a54SAndy Fiddaman.Dv SIGINT )
4101c085a54SAndy Fiddamanbefore reaching the next report period.
4111c085a54SAndy Fiddaman.Sh EXIT STATUS
4121c085a54SAndy Fiddaman.Ex -std
4131c085a54SAndy Fiddaman.Bl -tag -width indent
4141c085a54SAndy Fiddaman.It 0
4151c085a54SAndy FiddamanSuccessful completion.
4161c085a54SAndy Fiddaman.It 1
4171c085a54SAndy FiddamanAn error occurred.
4181c085a54SAndy Fiddaman.It 2
4191c085a54SAndy FiddamanInvalid usage.
4201c085a54SAndy Fiddaman.It 3
421*43a6dad6SPeter TribbleThe svc:/system/zones-monitoring:default service is not running or not
422*43a6dad6SPeter Tribbleresponding.
4231c085a54SAndy Fiddaman.El
4241c085a54SAndy Fiddaman.Sh EXAMPLES
4251c085a54SAndy FiddamanExample 1:  Summary of cpu and memory utilization every 5 seconds.
4261c085a54SAndy Fiddaman.Bd -literal
4271c085a54SAndy Fiddaman       # zonestat 5 1
428*43a6dad6SPeter Tribble       Collecting data for first interval...
429*43a6dad6SPeter Tribble       Interval: 1, Duration: 0:00:05
430*43a6dad6SPeter Tribble       SUMMARY         Cpus/Online: 8/8   Physical: 8100M    Virtual: 23.9G
431*43a6dad6SPeter Tribble		----------CPU---------- ----PHYSICAL----- -----VIRTUAL-----
432*43a6dad6SPeter Tribble	   ZONE  USED %PART  %CAP %SHRU  USED   PCT  %CAP  USED   PCT  %CAP
433*43a6dad6SPeter Tribble        [total]  1.22 15.3%     -     - 4206M 51.9%     - 6298M 25.7%     -
434*43a6dad6SPeter Tribble       [system]  0.01 0.15%     -     - 2783M 34.3%     - 3905M 15.9%     -
435*43a6dad6SPeter Tribble          zoneA  0.99 12.4%     -     - 35.8M 0.44%     - 31.7M 0.12%     -
436*43a6dad6SPeter Tribble          zoneB  0.12 1.59%     -     - 18.6M 0.23%     - 12.9M 0.05%     -
437*43a6dad6SPeter Tribble         global  0.08 1.08%     -     - 1273M 15.7%     - 2251M 9.19%     -
4381c085a54SAndy Fiddaman.Ed
4391c085a54SAndy Fiddaman.Pp
4401c085a54SAndy FiddamanExample 2:  Using parsable output, fetching only zone usages.
4411c085a54SAndy Fiddaman.Pp
4421c085a54SAndy FiddamanThe following command will produce parsable output, printing one
4431c085a54SAndy Fiddamanline per zone using each pset resource for a 5 second interval.
4441c085a54SAndy Fiddaman.Bd -literal
4451c085a54SAndy Fiddaman
4461c085a54SAndy Fiddaman       # zonestat -p -P zones -r psets 5 1
4471c085a54SAndy Fiddaman
4481c085a54SAndy Fiddaman.Ed
4491c085a54SAndy Fiddaman.Pp
4501c085a54SAndy FiddamanExample 3:  Report on the default pset.
4511c085a54SAndy Fiddaman.Pp
4521c085a54SAndy FiddamanThe following command will report on the default pset once a second
4531c085a54SAndy Fiddamanfor one minute.
4541c085a54SAndy Fiddaman.Bd -literal
4551c085a54SAndy Fiddaman
4561c085a54SAndy Fiddaman       # zonestat -r default-pset 1 1m
4571c085a54SAndy Fiddaman
4581c085a54SAndy Fiddaman.Ed
4591c085a54SAndy Fiddaman.Pp
4601c085a54SAndy FiddamanExample 4:  Report total and high utilization.
4611c085a54SAndy Fiddaman.Pp
4621c085a54SAndy FiddamanThe following command monitors silently at a 10 second interval
4631c085a54SAndy Fiddamanfor 24 hours, producing a total and high report every 1 hour.
4641c085a54SAndy Fiddaman.Bd -literal
4651c085a54SAndy Fiddaman
4661c085a54SAndy Fiddaman       # zonestat -q -R total,high 10s 24h 1h
4671c085a54SAndy Fiddaman
4681c085a54SAndy Fiddaman.Ed
4691c085a54SAndy Fiddaman.Sh INTERFACE STABILITY
4701c085a54SAndy FiddamanCommand invocation and parsable output is Committed.
4711c085a54SAndy FiddamanHuman readable output (default output) is uncommitted.
4721c085a54SAndy Fiddaman.Sh SECURITY
4731c085a54SAndy FiddamanWhen run from within a non-global zone (NGZ), only processor sets
4741c085a54SAndy Fiddamanvisible to the NGZ are reported.
4751c085a54SAndy FiddamanThe NGZ output will include all of other system resources, such as memory and
4761c085a54SAndy Fiddamanlimits.
4771c085a54SAndy Fiddaman.Pp
4781c085a54SAndy FiddamanFor all reported resources, the NGZ's usage will be output.
4791c085a54SAndy FiddamanUsage of each resource by the system, global zone, and all other
4801c085a54SAndy Fiddamanzones, will be reported as used by
4811c085a54SAndy Fiddaman.Em system .
4821c085a54SAndy Fiddaman.Sh SEE ALSO
4831c085a54SAndy Fiddaman.Xr date 1 ,
484c55633c3SPeter Tribble.Xr prctl 1 ,
485bbf21555SRichard Lowe.Xr timezone 5 ,
486bbf21555SRichard Lowe.Xr privileges 7 ,
487bbf21555SRichard Lowe.Xr resource_controls 7 ,
488bbf21555SRichard Lowe.Xr zones 7 ,
489bbf21555SRichard Lowe.Xr pooladm 8 ,
490bbf21555SRichard Lowe.Xr poolcfg 8 ,
491bbf21555SRichard Lowe.Xr rcapadm 8 ,
492bbf21555SRichard Lowe.Xr zoneadm 8 ,
493bbf21555SRichard Lowe.Xr zonecfg 8 ,
494bbf21555SRichard Lowe.Xr zonestatd 8
495