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

# mxtask –lt
The output is a table that displays the task name, the name of the tool associated with the task, the
time the task was last run, and the schedule for the task. To see details about a specific task, use,
# mxtask –ld taskname
This command displays the name of the task, tool, and collection associated with the task, task owner,
task schedule information, the times of the last run and next run, the last time the task was modified,
and XML format of any parameters for the tool associated with this task.
The –lf option displays the task definition in XML format. By using file redirection, you can save the
output for use in creating additional tasks. For example,
# mxtask –lf “Daily Device Identification
displays on the terminal the XML for the “Daily Device Identification” task. However,
# mxtask –lf “Daily Device Identification” > deviceid.xml
saves the XML for the “Daily Device Identification” task in the file deviceid.xml.
There is additional information beyond the data provided in the man pages for mxtask. This
information is displayed on the console terminal, and is available by using the following command:
# mxtask –h
HP recommends that the output be piped to more or redirected to a file for easier viewing.
Managing task execution
The mxexec command enables you to execute tools that are defined in HP SIM, whether those tools
are HP SIM tools, or tools that you have created. As discussed in the previous section, mxtask is
used to create tasks to enable scheduled execution of tools, and mxexec is used for immediate
execution of a tool, as well as to manage other jobs running within HP SIM. For a full description of
the mxexec command, see the mxexec man page.
To run a tool, enter:
# mxexec –t tool[-u signinuser ] [-p elevationpassword ] [–A arg ...]
[–h | –O file | –o dir] [–n target ... | –q query]
The only required argument is –t tool, where tool is the name of the tool to execute. The –A option is
used to pass required arguments to the tool. The arguments are passed to the tool in the order they
appear in the command, so the first argument in the command is the first tool argument, and so on.
Any argument not being provided is identified by “” (quotes).
The –h, -O, and –o options control the output of the running job, and are mutually exclusive.
The –h option suppresses the job information headers and sends job output directly to stdout and
stderr as appropriate.
The –O option directs all stdout and stderr output to the file, file. If the command cannot create the
file in the specified path location, HP SIM attempts to open the file in /var/tmp. If that fails, all
tool output is sent to stdout. The –o option creates one result file for each target system in the
directory dir. The result file contains both stdout and stderr data, and has a file name that looks like
nodename.job_ID.
The –n and –q options control the target systems and system groups that the tool will run on, and
are mutually exclusive.
Use the –n option when you specify the target system names and system group names on the
command line. To specify a system group, preface the system group name with the prefix, g:.
Use the –q option to specify the name of a collection to use to generate the target system list.
18