Sun Management Center Change Manager 1.0 Administration Guide

How to View the Contents of a Host Group (Command Line)

A host group can contain managed hosts and other host groups.

To view host group properties, see How to View Host Group Properties (Command Line). To modify host group properties, see How to Modify Host Group Properties (Command Line).

  1. Determine which host group to view.

    For example, view the contents of the web-server host group.

  2. View the host group.


    $ changemgr hosts [ -u username ] [ -p file ] [ -d domain ] \
    [ -l ] [ -g ] [ -R ] [ -o format ] [ topopath ... ]
    -l

    Present detailed information about the specified managed hosts and host groups in tabular form.

    -g

    Present information about the host group itself, rather than about the host group's contents.

    -R

    Describe all the host group's descendents.

    -o format

    format is a blank-separated list or comma-separated list of property names. If you separate the property names with spaces, make sure that you surround the list of property names with quotes. The specified property values are displayed in a name-value format. If format is specified as all, then all properties are displayed. The output is suitable for programmatic parsing.

    topopath

    Specifies the path to a managed host or host group that is relative to the top of the selected administrative domain.

    For descriptions of the other options, see How to Create a Host Group (Command Line).

Example-Viewing the Contents of the Current Host Group

Chris views the contents of the host group at the root of the administrative domain.


$ changemgr hosts

Example-Viewing Host Group Contents

Chris views the contents of the web-server/ApacheServer host group.


$ changemgr hosts /web-server/ApacheServer

Example-Viewing Information About the Host Group

Chris views the information about the web-server/ApacheServer host group.


$ changemgr hosts -g /web-server/ApacheServer

Example-Viewing Host Group Contents in Table Form

Chris views the contents of the web-server/ApacheServer host group in table form.


$ changemgr hosts -l /web-server/ApacheServer

Example-Viewing Host Group Contents and Contents of the Host Group's Descendents

Chris views the contents of the web-server/ApacheServer host group and its descendents.


$ changemgr hosts -R /web-server/ApacheServer

Example-Viewing Host Group Contents and Specific Properties

Chris views the contents of the web-server/ApacheServer host group. Chris wants to see the values of the Description property and the base_config_templateName property for each of the managed hosts in /web-server/ApacheServer. Note that you can use either format shown.


$ changemgr hosts -o Description,base_config_templateName \
/web-server/ApacheServer

$ changemgr hosts -o "Description base_config_templateName" \
/web-server/ApacheServer

Example-Viewing Host Group Contents and All Properties

Chris views the contents of the web-server/ApacheServer host group and wants to see the values of all the properties for each managed host and host group.


$ changemgr hosts -o all /web-server/ApacheServer