JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1: User Commands     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

User Commands

acctcom(1)

adb(1)

addbib(1)

admin(1)

alias(1)

allocate(1)

amt(1)

appcert(1)

apptrace(1)

apropos(1)

ar(1)

arch(1)

as(1)

asa(1)

at(1)

atq(1)

atrm(1)

audioconvert(1)

audioctl(1)

audioplay(1)

audiorecord(1)

audiotest(1)

auths(1)

auto_ef(1)

awk(1)

banner(1)

basename(1)

basename(1B)

batch(1)

bc(1)

bdiff(1)

bfs(1)

bg(1)

biff(1B)

break(1)

builtin(1)

cal(1)

calendar(1)

case(1)

cat(1)

cd(1)

cdc(1)

cdrw(1)

chdir(1)

checkeq(1)

checknr(1)

chgrp(1)

chkey(1)

chmod(1)

chown(1)

chown(1B)

ckdate(1)

ckgid(1)

ckint(1)

ckitem(1)

ckkeywd(1)

ckpath(1)

ckrange(1)

ckstr(1)

cksum(1)

cktime(1)

ckuid(1)

ckyorn(1)

clear(1)

cmp(1)

col(1)

comb(1)

comm(1)

command(1)

compress(1)

continue(1)

cp(1)

cpio(1)

cpp(1)

cputrack(1)

crle(1)

crontab(1)

csh(1)

csplit(1)

ct(1C)

ctags(1)

ctrun(1)

ctstat(1)

ctwatch(1)

cu(1C)

cut(1)

date(1)

dc(1)

deallocate(1)

decrypt(1)

delta(1)

deroff(1)

df(1B)

dhcpinfo(1)

diff(1)

diff3(1)

diffmk(1)

digest(1)

digestp(1)

dircmp(1)

dirname(1)

dirs(1)

dis(1)

disown(1)

dispgid(1)

dispuid(1)

dos2unix(1)

dpost(1)

du(1)

du(1B)

dump(1)

dumpcs(1)

dumpkeys(1)

echo(1)

echo(1B)

ed(1)

edit(1)

egrep(1)

eject(1)

elfdump(1)

elfedit(1)

elffile(1)

elfsign(1)

elfwrap(1)

encrypt(1)

enhance(1)

env(1)

eqn(1)

errange(1)

errdate(1)

errgid(1)

errint(1)

erritem(1)

error(1)

errpath(1)

errstr(1)

errtime(1)

erruid(1)

erryorn(1)

eval(1)

ex(1)

exec(1)

exit(1)

expand(1)

export(1)

exportfs(1B)

expr(1)

expr(1B)

exstr(1)

factor(1)

false(1)

fastboot(1B)

fasthalt(1B)

fc(1)

fg(1)

fgrep(1)

file(1)

file(1B)

filebench(1)

filep(1)

filesync(1)

filofaxp(1)

find(1)

finger(1)

fmt(1)

fmtmsg(1)

fold(1)

for(1)

foreach(1)

franklinp(1)

from(1B)

ftp(1)

function(1)

gcore(1)

gencat(1)

geniconvtbl(1)

genmsg(1)

get(1)

getconf(1)

getfacl(1)

getlabel(1)

getopt(1)

getoptcvt(1)

getopts(1)

gettext(1)

gettxt(1)

getzonepath(1)

glob(1)

goto(1)

gprof(1)

grep(1)

groups(1)

groups(1B)

grpck(1B)

hash(1)

hashcheck(1)

hashmake(1)

hashstat(1)

head(1)

helpdate(1)

helpgid(1)

helpint(1)

helpitem(1)

helppath(1)

helprange(1)

helpstr(1)

helptime(1)

helpuid(1)

helpyorn(1)

hist(1)

history(1)

hostid(1)

hostname(1)

i386(1)

i486(1)

iconv(1)

if(1)

indxbib(1)

install(1B)

ipcrm(1)

ipcs(1)

isainfo(1)

isalist(1)

jobs(1)

join(1)

jsh(1)

kbd(1)

kdestroy(1)

keylogin(1)

keylogout(1)

kill(1)

kinit(1)

klist(1)

kmdb(1)

kmfcfg(1)

kpasswd(1)

