lsrg

Name

lsrg - Lists already-defined resource groups and their members.

Synopsis

lsrg [-h] [ -m] [ -s "Selection_string"] [-A p | d | b] [-l | -t | -d | -D Delimiter] [-g Resource_group] [-T] [-V] [ [Attr...]

lsrg [-h] [ -m] -c [ -s "Selection_string"] [-A p | d | b] [-l | -t | -d | -D Delimiter] [-g Resource_group] [-T] [-V] Resource_class:Resource[:Node][,Resource[:Node][,...]][Resource_class:Resource[:Node][,Resource [:Node][,...]] [... ]]

Description

The lsrg command lists resource groups or the members of a resource group. If the resource group name is omitted, all of the resource groups are listed. If the resource group name is specified without the -m option the persistent attributes of the specified group will be listed. If the Attr parameter is specified, then the attributes specified for the resource group are listed. If the Attr parameter is specified here, the attributes specified for the resource group will be listed.

If the resource group name is specified with the -m option, the members of that resource group will be listed. If the attribute option (-A) is specified, the persistent or dynamic attributes of the resource group members will be listed. By default, the -m option lists the following attributes for the members of a resource group: Resource class name, Resource name, and the attributes MemberOf, OpState, WinSource, and Location. If the Attr operand is specified, then the attributes specified will be listed for the managed resources (member resources).

The Attr parameter if specified will override the -A option. The Attr parameter must be a valid resource group attribute when listing resource group information, and likewise be a valid member resource attribute when listing a managed resource. If the Attr parameters are specified, then the exact value of these attributes will be listed. Otherwise, some of these attribute values are translated into English words.

Options

-A p | d | b
Specifies an attribute type. By default, only persistent attributes are displayed. This option can be used only when no attribute names are specified on the command line. To view all the persistent attributes of the member resources, this option must be used with p attribute type.
p
Displays only persistent attributes.
d
Displays only dynamic attributes.
b
Displays both persistent and dynamic attributes.
For best performance, specify the -A p option.
-c
Specifies the resource and its class. This option indicates that parameters are resource classes, resource names, and, optionally, node names. The attributes of the member resources are listed or displayed. The attributes and selection strings when this option is used are applied to member resources and not the resource groups; therefore, these attributes must exist for the member resources.
-d
Specifies delimiter-formatted output. The default delimiter is a colon (:). Use the -D option if you want to change the default delimiter.
-D Delimiter
Specifies delimiter-formatted output that uses the specified delimiter. Use this option to specify something other than the default colon (:); for example, when the data to be displayed contains colons. Use this option to specify a delimiter of one or more characters.
-g Resource_group
Displays resource group information such as the name and the persistent and dynamic attributes of the defined resource group . When the -g option is used with the -m and -c options, the member resources must belong to the specified resource group.
-h
Writes the command's usage statement to standard output.
-l
Specifies long formatted output. Each attribute is displayed on a separate line. This is the default display format.
-m
Specifies member resources and lists or displays the attributes of the member resources. When this option is used, th attributes and selection strings are applied to member resources and not to resource groups; therefore, the attribute fields must exist for the member resources.
-s "Selection_string"
Specifies a selection string. This option without the -m option is applied to the resource-group attribute fields; with the -m option or -c option, the selection string is applied to the member-resource attribute fields. All selection strings must be enclosed within either double or single quotation marks. If the selection string contains double quotation marks, enclose the entire selection string in single quotation marks. For example:
-s 'Name == "testing"'
-s 'Name ?= "test"'
-t
Specifies tabular formatted output. Each attribute is displayed in a separate column, one resource per line.
-T
Writes the command's trace messages to standard error. For your software-service organization's use only.
-V
Writes the command's verbose messages to standard output.

Parameters

Attr
Specifies the names of one or more attributes whose values are to be displayed. These attributes must be separated by spaces. When the -m option is specified, these attributes must match the member resource attribute fields; when the -m option is not specified, the attributes must match the resource group attribute fields.
Node
Specifies the node name. The node name may have to be included when an attempt has been made to list a fixed member resource. The node and its resource must be separated by the colon (:) delimiter.
Resource_class
Specifies the name of the resource class to which the member resource belongs. The resource and the resource class must be separated by the colon (:) delimiter.
Resource_name
Specifies the resource name. One or more resources may be specified along with the resource class to which it belongs. Each resource or set of resources must be preceded by its resource class. The resource and the resource class must be separated by the colon (:) delimiter.

Exit Status

0
The command ran successfully.
1
Error occurred with RMC.
2
Error occurred with CLI script.
3
Incorrect flag on command line.
4
Incorrect parameter on command line.
5
Error occurred with RMC that was based on faulty command line input.
6
Resource specified was not found.

Security

This command requires root authority, or a user ID with appropriate permissions. For more information, see Setting up non-root user Ids for the command line interface.

Examples

  1. To list all the currently-defined resource groups, enter:
    lsrg

    Output:

    Resource Group Names:
    
     resA
     clusterresA
  2. To list all the attributes of the resource group resA, enter:
    lsrg -A b -g resA

    Output:

    Displaying Resource Group Information:
    All Attributes 
    For Resource Group "resA". 
    Resource Group 1:
      Name                             = "resA"
      MemberLocation                   = Collocated
      Priority                         = 22
      AllowedNodes                     = "node1"
      NominalState                     = Online
      OpState                          = Offline
      TopGroup                         = resA
      AutomationDetails[CompoundState] = Automation
  3. To list all the attributes of the resource group resA in verbose mode, enter:
    lsrg -A b -V -g resA

    Output:

    Starting to list resource group information.
    lsrg: Executed on Mon Apr 3 15:48:49 2006 at "node1", 
       master node "node1".
    Displaying Resource Group information:
    All Attributes
    For Resource Group "resA".
    
    Resource Group 1:
       Name           = "resA"
       MemberLocation = Collocated
       Priority       = 22
       AllowedNodes   = "node1" 
       NominalState   = Online
       OpState        = Offline
       TopGroup       = resA
       AutomationDetails[CompoundState]   = Automation
                        [DesiredState]    = Online
                        [ObservedState]   = Pending Online
                        [BindingState]    = Bound
                        [AutomationState] = Internal
                        [ControlState]    = Startable
                        [HealthState]     = Not Applicable
    Completed listing resource group information.
  4. To list the attributes of the members of resource group resA, enter:
    lsrg -m -V -Ab -g resA

    Output:

    Starting to list member resource information.
    lsrg: Executed on Mon Apr 3 15:48:49 2006 at "node1", 
       master node "node1".
    Displaying Member Resource information:
    for Resource Group "resA".
    Member Resource 1:
    Resource:Node [ManagedResource]  = IBM.Application:charm
    Mandatory                        = False
    MemberOf                         = resA
    WinSource                        = Nominal
    Location                         = node1
    AutomationDetails                = [10,1,100,2,80,1,0]
    AutomationDetails[CompoundState] = Automation
               [DesiredState]        = Online
               [ObservedState]       = Pending Online
               [BindingState]        = Bound
               [AutomationState]     = Internal
               [ControlState]        = Startable
               [HealthState]         = Not Applicable
    Completed listing member resource information.
  5. To list the persistent attributes of the member resources of resource group resA, enter:
     lsrg -m -A p -g resA

    Output:

    Displaying Member Resource information:
    for Resource Group "resA".
    Member Resource 1:
       Resource:Node[ManagedResource] = IBM.Application:charm
          Mandatory                   = False
          MemberOf                    = resA
  6. To list the persistent attributes of the member resources of a resource group resA using a selection string, enter:
     lsrg -m -A p -s 'MemberOf == "resA"'

    Output:

    Displaying Member Resource information:
    for Resource Group "resA".
    Member Resource 1:
       Resource:Node[ManagedResource] = IBM.Application:charm
       Mandatory                      = False
       MemberOf                       = resA
  7. To list the attributes of a managed resource, enter:
    lsrg -m

    Output:

    Displaying Member Resource information:
    Class:Resource:Node[ManagedResource]Mandatory MemberOf OpState WinSource Location
    IBM.Application:WebServer    True      DemoRG   Online   Nominal   node1    
    IBM.ServiceIP:WebIP          True      DemoRG   Online   Nominal   node1   

Files

/usr/sbin/rsct/bin/lsrg
Location of the lsrg command.

See Also

The addrgmbr, samctrl, chrel, chrg, chrgmbr, mkrel, mkrg, rmrel, rmrg, rmrgmbr commands.

The rmccli general information file.