HP Systems Insight Manager 7.0 Command Line Interface Guide
In earlier releases of Systems Insight Manager, you could not create or alter categories using the
mxquery command. Beginning with Systems Insight Manager 5.0, collections are an extension
of categories, you can manage with the mxcollection command. The mxcollection command
enables you to select members individually by name. You must continue to use the mxquery
command to the search attributes when creating and managing queries.
The mxquery command provides many options to help create and manage query collections. The
following XML is an example of a query collection, called Test Query.
<?xml version="1.0" encoding="ISO-8859-1"?>
<query-list>
<query id="64" name="Test Query" type="DeviceViews"
category-name="SysSharedLists" owner="root" locked="false"
application="">
<criteria name="CriteriaByOSNameComparison" sense="INCLUDE">
<value operator="contains">HP</value>
</criteria>
<criteria name="ProductByName" sense="INCLUDE">
<value>ia64</value>
</criteria>
<criteria name="CriteriaByNameComparison" sense="INCLUDE">
<value operator="contains">ABC</value>
</criteria>
</query>
</query-list>
This query finds all systems that have HP in the operating system name, ia64 in the product name,
and ABC in the system name. To get this output, use the following command:
# mxquery –lf â Test Queryâ
The -lf option displays the output in XML format for the specified query collection. If you do not
specify a query collection name, the XML for all collections and query collections are displayed.
If you specify a collection name, an error appears stating no such query exists. The mxquery
command uses the following options to display query information:
• The -l cat option lists all collections where you can add a query collection
• The -l crit option lists the criteria that can be used to construct a query collection
• The -l mode â critâ option lists the operators that can be used with criteria âcritâ
• The -l val â critâ option lists the defined values associated with criteria âcritâ
If the criteria type is Text, then there are no associated values for the criteria. From the example
above, the output for the mxquery –l mode CriteriaByNameComparison command is:
• does not start with
• does not contain
• contains
• ends with
• does not end with
• is equal to
• is not equal to
• starts with
Because CriteriaByNameComparison is a text criteria, and the operators apply to text fields
in the database only. Other criteria are selection criteria, and their operators are is and is not,
since selection criteria are the specific values being compared, not free-form text.
In the example, CriteriaByNameComparison is a text criteria and does not have any values.
However, the criteria ProductByName is a selection criteria. To find the values of this criteria,
enter:
Managing collections 137