krb5-config(1)

ksh(1)

ksh88(1)

ksh93(1)

ktutil(1)

kvno(1)

lari(1)

last(1)

lastcomm(1)

ld(1)

ldapadd(1)

ldapdelete(1)

ldaplist(1)

ldapmodify(1)

ldapmodrdn(1)

ldapsearch(1)

ldd(1)

ld.so.1(1)

let(1)

lex(1)

lgrpinfo(1)

limit(1)

line(1)

list_devices(1)

listusers(1)

llc2_autoconfig(1)

llc2_config(1)

llc2_stats(1)

ln(1)

ln(1B)

loadkeys(1)

locale(1)

localedef(1)

logger(1)

logger(1B)

login(1)

logname(1)

logout(1)

look(1)

lookbib(1)

lorder(1)

ls(1)

ls(1B)

m4(1)

mac(1)

mach(1)

machid(1)

madv.so.1(1)

mail(1)

Mail(1B)

mail(1B)

mailcompat(1)

mailp(1)

mailq(1)

mailstats(1)

mailx(1)

make(1S)

makekey(1)

man(1)

mconnect(1)

mcs(1)

mdb(1)

mesg(1)

mkdir(1)

mkmsgs(1)

mkstr(1B)

mktemp(1)

moe(1)

more(1)

mp(1)

mpss.so.1(1)

msgcc(1)

msgcpp(1)

msgcvt(1)

msgfmt(1)

msggen(1)

msgget(1)

mt(1)

mv(1)

nawk(1)

nc(1)

ncab2clf(1)

ncakmod(1)

neqn(1)

netcat(1)

newform(1)

newgrp(1)

newsp(1)

newtask(1)

nice(1)

nl(1)

nm(1)

nohup(1)

notify(1)

nroff(1)

od(1)

on(1)

onintr(1)

optisa(1)

pack(1)

packagemanager(1)

page(1)

pagesize(1)

pargs(1)

passwd(1)

paste(1)

patch(1)

pathchk(1)

pax(1)

pcat(1)

pcred(1)

perl(1)

pfbash(1)

pfcsh(1)

pfexec(1)

pfiles(1)

pfksh(1)

pflags(1)

pfsh(1)

pftcsh(1)

pfzsh(1)

pg(1)

pgrep(1)

pkcs11_inspect(1)

pkg(1)

pkgdepend(1)

pkgdiff(1)

pkgfmt(1)

pkginfo(1)

pkglint(1)

pkgmerge(1)

pkgmk(1)

pkgmogrify(1)

pkgparam(1)

pkgproto(1)

pkgrecv(1)

pkgrepo(1)

pkgsend(1)

pkgsign(1)

pkgtrans(1)

pkill(1)

pklogin_finder(1)

pktool(1)

plabel(1)

pldd(1)

plgrp(1)

plimit(1)

pmadvise(1)

pmap(1)

pm-updatemanager(1)

popd(1)

ppgsz(1)

ppriv(1)

pr(1)

praliases(1)

prctl(1)

preap(1)

print(1)

printenv(1B)

printf(1)

priocntl(1)

proc(1)

prof(1)

profiles(1)

projects(1)

prs(1)

prt(1)

prun(1)

ps(1)

ps(1B)

psig(1)

pstack(1)

pstop(1)

ptime(1)

ptree(1)

pushd(1)

pvs(1)

pwait(1)

pwd(1)

pwdx(1)

radadrgen(1)

ranlib(1)

rcapstat(1)

rcp(1)

read(1)

readonly(1)

red(1)

refer(1)

regcmp(1)

rehash(1)

remote_shell(1)

remsh(1)

renice(1)

repeat(1)

reset(1B)

return(1)

rksh(1)

rksh88(1)

rlogin(1)

rm(1)

rmail(1)

rmdel(1)

rmdir(1)

rmformat(1)

rmmount(1)

rmumount(1)

roffbib(1)

roles(1)

rpcgen(1)

rpm2cpio(1)

rsh(1)

runat(1)

rup(1)

rup(1C)

ruptime(1)

rusage(1B)

rusers(1)

rwho(1)

sact(1)

sar(1)

sccs(1)

sccs-admin(1)

sccs-cdc(1)

