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

# mxtask –cf autodisco.xml
If you enabled periodic execution in the <scheduleinfo> field, the task automatically runs at the time
and frequency you entered. If you did not enable periodic execution, you must manually execute the
task by entering the following command:
# mxtask –e TaskName
Where TaskName is the name of the task entered in the <task name> field of the XML file.
The mxtask command has a built-in help option that describes the command, parameters, and usage
examples. To access help for this command, enter, mxtask –h.
Running reports
The mxreport command enables an HP SIM user with sufficient privilege to run reports, and to add,
delete, and list reports and report categories in HP SIM. A complete description of the mxreport
command is found in the mxreport man page. A complete description of the XML format used by
mxreport is found in the mxreport(4) man page.
To create a report in HP SIM, you must first create an XML file describing the report, including report
name, collection to run the report against, and reporting fields. You can define multiple reports in the
XML file. The following is an example of the XML file to create this report:
<?xml version="1.0" encoding="UTF-8"?>
<reportList>
<report reportName="Inventory 7 - Servers" displayFlag="0"
creatorId="1" editFlag="1">
<group groupLocale="en_US" parent="System reports" child=""/>
<displayName displayLocale="en_US">Inventory 7 –
Servers</displayName>
<query queryType="0" queryLocale="en_US">All Servers</query>
<item viewColName="DeviceName" viewName="R_Inventory"/>
<item viewColName="ProductType" viewName="R_Inventory"/>
<item viewColName="ProductName" viewName="R_Inventory"/>
<item viewColName="SerialNumber" viewName="R_Inventory"/>
<item viewColName="AssetTag" viewName="R_Inventory"/>
<item viewColName="MemorySize" viewName="R_Inventory"/>
<item viewColName="OSName" viewName="R_Inventory"/>
<item viewColName="OSVendor" viewName="R_Inventory"/>
<item viewColName="Location" viewName="R_Inventory"/>
<item viewColName="DeviceOwner" viewName="R_Inventory"/>
<viewOption>0</viewOption>
<privilege>0</privilege>
</report>
</reportList>
In this example, the report is called Inventory 7 – Servers, and runs against the All Servers collection.
If you save this file using the name inv7server.xml, the command to add this report to HP SIM is:
# mxreport –a –f <path>inv7server.xml
Where <path> is the fully qualified path to the inv7server.xml file.
6