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

To display the members of each collection, use the –lf collname option instead of the –ln option,
where collname is the name of the collection. For example:
# mxcollection –lf Shared
displays the following output:
<?xml version="1.0" encoding="UTF-8"?>
<collection-list xmlns="http://www.hp.com/hpsim5.1.0.0">
<collection name="Shared" type="system" locked="false" application="">
<member name="Systems by Type" display-status="-1" type="collection"
default-view="treeview" hidden="false" />
<member name="Systems by Status" display-status="-1" type="collection"
default-view="treeview" hidden="false" />
<member name="Systems by Operating System" display-status="-1"
type="collection" default-view="treeview" hidden="false" />
<member name="Clusters by Type" display-status="-1" type="collection"
default-view="treeview" hidden="false" />
<member name="Clusters by Status" display-status="-1" type="collection"
default-view="treeview" hidden="false" />
<member name="System Functions" display-status="-1" type="collection"
default-view="treeview" hidden="false" />
<member name="Test Query" display-status="0" type="query" default-
view="tableview" hidden="false" />
</collection>
<collection name="Shared" type="event">
<member name="Events by Severity" display-status="-1" type="collection"
default-view="none" hidden="false" />
<member name="Login Events" display-status="-1" type="collection"
default-view="none" hidden="false" />
<member name="Service Events" display-status="-1" type="collection"
default-view="none" hidden="false" />
</collection>
</collection-list>
As shown in the hierarchy above, both the Systems and Events collections contain a sub-collection
called Shared. The items shown for the Shared collection are the same as what is shown above in the
hierarchy list, with one notable exception. The example query collection is shown as part of the -lf
output for a collection, but not in the –ln output. This is because –ln only displays the names of the
collections, and a query is not a collection. The –lf option displays all of the members of a
collection, which can include both collections and query collections.
The mxcollection(4) man page details the XML schema for creating collections. When creating
collections, you define the name of the collection, whether it is a system or event collection, where the
collection is placed in the hierarchy, and all of the members. The collection members can be
collections, systems or events (depending on the collection type), or nodes in the system. The following
is an example of a system collection that has another collection and one node as its members:
<?xml version="1.0" encoding="UTF-8" ?>
<collection-list xmlns="http://www.hp.com/hpsim5.1.0.0">
<collection name="Example" type="system" parent="Systems by Type">
<member name="All Servers" type="query" display-status="0" default-
view="tableview" hidden="false" />
12