sccs-comb(1)

sccs-delta(1)

sccsdiff(1)

sccs-get(1)

sccs-help(1)

sccshelp(1)

sccs-prs(1)

sccs-prt(1)

sccs-rmdel(1)

sccs-sact(1)

sccs-sccsdiff(1)

sccs-unget(1)

sccs-val(1)

scp(1)

script(1)

sdiff(1)

sed(1)

sed(1B)

select(1)

set(1)

setenv(1)

setfacl(1)

setlabel(1)

setpgrp(1)

settime(1)

sftp(1)

sh(1)

shcomp(1)

shell_builtins(1)

shift(1)

shutdown(1B)

size(1)

sleep(1)

soelim(1)

sort(1)

sortbib(1)

sotruss(1)

source(1)

sparc(1)

spell(1)

spellin(1)

split(1)

srchtxt(1)

ssh(1)

ssh-add(1)

ssh-agent(1)

ssh-http-proxy-connect(1)

ssh-keygen(1)

ssh-keyscan(1)

ssh-socks5-proxy-connect(1)

stop(1)

strchg(1)

strconf(1)

strings(1)

strip(1)

stty(1)

stty(1B)

sum(1)

sum(1B)

sun(1)

suspend(1)

svcprop(1)

svcs(1)

switch(1)

symorder(1)

sys-suspend(1)

sysV-make(1)

t300(1)

t300s(1)

t4014(1)

t450(1)

tabs(1)

tail(1)

talk(1)

tar(1)

tbl(1)

tcopy(1)

tee(1)

tek(1)

telnet(1)

test(1)

test(1B)

tftp(1)

time(1)

timemanp(1)

times(1)

timesysp(1)

timex(1)

tip(1)

touch(1)

touch(1B)

tplot(1)

tput(1)

tr(1)

tr(1B)

trap(1)

troff(1)

true(1)

truss(1)

tset(1B)

tsort(1)

tty(1)

type(1)

typeset(1)

ul(1)

ulimit(1)

umask(1)

unalias(1)

uname(1)

uncompress(1)

unexpand(1)

unget(1)

unhash(1)

unifdef(1)

uniq(1)

units(1)

unix2dos(1)

unlimit(1)

unpack(1)

unset(1)

unsetenv(1)

until(1)

updatehome(1)

uptime(1)

userattr(1)

users(1B)

uucp(1C)

uudecode(1C)

uuencode(1C)

uuglist(1C)

uulog(1C)

uuname(1C)

uupick(1C)

uustat(1C)

uuto(1C)

uux(1C)

vacation(1)

val(1)

valdate(1)

valgid(1)

valint(1)

valpath(1)

valrange(1)

valstr(1)

valtime(1)

valuid(1)

valyorn(1)

vc(1)

vedit(1)

ver(1)

vgrind(1)

vi(1)

view(1)

vipw(1B)

volcheck(1)

volrmmount(1)

w(1)

wait(1)

wc(1)

what(1)

whatis(1)

whence(1)

whereis(1B)

which(1)

while(1)

who(1)

whoami(1B)

whocalls(1)

whois(1)

write(1)

xargs(1)

xgettext(1)

xstr(1)

yacc(1)

yes(1)

ypcat(1)

ypmatch(1)

yppasswd(1)

ypwhich(1)

zcat(1)

zlogin(1)

zonename(1)

zonestat(1)

zonestat

- report active zone statistics

Synopsis

