Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: August 2019
 
 

Commands Used on a System With Non-Global Zones

This section provides descriptions and man page links to commands that are used with zones.

Commands for Zone Administration and Monitoring

The following commands provide the primary administrative interface to Oracle Solaris Zones. The commands are listed by man page section.


Note -  The zoneadmd daemon is the primary process for managing the zone's virtual platform. The daemon does not constitute a programming interface. For more information, see the zoneadmd(8) man page.
getzoneid(3C)

Used to map between zone ID and name

zcons(4D)

Zone console device driver

zlogin(1)

Used to log in to a non-global zone

zoneadm(8)

Used to administer zones on a system

zonecfg(8)

Used to set up a zone configuration

zonename(1)

Prints the name of the current zone

zones(7)

Provides description of zones facility

zonestat(1)

Used to observe zone resource usage.

Commands for Resource Capping

The following commands support the resource capping daemon. The commands are listed by man page section.

rcapadm(8)

Configures the resource capping daemon, displays the current status of the resource capping daemon if it has been configured, and enables or disables resource capping

rcapd(8)

The resource capping daemon.

rcapstat(1)

Monitors the resource utilization of capped projects.

Commands With Modifications for Zones

The following commands are modified for use on an Oracle Solaris system with zones installed. These commands have options that are specific to zones or present information differently. The commands are listed by man page section.

audit_syslog(7)

Added in zonename field that is used if the zonename audit policy is set.

auditconfig(8)

Added zonename token.

auditreduce(8)

Added –z zone-name option. Added ability to get an audit log of a zone.

cmn_err(9F)

Added zone parameter.

core(5)

Added n_type: NT_ZONENAME. This entry contains a string that describes the name of the zone in which the process was running.

coreadm(8)

Added variable %z to identify the zone in which process executed.

ddi_cred(9F)

Added crgetzoneid(), which returns the zone ID from the user credential pointed to by cr.

df(8)

Added –Z option to display mounts in all visible zones. This option has no effect in a non-global zone.

dladm(8)

Added –Z option to show subcommands, which adds a zone column to the default command output. The zone column indicates the zone to which the resource is currently assigned.

dlstat(8)

Added –Z option to show subcommands, which adds a zone column to the default command output. The zone column indicates the zone to which the resource is currently assigned.

fsstat(8)

Added –z option to report on file system activity per zone. Multiple –z options can be used to monitor activity in selected zones. The option has no effect if only used to monitor mountpoints and not fstypes.

Added –A option to report aggregate file system activity for the specified fstypes across all zones. This is the default behavior if neither –z or the –Z option is used. The –A option has no effect if only used to monitor mountpoints and not fstypes.

When used with either the –z or the –Z option, the –A option displays the aggregate for the specified fstypes across all zones on a separate line.

Added –Z option to report file system activity in all zones on the system. This option has no effect if used with –z option. The option has no effect if only used to monitor mountpoints and not fstypes.

getloadavg(3C)

If the caller is in a non-global zone and the pools facility is enabled, the behavior is equivalent to calling with a psetid of PS_MYID.

getpriority(3C)

Added zone IDs to target processes that can be specified. Added zone ID to EINVAL error description.

if_tcp(4P)

Added zone ioctl() calls.

iostat(8)

If executed in a non-global zone in which the pools facility is enabled, information is provided only for those processors that are in the processor set of the pool to which the zone is bound.

ipcrm(1)

Added –z zone option. This option is only useful when the command is executed in the global zone.

ipcs(1)

Added –z zone option. This option is only useful when the command is executed in the global zone.

kstat(8)

If executed in the global zone, kstats are displayed for all zones. If executed in a non-global zone, only kstats with a matching zoneid are displayed.

mpstat(8)

If executed in a non-global zone in which the pools facility is enabled, command only displays lines for the processors that are in the processor set of the pool to which the zone is bound.

ndd(8)

When used in the global zone, displays information for all zones. ndd on the TCP/IP modules in an exclusive-IP zone only displays information for that zone.

netstat(8)

Displays information for the current zone only.

nfsstat(8)

Displays statistics for the current zone only.

p_online(2)

