The pe commands provide tools for running, stopping, and monitoring plans.
Table 11–1 Summary of the pe Commands
Command |
Description |
---|---|
pe.h.prep |
Prepares a set of hosts. |
pe.p.en |
Displays the output of an <execNative> or an <execJava> step. |
pe.p.la |
Lists running and completed plans. |
pe.p.lo |
Lists information about a running or completed plan. |
pe.p.del |
Deletes the history of a completed plan run. |
pe.p.lp |
Lists the subplans and targets associated with a plan. |
pe.p.run |
Runs a plan. |
pe.p.stop |
Stops a plan that is currently running. |
pe.pi.lo |
Lists the parameters used to run a plan. |
This command prepares a set of hosts.
Table 11–2 Argument and Result of the pe.h.prep Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
tar |
Required |
HostIDSet |
A comma-separated list of host IDs to prepare |
result |
TaskID |
The ID of the preparation plan run |
This command displays the output of an <execNative> or an <execJava> step.
Table 11–3 Arguments and Result for the pe.p.en Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
ID |
Required or Optional |
StepDescriptionContainer |
Which step in the plan to display. This can be gathered from the output of pe.p.lo command or specified by label. |
IDs |
Required or Optional |
StepDescriptionContainerArray |
Which steps in the plan to display. These can be gathered from the output of pe.p.lo command or specified by label. IDs must be specified if ID is not. If both ID and IDs is specified, IDs is ignored. |
output |
Optional |
Either “so” or “se” |
Here for backward compatibility. The output will contain both the standard error and standard out. When available the exit status is also included. |
result |
ExecNativeOutputArray |
Output of the step or steps indicated. |
A StepDescriptionContainer can be either a stepID or a Label. You should use a single StepDescriptionContainer for the -ID argument. The -IDs argument should be a comma-separated list of StepDescriptionContainers. The examples use the following information to create valid commands.
1001
2011 with a label value of label1
2012 with a label value of label2
3001 with a hostname of host1
./cr_cli -cmd pe.p.en -ID ID:2011 ./cr_cli -cmd pe.p.en -ID 2011 |
./cr_cli -cmd pe.p.en -ID L:label1:1001:NM:host1 ./cr_cli -cmd pe.p.en -ID L:label1:ID:1001:ID:3001 |
In this example one element is a step id and the other is a label.
./cr_cli -cmd pe.p.en -IDs L:label1:ID:1001:ID:3001,2012 |
This command lists running and completed plans.
Table 11–4 Arguments and Result for the pe.p.la Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
max |
Optional |
Integer |
The maximum number of plans to list The default is 5. This argument is ignored if there are more running plans than the given number (in this case , all running plans are listed). If the number of running plans is less than the maximum specified, the sum of all running plans and completed plans up to the maximum specified is returned. |
plan |
Optional |
String |
Restrict results to plans with this name |
result |
RunningPlanBeanArray |
All the running plans and some completed ones |
This command reports on the status of a plan that is running or that has finished running. It displays the StepID of each step.
Table 11–5 Arguments for the pe.p.lo Command
Argument |
Syntax |
Description |
|
---|---|---|---|
ID |
Required |
TaskID |
The ID of the plan run to view |
old |
Optional |
Boolean |
Whether to show old messages; default is false |
new |
Optional |
Boolean |
Whether to poll for new messages; default is true |
This command deletes the history of a completed plan run.
Table 11–6 Arguments for the pe.p.del Command
Argument |
Syntax |
Description |
|
---|---|---|---|
ID |
Required |
TaskID |
The ID of the plan run to delete |
This command lists the subplans and targets associated with a plan. The named plan is listed first.
Table 11–7 Argument and Result for the pe.p.lp Command
Argument/Result |
Syntax |
Description |
||
---|---|---|---|---|
ID |
Required |
ExecutionPlanID |
The ID of the execution plan |
|
result |
SubplanPrompt- Array |
Array of subplans and targets |
This command runs a plan. If there are plan prompt variables, it interactively queries the user for responses.
When you run a composite plan through the CLI, you must specify a set of targets, component versions, and variable sets for each subplan. See Appendix A, Input Types for further description of the syntax.
Table 11–8 Arguments and Result for the pe.p.run Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
PID |
Required |
ExecutionPlanID |
The ID of the execution plan to run |
tar |
Required |
HostIDArrayArray |
Individual hosts or host sets on which to run the plan and each of its subplans, ordered according to subplan prompts |
comp |
[O/R] |
StringArrayArray |
Component versions to install as a part of the plan and subplans. Versions are ordered according to component selectors within subplan prompts. Each referenced component must be represented in this list. Use the component version number, or "+" for default, "#" for recommended, and "-" for latest. Do not specify when there are no component versions. |
vs |
[O/R] |
StringArrayArray |
Variable settings to use with each selected component version. Use variable settings name, or "+" for default. Do not specify when there are no variable settings. |
po |
Optional |
Boolean |
True if only preflight should be run |
pdp |
Optional |
Boolean |
True if detailed preflight should be run; default false. |
hrl |
Optional |
Integer |
Limits the number of hosts running at the same time; default set by server config file. |
pto |
Required |
TimeInterval |
The maximum plan execution time |
nto |
Required |
TimeInterval |
The maximum native call execution time |
f |
Optional |
ReaderWrapper |
Plan variables can be passed with a file or standard input; default is standard input |
result |
TaskID |
The ID of the plan run |
This example demonstrates a simple plan being run on one host.
/test/test1
masterserver
nors
30 minutes
10 minutes
default
For a single component and variable set, you do not need to surround the value with quotation marks.
./cr_cli -cmd pe.p.run -PID NM:/test/test1 -tar H:NM:masterserver \ -vs nors -pto 30 -nto 10 -comp + -u admin -p admin |
This example demonstrates a composite plan with two subplans.
subplan1 install compA install compB subplan2 install compC install compD |
Each subplan is run on a different host and uses two different variable sets for each referenced component.
/test/test2
masterserver and host2
nors and tmc
varset1 and varset2
30 minutes
10 minutes
default
./cr_cli -cmd pe.p.run -PID NM:/test/test2 \ -tar "H:NM:masterserver;H:NM:host2" -vs "nors,tmc;varset1,varset2" \ -pto 30 -nto 10 -comp "+,+;+,+" -u admin -p admin |
This command stops a plan that is running.
Table 11–9 Argument and Result for the pe.p.stop Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
ID |
Required |
TaskID |
The ID of the plan to stop running. |
result |
Boolean |
True if the plan was stopped successfully. |
This command lists the parameters used to run a plan.
Table 11–10 Argument and Result of the pe.pi.lo Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
ID |
Required |
TaskID |
The ID of the plan run. |
result |
TaskInfo |
The plan run parameters |