HP Systems Insight Manager 6.0 Command Line Interface Guide

During an add operation, HP SIM adds only the queries whose names do not reference existing queries
in the database. If a duplicate query is detected, it is skipped, and all non-duplicate queries are added.
Skipping duplicate queries does not affect the return value.
Optionally, you can specify the force flag, which instructs the system to add a query's criteria even if
there is not a database entry corresponding to the criteria value. This affects only criteria values that
are selected from a list of values stored in the database, such as system names.
mxquery -l val CriteriaByEventType
This command enables you to view a list that includes sub categories for the event types when applicable.
For the mxquery -a -f filename CLI (create a query), you can use mxquery -l val
CriteriaByEventType which lists all the possible event types. Each element represents a single
event type containing a category, a sub category, and an event type. This is the event type value string
which is used when creating an event query based on event type criteria.
Note: when creating a query, the event type value string must match what is listed in the output from
the previous mxquery -l command. The value string is case sensitive. All categories, subcategories,
and event type strings must be unique within HP SIM.
mxquery -m -f filename
This command enables you to modify the definition of one or more queries. Query information is
provided in a query definition file. When modifying a query, you must be the query owner or an
administrative rights user.
mxquery -r queryname
mxquery -r -f filename
These commands enable you to remove queries. Only an administrative rights user or the query owner
can remove a query. If you specify a query name that does not exist, HP SIM notifies you that it cannot
remove the query and attempts to remove the next designated query. Skipping undefined queries does
not affect the return value. You can specify queries as a list of query names, or a query definition file.
mxquery -e queryname [-x xml]
This command enables you to execute the specified query and display the results. You must specify the
name of an existing query, and you must be authorized to execute the query against the managed
systems that the query targets. See mxauth(1M) for more information about authorizations.
mxquery [-l n|t] [queryname...]
This command enables you to list queries or view the definitions of specified queries. With no qualifiers
or -n, mxquery lists the names of all registered queries. With the t option, mxquery gives a tabular
listing showing some attributes of all registered queries. You can limit the query information by specifying
one or more query names.
mxquery -lf [-b encoding] [-x query [queryname...] ]
This command writes a complete definition (see mxquery(4)) for each query to stdout .
Optionally, you can specify the character encoding of the XML file. The value for the character encoding
must match a valid character encoding. If no encoding is specified, the system attempts to write the file
in the encoding currently defined on the system. See http://www.iana.org/assignments/character-sets
for the list of valid character sets. You can specify individual queries by specifying a query name;
otherwise, all queries in the system are listed.
mxquery -l cat
This command lists the names of all of the categories that you can add queries to. To add a query, the
query definition must contain a category from this list.
mxquery -l crit
This command lists the names of criteria that can be specified for a query. Criteria specify the search
values that HP SIM uses when executing a query. Some criteria have a list of defined values that must
be used when specifying that given criteria. This command lists the criteria name and the query type
in which the criteria can be specified.
mxquery 75