If the caller is in a non-global zone and the pools facility is enabled, but the processor is not in the processor set of the pool to which the zone is bound, an error is returned.

pgrep(1)

Added –z zoneidlist option. This option is only useful when the command is executed in the global zone.

pkginfo(5)

Now provides optional parameters and an environment variable in support of zones.

poolbind(8)

Added zoneid list. Also see Resource Pools Used in Zones in Administering Resource Management in Oracle Solaris 11.4 for information about using zones with resource pools.

ppriv(1)

Added the expression zone for use with the –l option to list all privileges available in the current zone. Also use the option –v after zone to obtain verbose output.

priocntl(1)

Zone ID can be used in idlist and –i idtype to specify processes. You can use the priocntl -i zoneid command to move running processes into a different scheduling class in a non-global zone.

priocntl(2)

Added P_ZONEID id argument.

priv_str_to_set(3C)

Added "zone" string for the set of all privileges available within the caller's zone.

privileges(7)

Added PRIV_PROC_ZONE, which allows a process to trace or send signals to processes in other zones. See zones (7) .

proc(1)

Added –z zone option to ptree only. This option is only useful when the command is executed in the global zone.

proc(5)

Added capability to obtain information about processes running in zones.

processor_info(2)

If the caller is in a non-global zone and the pools facility is enabled, but the processor is not in the processor set of the pool to which the zone is bound, an error is returned.

prstat(8)

Added –z zoneidlist option. Also added –Z option.

If executed in a non-global zone in which the pools facility is enabled, the percentage of recent CPU time used by the process is displayed only for the processors in the processor set of the pool to which the zone is bound.

Output of the –a, –t, –T, –J, and –Z options displays a SWAP instead of a SIZE column. The swap reported is the total swap consumed by the zone's processes and tmpfs mounts. This value assists in monitoring the swap reserved by each zone, which can be used to choose a reasonable zone.max-swap setting.

ps(1)

Added zonename and zoneid to list of recognized format names used with the –o option.

Added –z zonelist to list only processes in the specified zones. Zones can be specified either by zone name or by zone ID. This option is only useful when the command is executed in the global zone.

Added –Z to print the name of the zone associated with the process. The name is printed under an additional column header, ZONE.

pset_bind(2)

Added P_ZONEID as idtype. Added zone to possible choices for P_MYID specification. Added P_ZONEID to valid idtype list in EINVAL error description.

pset_getloadavg(3C)

If the caller is in a non-global zone and the pools facility is enabled, but the processor is not in the processor set of the pool to which the zone is bound, an error is returned.

pset_info(2)

If the caller is in a non-global zone and the pools facility is enabled, but the processor is not in the processor set of the pool to which the zone is bound, an error is returned.

pset_list(2)

If the caller is in a non-global zone and the pools facility is enabled, but the processor is not in the processor set of the pool to which the zone is bound, an error is returned.

pset_setattr(2)

If the caller is in a non-global zone and the pools facility is enabled, but the processor is not in the processor set of the pool to which the zone is bound, an error is returned.

psrinfo(8)

If executed in a non-global zone, only information about the processors visible to the zone is displayed.

renice(1)

Added zoneid to list of valid arguments used with the –i option.

sar(1)

If executed in a non-global zone in which the pools facility is enabled, the –b, –c –g, –m, –p, –u, –w, and –y options display values only for processors that are in the processor set of the pool to which the zone is bound.

sysconf(3C)

If the caller is in a non-global zone and the pools facility enabled, sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN) return the number of total and online processors in the processor set of the pool to which the zone is bound.

sysinfo(2)

Changed PRIV_SYS_CONFIG to PRIV_SYS_ADMIN.

traceroute(8)

Usage change. When specified from within a non-global zone, the –F option has no effect because the "don't fragment" bit is always set.

ucred_get(3C)

Added ucred_getzoneid() function, which returns the zone ID of the process or -1 if the zone ID is not available.

umount(2)

ENOENT is returned if file pointed to by file is not an absolute path.

vmstat(8)

When executed in a non-global zone in which the pools facility is enabled, statistics are reported only for the processors in the processor set of the pool to which the zone is bound. Applies to output from the –p option and the page, faults, and cpu report fields.