Creates an application workload partition or specification file.
wparexec [ -a ] [ -c] [ -1 ][ -F ] [ -h hostname ] [-H architecture] [-i] [-I attribute=value ...] ... [ -M attribute=value... ] ... [ -N attribute=value... ] ... [ -R attribute=value... ] [ -u userscript ] [ -v] [ -x] { -n wparname [ -e existingwpar | -f infile ] [ -o outfile [ -w ] ] | -f infile [ -n wparname ] [ -o outfile [ -w ] ] | -w -o outfile [ -n wparname] [ -e existingwpar | -f infile ] } [ [--] [ var=value ...] /path/to/command [ arg ... ] ]
Regardless of locale, only ASCII characters are allowed as arguments to the wparexec command.
= : / ! ; ` ' " < > ~ & ( ) * + [ ] , . ^ 0 { } | \
The wparexec command builds and starts an application workload partition, or creates a specification file to simplify the creation of future application workload partitions.
An application workload partition is an isolated execution environment that might have its own network configuration and resource control profile. Although the partition shares the global file system space, the processes that are running therein are only visible to other processes in the same partition. This isolated environment allows process monitoring, gathering of resource, accounting, and auditing data for a predetermined cluster of applications.
The wparexec command starts and monitors a single application within this isolated environment. The wparexec command returns synchronously with the return code of this tracked process only when all of the processes in the workload partition terminate. For example, if the tracked process creates a daemon and exits with the 0 return code, the wparexec command will block until the daemon and all of its children terminate, and then exit with the 0 return code, regardless of the return code of the daemon or its children.
Item | Description |
---|---|
-1 | Creates the configuration only. Causes the wparexec command to stop after creating the configuration of the application WPAR. The startwpar command must then be used to start the WPAR. Only advanced users can use the -1 option. |
-a | Automatically resolves conflicting static settings if required. Resolvable settings are name, hostname, and network configuration. |
-c | Enables this workload partition to be checkpointed. This option is only valid when additional checkpoint-restart software is installed and configured. When this option is used, any file systems associated with this workload partition (for example, with the -M option) must be remote (for example, vfs=nfs). |
-e existingwpar | Uses an existing application workload partition as the source for specification data. Do not use the -e flag with the -f flag. Any values specified by other wparexec flags override those values from the existing workload partition. |
-f infile | Indicates the specification file to read default values from. Do not use with the -e flag. Any values specified by other wparexec flags override those values from the loaded specification file. |
-F | Suppresses or overrides most error conditions. With the -F flag, the wparexec command continues with a warning. |
-h hostname | Specifies a host name for this workload partition. If not specified, the wparexec command uses the workload partition name as host name. |
-H architecture | Creates an architecture-compatible
workload partition. Valid architecture values are pwr4, ppc970,
pwr5, pwr6, and pwr7. The architecture value
must be earlier, or equal to, the system hardware version. The applications
in the workload partition are presented with the lowest common denominator
of the specified architecture. If the workload partition can create
a checkpoint, the workload partition is able to migrate between systems
with hardware levels greater than, or equal to, the workload partition
architecture. Note: The POWER5 processor-based systems and BladeCenter
JS21 Express systems are not compatible with each other. You cannot
create a JS21-compatible (ppc970) WPAR on a POWER5 processor-based
system even though the JS21 using an earlier processor than a POWER5
processor-based systems.
|
-i | Enables WPAR-specific routing for
the workload partition. By default,
outgoing network traffic from a workload partition is routed like
it is being sent from the global environment, notably in the following
ways:
|
-I attribute=value ... | Adds routing table entries to the entries that
are automatically created when WPAR-specific routing is
in effect. You can specify more than one -I flag to configure
multiple routes. Using the -I flag automatically enables WPAR-specific routing as
described under the -i flag. You can specify the following attributes with the -I flag. The rtdest attribute and the rtgateway attribute are required to be specified. |
rtdest=destination | Identifies the host or network to which you are directing the route. You can specify the value using either a symbolic name or a numeric address. You can use the keyword default to specify a default route. For more information about the route rtdest attribute, see the Destination parameter of the route command. |
rtgateway=gateway | Identifies the gateway to which packets are addressed. You can specify the value using either a symbolic name or a numeric address. |
rtnetmask=A.B.C.D | Specifies the network mask to the destination address. |
rtprefixlen=n | Specifies the length of a destination prefix, which is the number of bits in the netmask. The value must be a positive integer. |
rttype={net|host} | Forces the rtdest attribute to be interpreted as the specified type. |
rtinterface=if | Specifies the interface, for example, en0, to associate with the route so that packets are sent using the interface when the route is chosen. |
61Vrtfamily ={inet|inet6} |
Specifies the address family. For information about the parameters of the rtfamily flag, see the parameter section of the route command. |
-M directory=dir [ vfs=type ] [ dev=devicepath ] [ host=remotehost ] [ mountopts=mountopts ] | Specifies file system dependencies only. Attributes
must be space-separated. By default, an application workload partition has the same level
of access to all of the global file systems and mounts as the user
who created the workload partition.
Use the -M flag with the directory attribute
that is set to the file system name to specify additional file systems.
More than one -M flag can be specified.
Note: All of the mounts and all of the directories are created and
available at global level. File systems that are based on disk, such
as the vfs=jfs and
the vfs=jfs2,
will not be created for application workload partitions.
A local file system dependency can be added by defining only the directory attribute. However, the directory specified must exist in the /etc/filesystems. If an error occurs during the process of creating the workload partition, any file systems mounted by the wparexec command are unmounted. After the creation succeeds, the file systems are not unmounted, regardless of the return status of the user application. The following are the valid values for the vfs attribute for application workload partitions:
|
-n wparname | Specifies the name for the workload partition to be created. If no name is supplied, a name is generated. |
-N attribute=value | Allows specification of the following network
configuration attributes:
The name-mapped interface is defined in the /etc/wpars/devmap file.
You can specify the mapping between the name-mapped interface and
the system interface as follows:
The attribute=value pairs must be separated by spaces. More than one -N flag can be used to configure multiple IP addresses. At minimum, the address or the address6 attribute must be specified. The wparexec command collects any other values that are not specified from the global system settings. If no -N flag is specified, the wparexec command will attempt to discover an appropriate IP address for the workload partition by running the gethostbyname subroutine on the workload partition name specified with the -n flag. If an address is found on the same subnet as any global interface, the settings of that interface will be used with the resolved IP address to create the default network entry. To define an IPv6 network
configuration, specify the -N flag with the address6 attribute,
the prefixlen attribute, and the interface attribute:
|
-o outfile | Indicates an output path and file name to write specification data to. This specification file can be used to create an application workload partition later with the -f flag. |
-R attribute=value | Allows specification of resource control attributes.
Only one -R flag can be specified. Most
resource controls are similar to those supported by the Workload Manager (WLM). See the listed
WLM pages for descriptions of these attributes. Valid attributes are
as follows:
|
(Attributes for the -R flag, continued):
|
|
-u userscript | Specifies the path to a user script to be run
by the workload partition commands
at various administration points. The parameter of the -u flag
can be a quoted string including additional arguments to be passed
to the script. In all cases, the first component of the parameter
of the -u flag must be an absolute path to an existing executable
file. The script is invoked as follows:
The action argument indicates the administrative action being performed, as follows:
Note: This code path can be executed by a dissociated process
with its standard I/O streams closed. Internal messaging should be
handled accordingly.
If the script returns a value of non-zero, a warning will be logged, but no other behavior will change. |
-v | Specifies the command to run in the verbose mode. |
-x | Allows access to cross-WPAR semaphores and shared memory segments. |
-w | Writes the specification file. When it is used with the -o flag, the -w flag causes the wparexec command to quit after writing the new specification file without actually creating the workload partition. |
[--] [var=value] /path/to/command [arg ...] | Specifies the application (tracked process) to be run within the workload partition, along with any necessary environment variable settings and arguments. The command is required, either by this command-line syntax or the general.application attribute in the specification file, unless the command is only creating a specification file (with -w flag). When it is started, the command line provided is always shell-expanded within the workload partition. When using the command line, shell metacharacters should be escaped appropriately to prevent premature expansion. The special double-minus separator (--) is used to signify that all subsequent command-line arguments comprise the tracked process. For example, use this separator to remove ambiguity between attributes to the -N flag and assignment of environment variables to the tracked process. Only one tracked process per workload partition is supported, but this application might create other processes. The workload partition is automatically stopped and removed when all of the processes therein terminate. A workload partition might be stopped and removed prematurely by the stopwpar command. |
Access Control: Only the root user can run this command.
wparexec -n tpcc -N address=192.168.0.51 /u/tpcc/benchmark -f /tmp/logfile
wparexec -f /tmp/wparexec1.spec
wparexec PATH=/usr/opt/bin:/usr/bin:/usr/sbin /home/joe/runapp
Item | Description |
---|---|
/usr/samples/wpars/sample.spec | An annotated workload partition specification file. |