Infrastructure management using the HP SIM command line interface (436331-002, January 2009)

The mxexec command verifies that the user executing the command is authorized to run the selected
tool on the target systems. If not, a message is logged in the HP SIM audit log
(/var/opt/mx/logs/mx.log), sent to stderr, and the job is aborted.
To cancel a specific job, enter:
# mxexec –c [–k] –j job_ID
This command cancels the job with ID job_ID. The effects of job cancellation depend on the state of
the job. A job can be in one of four states:
Pending—Nothing has started.
Copying files— Entered if there are files to copy as part of the tool execution.
Running—Entered if there is a command line to execute as part of the tool execution.
Complete—The job is complete and results are made available by the DTF.
You can only cancel a job if that job is in either a Pending or Copying files state. If the job is in a
Running or Complete state, nothing occurs. Any files copied when a Copying files state are left on the
target systems. If a file copy in progress when you execute this command, the file is restored to its
original contents before starting the copy process.
To cancel (kill) a process, use the –k option. In addition to the cancellation process, the -k option
sends the kill signal to the shell process spawned to run the command line associated with the tool.
When using this option, it is possible to leave a target system in an inconsistent state.
The mxexec command displays job information in multiple formats. To list job information, use one of
the following:
# mxexec
# mxexec [–l n | t] [–i taskname … | –j job_ID …] [–d date]
# mxexec –l d [–h] –j job_ID …
If you do not specify any options, as shown in the first example, all your incomplete jobs appear.
The -l n option lists job IDs only.
The -l t option lists job information in a tabular format, providing task name, job ID, HP SIM user,
HP SIM tool name, and the job state. The –i and –j options are mutually exclusive.
Use the –i option to display the data for any job associated with for one or more task names.
Use the –j option to display information for one or more job IDs.
The -j option is not needed in conjunction with -l n, because the -l n option only displays job
IDs.
Use the –d date option to limit displaying information to those jobs that completed after the date
parameter. You must use the following format for the date
parameter:
“Month/day/year hour:minute AM | PM”
For the CLI to interpret the string as one parameter, including the embedded spaces, you must use
the quotation marks shown in the example.
In the third example, the -l d option displays detailed information about the job ID listed with the –j
option. You can use specify one job, and the command displays the completion status of each target
system, as well as stdout, and stderr information.
Managing users and authorizations
In HP SIM, an authorization is comprised of three components: the user, the set of systems the user is
managing, and the set of tools the user can use on the set of systems. This section discusses using the
CLI to manage users, toolboxes, and authorizations.
19