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

Managing authorizations. If a user is only managing a few systems, create the authorizations on a
system-by-system basis.
The mxngroup command enables you to create, remove, modify, and list system groups in HP SIM.
For a complete description of mxngroup, see the mxngroup man page. For a complete description of
the XML syntax for managing system groups from an XML file, see the mxngroup(4) man page.
To create a system group, enter:
# mxngroup –a –g grpname [-d description] [-n [member1 member2 …]]
Where grpname is the name of the system group.
The -d description (optional) parameter enables you to provide a description of the group, like
PA Systems, or All Windows Servers.
The -n (optional) parameter enables you to provide a list of systems that will be members of the
new group. If you do not provide the -n parameter, or if you do not enter any members for the -n
parameter, the system group created will be empty.
When creating a system group that contains many systems, HP recommends creating an XML file
containing the list of systems to add to the group. To create a system group from an XML file, enter:
# mxngroup –a –f grpfile.xml
The following example demonstrates the syntax to create a system group called group1, providing a
description, and adding two systems to the group:
<?xml version="1.0" encoding="UTF-8"?>
<node-group-list>
<node-group name="group1">
<description>This is group1.</description>
<member-node value="system1.corp.com" />
<member-node value="system2.corp.com" />
</node-group>
</node-group-list>
To modify existing system groups, the syntax is identical to that for adding system groups however,
you replace the -a option with the -m: option, for example:
# mxngroup –m –g grpname [-d description] [-n [member1 member2 …]] [-u
[t|f]]
If you do not provide both the optional -d and -n parameters, then the group is not modified.
Using the -d parameter replaces the existing group description with the one you provide.
Using the -n option is only recommended for groups that have very few entries because you must
list the systems in the same order as they were added, with new system names in the place of the
systems they are replacing. If you are adding new systems, they must be placed at the end of the
list.
Using the –u [t|f] option sets the automatic update feature to enabled or disabled.
The following are examples of modifying a group called grp, with three members, n1, n2, and n3,
listed in the order the groups were created:
# mxngroup –m –g grp –n n4 n2 n3 ; replace n1 with n4.
# mxngroup –m –g grp –n n5 ; n5 is the only member of the group
# mxngroup –m –g grp –n n5 n4 n3 n2 ; add n4, n3, n2 to the group
Use caution when modifying groups from the command line, as the second example illustrates, the -m
option is replacing systems in the group.
21