ZONESTAT(1) | User Commands | ZONESTAT(1) |
zonestat
— report
active zone statistics
zonestat |
[-z zonelist]
[-r reslist]
[-n namelist]
[-T
u|d|i]
[-R reports]
[-q ] [-p
[-P lines]]
[-S cols]
interval [duration
[report]] |
The zonestat
utility reports on the cpu,
memory, 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 specified 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 utilization. The -r option can be used to select the specific resources to be shown in the output.
The following options are supported:
-z
zonename[,zonename...]-z
options can be specified to report on a set of
zones. The output will include any resources which have usage by the
specified zone(s).-r
resource[,resource...]The following nicknames can also be specified as resource names:
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 processor sets (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 will show them as named mem_default and vm_default.
The all resource specifies that all resource types should be reported.
-n
name[,name]Dedicated-cpu processor sets can be specified by their pset name, or by just their zonename.
Processor sets created by psrset can be specified by their pool pset name, or just by their psetid.
In addition to a comma-separated list, multiple
-n
options can be specified to report on a set
of resources.
-T
u|d|i-R
report[,report]-R
options may be specified for a set of summary reports.
-S
col[,col]By default, output is sorted by quantity of resource used.
The values cpu, physical-memory, and virtual-memory can also be specified as sort values and determine which of cpu, physical-memory, and virtual-memory is used as the sort key in the summary output.
-q
-R
). All
interval reports are omitted.-p
If -T
is specified each line is
prefixed with a timestamp:
The report types are:
The resource types are:
The header resource is a special resource used to mark the beginning of an interval or summary report. All output lines between header resources belong to the same report. Each header has a matching footer.
The remaining fields are resource type specific. See the zonestat utility output for details.
All existing output fields are stable. Future versions may introduce new report and resource types. Future versions may also add additional new fields to the end of existing output lines.
-P
line[,line]Interval is required. An interval of zero is not permitted. The interval can be specified as [nh][nm][ns], such as 10s or 1m.
Duration can also be specified as [nh][nm][ns]. In this case, duration will be interpreted as the duration of execution time. The actual duration will be rounded up to the nearest multiple of the interval.
Report can also be specified as [nh][nm][ns]. In this case, reports will be 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 will be of any remaining intervals.
Requires -R
. If
-R
is specified and report is not, the report
period will be the entire command duration, producing the specified
reports at the end of execution.
The column headings in the output have the following meanings:
When zonestat is used within a non-global zone, [system] designates the aggregate resource used by the system and by all other zones.
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 will contain no-fss for the zone.
The zonestat utility depends on the zones-monitoring service:
If the zones-monitoring service is stopped while the zonestat utility is running, the zonestat command invocation will quit without printing additional reports.
The reports will be printed if zonestat is interrupted (by ctrl-c,
SIGINT
) before reaching the next report period.
The zonestat
utility exits 0 on
success, and >0 if an error occurs.
Example 1: Summary of cpu and memory utilization every 5 seconds.
# zonestat 5 1 Collecting data for first interval... Interval: 1, Duration: 0:00:05 SUMMARY Cpus/Online: 8/8 Physical: 8100M Virtual: 23.9G ----------CPU---------- ----PHYSICAL----- -----VIRTUAL----- ZONE USED %PART %CAP %SHRU USED PCT %CAP USED PCT %CAP [total] 1.22 15.3% - - 4206M 51.9% - 6298M 25.7% - [system] 0.01 0.15% - - 2783M 34.3% - 3905M 15.9% - zoneA 0.99 12.4% - - 35.8M 0.44% - 31.7M 0.12% - zoneB 0.12 1.59% - - 18.6M 0.23% - 12.9M 0.05% - global 0.08 1.08% - - 1273M 15.7% - 2251M 9.19% -
Example 2: Using parsable output, fetching only zone usages.
The following command will produce parsable output, printing one line per zone using each pset resource for a 5 second interval.
# zonestat -p -P zones -r psets 5 1
Example 3: Report on the default pset.
The following command will report on the default pset once a second for one minute.
# zonestat -r default-pset 1 1m
Example 4: 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
Command invocation and parsable output is Committed. Human readable output (default output) is uncommitted.
When run from within a non-global zone (NGZ), only processor sets visible to the NGZ are reported. The NGZ output will include all of other system resources, such as memory and limits.
For all reported resources, the NGZ's usage will be output. Usage of each resource by the system, global zone, and all other zones, will be reported as used by system.
date(1), prctl(1), timezone(5), privileges(7), resource_controls(7), zones(7), pooladm(8), poolcfg(8), rcapadm(8), zoneadm(8), zonecfg(8), zonestatd(8)
February 18, 2023 | OmniOS |