zonestat [-z zonelist] [-r reslist] [-n namelist] [-T u | d | i] 
   [-R reports] [-q] [-x] [-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 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, 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 processor sets 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 NGZ's usage is output. Usage of each resource by the system, global zone, and all other zones, is reported as used by [system].

For networking resources, only NGZ's usage is output. NGZs do not have visibility to other zones' networking resources and statistics.

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

Options

The following options are supported:

-n name[,name]

Specify a list resource names on which to report. For pset resources, this is the name of the processor set. 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 processor sets can be specified by their pset name (SUNWtmp_zonename or by just their zonename.

Processor sets created by psrset can be specified by their pool pset name (SUNWlegacy_pset id), or just by their pset id.

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

-p

Parseable output.

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

report type:resource:field[:field]*

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

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

The resource types are: header, footer, summary, physical-memory, virtual-memory, locked-memory, processor-set, processes, lwps, sysv-shared-memory, sysv-shmids, sysv-semids, sysv-msgids, lofi, network.

The header resource is a special resource used to state 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 might introduce new report and resource types. Future versions might also add additional new fields to the end of existing output n lines.

-P line[,line]

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

header, footer

For each interval, and summary report has a header, which prints details such as the interval and count information. After each report, and footer is also printed

resource

The lines describing each resource.

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 system 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.

-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, and network.

summary

A summary of cpu, physical-memory, virtual memory, and network usage.

memory

physical-memory, virtual-memory, and locked-memory.

psets

processor-set

default-pset

The default pset only.

limits

processes, lwps, lofi.

network

network datalinks.

sysv

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 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 shows them as named mem_default and vm_default.

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

-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 percent 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 command invocation. This average factors in intervals in which a zone was not running. For example if a zone used on average 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 calculated since start of command invocation and is normalized to number of bytes per second. The percentage used is based on total available bandwidth.

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 summary 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, This is the default.

physical-memory

Sort by physical memory usage in the summary.

virtual-memory

Sort by virtual memory usage in the summary.

network

Sort by network usage in the summary.

network

Sort by network usage in the summary.

-T u | d | i

Include timestamp of each report. The following formats are supported:

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 example, 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(1M).

interval is required. An interval of zero is not permitted. interval 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, duration 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 produces reports every 4 intervals. If the command duration is not a multiple of report, then the last report is of any remaining intervals.

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 processor set

ONLINE

Of the cpus allocated to a processor set, the number of cpus which can execute processes.

MIN/MAX

The minimum and maximum number of cpus which can be allocated to the processor set 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, [system] designates the aggregate resource used by the system 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.

PCT

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

%PART

The amount of cpu used as a percentage of the total cpu in a processor-set to which the zone is bound. A zone can only have processes bound to multiple processor sets if it is the global zone, or if psrset(1M) psets are used. If multiple binding are found for a zone, it's %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 processor set, each with 10 shares, then each zone has a %SHR of 50%.

%SHRU

Of the share allocated to the zone, 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%.

TOBYTES

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

PRBYTE

The number of received bytes that consumes physical bandwidth.

POBYTE

The number of transmitted bytes that consumes physical bandwidth.

%PRBYE

The percentage of available physical bandwidth used to receive PRBYTE.

%POBYE

The percentage of available physical bandwidth used to transmit POBYTE.

%PUSE

The sum of PRBYTE and POBYTE 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.

Examples

Example 1 Using zonestat to Display a Summary of cpu and Memory Utilization

The following command shows a summary of cpu and memory utilization every 5 seconds:

 # zonestat 5 1
        SUMMARY   Cpus/Online: 4/4  Physical: 8063M  Virtual: 11.8G
                     ---CPU---   --PHYSMEM-- ---VMEM---  ---NET---
               ZONE  USED %PART  USED %USED  USED %USED PBYTE %PUSE
            [total]  0.23 5.76% 3211M 39.8% 4191M 34.6%  350M 18.7%     -
           [system]  0.03 0.83% 2791M 34.6% 3890M 32.1%     -     -
             global  0.19 4.86%  324M 4.01%  228M 1.89%  200M 10.7%
              zoneA  0.00 0.03% 47.9M 0.59% 36.3M 0.30%  100M  5.3%
              zoneB  0.00 0.02% 48.1M 0.59% 36.4M 0.30%   50M  2.7%

Example 2 Using zonestat to Produce Parseable Output

The following command produces parseable output. It prints one line per zone using each pset resource for a 5 second interval:

# zonestat -p -P zones -r psets 5 1

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

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

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 e1000g0 5 5

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 responding.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/zones
Interface Stability
See below.

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

See Also

date(1), prctl(1), pooladm(1M), poolcfg(1M), psrset(1M), rcapadm(1M), zoneadm(1M), zonecfg(1M), zonestatd(1M), time(2), timezone(4), attributes(5), privileges(5), resource_controls(5)

Notes

The zonestat utility depends on the zones monitoring service: svc/system/zonestat:default. If the zonestat service is stopped while the zonestat 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.