PURGEWG [ Using the HP 3000 Workload Manager ] MPE/iX 5.0 Documentation
Using the HP 3000 Workload Manager
PURGEWG
Purges the specified user-defined workgroup(s). (Native Mode)
SYNTAX
PURGEWG [WORKGROUP=] {workgrp} {(workgrp [,workgrp]...)}
[{;CONFIRM }]
[[;ONERROR=] {CONTINUE}] [{;NOCONFIRM }] [{;NOSHOW}] [{;SHOWERRORS }]
[ {QUIT }] [{;CONFIRMALL}] [{;SHOW }] [{;NOSHOWERRORS}]
[{;PURGESCAN }]
[{;NOPURGESCAN}]
PARAMETERS
workgrp The user-defined workgroup(s) that you want to purge.
This is a required parameter. You may use wildcards,
but if you specify @ (to indicate all workgroups), only
the user-defined workgroups are purged since you cannot
purge the five system-defined workgroups.
CONTINUE Allows PURGEWG to continue until the end of the list is
reached, regardless of errors. CONTINUE is the default
option.
QUIT Quits the execution of PURGEWG when it encounters an
error and sets the CIERROR variable to the last
execution error.
CONFIRM Verifies the workgrp parameter by requiring you to
validate the purge during command execution. Valid
responses are "YES" or "NO". If you respond "YES", the
PURGEWG command is executed. Pressing Break at the
prompt is equivalent to responding "NO". CONFIRM is the
default for sessions, unless the workgrp designates a
single workgroup.
NOCONFIRM Continues the purge without verification from the user.
NOCONFIRM is the default for jobs or if the workgrp
designates a single workgroup.
CONFIRMALL When you are purging multiple workgroups from a session,
use the CONFIRMALL option to verify each workgroup
before the purge is executed. You may respond with any
of the following:
"Y" or "YES" To purge the workgroup
"N", "NO", or To retain the workgroup
Return
"Q", "QUIT", or To stop the PURGEWG command
Break
The CONFIRMALL option is ignored in jobs and when you
are purging a single workgroup.
NOSHOW Suppresses the display of each successfully purged
workgroup. NOSHOW is the default.
SHOW Displays the name of each successfully purged workgroup.
SHOWERRORS Displays each lower-level error which prevents a
workgroup from being deleted. The name of the workgroup
is shown, followed by the error message. By default
lower-level errors are not displayed. You may also
enter this option in the singular form, i.e. SHOWERROR.
NOSHOWERRORS Suppresses the display of low-level errors.
NOSHOWERRORS is the default. You may also enter this
option in the singular form, i.e. NOSHOWERROR.
PURGESCAN Instructs the Workload Manager to rescan processes
belonging to purge pending workgroups after executing
the PURGEWG command. This is the default.
NOPURGESCAN Instructs the Workload Manager to defer the rescan of
processes belonging to purge pending workgroups until
explicitly requested to do so. To explicitly request a
rescan, issue the command PURGEWG ;PURGESCAN.
OPERATION
Use the PURGEWG command to purge existing user-defined workgroups. The
command requires a workgrp which can be one workgroup or a list of
workgroups. In addition, you may use wildcard characters in workgrp to
specify multiple workgroups. If you specify "@", only the user-defined
workgroups are purged since the five system-defined workgroups cannot be
purged.
The PURGEWG command handles user prompting through three options,
CONFIRM, CONFIRMALL, and NOCONFIRM. The CONFIRM option requests
verification of the PURGEWG command as a whole. That is, CONFIRM only
asks for verification of the workgrp parameter. The CONFIRMALL option
provides user prompting for each workgroup. The NOCONFIRM option
overrides all verification. Since the job environment does not support
user prompting, the CONFIRM and CONFIRMALL options are ignored.
By default the PURGEWG command does not display the name of each purged
workgroup. To override the default, use the SHOW option.
The ONERROR keyword lets you specify the PURGEWG command's response if it
encounters an error while trying to purge an individual workgroup in a
pattern match situation. (This can occur, for example, if you try to
purge one of the default workgroups which is not allowed). Use the
CONTINUE option to continue the execution of the PURGEWG command until
the end of the list is reached. Use QUIT, to quit command execution at
the point where PURGEWG encountered the error.
When purging a list of workgroups, one of three results is possible:
* The purge succeeded on all workgroups, and as a result, the
CIERROR variable is unchanged.
* The purge failed on some of the workgroups. As a result, the
CIERROR variable is set to the value CIWARN 490.
* The purge failed on all of the workgroups. As a result, the
CIERROR variable is set to the value CIERR 491.
When you specify ONERROR=QUIT, CIERROR is set to the last error which
stopped the execution. For example, if there are no user-defined
workgroups that end in default on your system, and you enter the command
purgewg @default in an attempt to purge the system-defined workgroups,
the CIERROR is set to 12205. The text of this error message is Cannot
delete a system-defined workgroup.
In addition, the following variables are set only when you specify a list
of workgroups:
* HPNUMSELECTED: Contains the number of workgroups selected, which
matches the number in the workgrp unless you responded "NO" when
prompted to verify the purge of one or more workgroups.
* HPNUMSUCCEEDED: Contains the number of workgroups successfully
purged.
* HPNUMFAILED: Contains the number of workgroups that did not get
purged.
When PURGEWG is discontinued before it reaches the end of the list, the
difference between HPNUMSELECTED and HPNUMSUCCEEDED + HPNUMFAILED
indicates the number of workgroups that were selected but not purged.
When a workgroup is purged, the Workload Manager needs to rescan the
affected member processes. The cost of such a rescan depends upon the
number of processes and workgroups involved. There are situations in
which you may want to defer the rescan. In terms of the workgroup, the
system cannot complete the purge until all member processes have found a
new workgroup. A workgroup in such a state is considered to have a purge
pending. The scan of processes assigned to purge-pending workgroups is a
subset of a system-wide scan. That is, a system-wide scan checks every
process on the system. A purge-pending scan only checks processes that
are assigned to purge-pending workgroups. While a purge-pending scan is
performed by default, the NOPURGESCAN option allows you to defer the
rescan.
The CI supports a second syntax, which you use to explicitly initiate a
purge-pending scan without requiring the purging of a workgroup:
PURGEWG [;PURGESCAN]
WARNING Misuse of the ability to defer a scan of processes assigned to
purge-pending workgroups could significantly impact system
performance because processes remain members of purge-pending
workgroups.
Logically, a workgroup in the purge-pending state no longer exists. That
is, the workgroup cannot accept new members. However, the workgroup
physically remains until either its last member has died or has been
moved to another workgroup, or until a scan is performed. Since you may
want to create a new workgroup that uses the name of a purge-pending
workgroup, the system automatically renames such workgroups when they
enter the purge-pending state. The new name becomes the previous name,
prepended with a "~". The SHOWWG command displays the workgroup with its
new name so that users know that the workgroup is in the purge-pending
state.
The purging of a user-defined workgroup is deferred while a system-wide
or purge-pending scan is in progress.
The PURGEWG command may be issued from a session, job, program or in
BREAK. Pressing Break aborts execution of this command. PURGEWG requires
System Supervisor (OP) or System Manager (SM) capability.
EXAMPLE
To purge all user-defined workgroups, you can enter the commands as shown
in either of the two samples below:
______________________________________________________________________________
| |
| |
| :PURGEWG @; noconfirm |
| |
| 2 workgroups matched |
| 2 workgroups selected. 2 workgroups succeeded. 0 workgroups failed. |
| : |
| |
| :PURGEWG @; noconfirm; show |
| |
| 2 workgroups matched |
| User_WG1 |
| User_WG2 |
| 2 workgroups selected. 2 workgroups succeeded. 0 workgroups failed. |
| : |
| |
| |
______________________________________________________________________________
To purge just the User_WG1 workgroup, enter:
:PURGEWG User_WG1
The Workload Manager does not display any confirmation messages.
To purge the multiple workgroups by specifying a list, enter each
workgroup name on the command line, separated by commas, and enclosed in
parenthesis. For example:
______________________________________________________________________________
| |
| |
| :PURGEWG (User_WG1, User_WG2) |
| 2 workgroups matched |
| CONTINUE PURGE ? (YES/NO) yes |
| 2 workgroups selected. 2 workgroups succeeded. 0 workgroups failed. |
| : |
| |
______________________________________________________________________________
To purge multiple workgroups by specifying a wildcard, enter the partial
workgroup name and the appropriate wildcard character. For example:
______________________________________________________________________________
| |
| |
| :PURGEWG User_WG# |
| 2 workgroups matched |
| CONTINUE PURGE ? (YES/NO) yes |
| 2 workgroups selected. 2 workgroups succeeded. 0 workgroups failed. |
| : |
| |
______________________________________________________________________________
To purge the User_WG1 and User_WG2 workgroups and request confirmation,
enter:
______________________________________________________________________________
| |
| |
| :PURGEWG User_WG#; confirmall |
| 2 workgroups matched |
| User_WG1 ? (N/Y) Y |
| User_WG2 ? (N/Y) Y |
| 2 workgroups selected. 2 workgroups succeeded. 0 workgroups failed. |
| : |
| |
______________________________________________________________________________
Related Information
Commands NEWWG, ALTWG, SHOWWG, TUNE, SHOWQ, ALTPROC, SHOWPROC
Manuals MPE/iX Intrinsics Reference Manual (32650-90028)
MPE/iX 5.0 Documentation