[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3

lsrsrc Command

Purpose

Lists (or displays) resources or a resource class.

Syntax

lsrsrc [-s "selection_string"] [-A p | d | b] [-p property] [-l | -t | -d | -D delimiter] [-x] [-a] [-h] [-TV] [resource_class [prop...]]

lsrsrc [-s "selection_string"] -r [-l | -t | -d | -D delimiter] [-x] [-h] [-TV] [resource_class]

lsrsrc -c [-A p | d | b] [-p property] [-l | -t | -d | -D delimiter] [-x] [-h] [-TV] resource_class [attr...]

Description

The lsrsrc command is used to list the persistent and dynamic properties and their values of either a resource class or a resource.

When no prop parameter is specified, only attributes that are defined as public are displayed. Use the -p flag to override this default. When no prop parameter is specified, the -A p | d | b flag controls whether only persistent, or only dynamic, or both persistent and dynamic properties and their values are displayed.

When one or more property names are specified, the property names specified and their values are displayed in the order specified, provided that each of the specified property names is valid.

To get a list of all of the resource classes, enter the lsrsrc command with no parameters.

Specify the -c flag to display a list of the resource class properties and values.

Specify the -r flag to display only the resource handles associated with the resources for the specified resource class.

By default, the resource properties and values are displayed in long format. Use the -t, -d, or -D flag for the resources to be displayed in tabular or delimiter formatted output.

For best performance, specify either the -A p flag or only persistent properties as parameters.

Note
Any attribute that has a data type defined as ct_none (for example, a Quantum) is not listed by the lsrsrc command. RMC does not return property values for attributes that are defined as Quantum. To list property definitions, use the lsrsrcdef command.

Flags

-a
Specifies that this command applies to all nodes in the cluster. The cluster scope is determined by the CT_MANAGEMENT_SCOPE environment variable. If it is not set, first the management domain scope is chosen if it exists, then the peer domain scope is chosen if it exists, and then local scope is chosen, until the scope is valid for the command. The command will run once for the first valid scope found. For example, if both a management and peer domain exist, lsrsrc -a with CT_MANAGEMENT_SCOPE not set will list the management domain. In this case, to list the peer domain, set CT_MANAGEMENT_SCOPE to 2.
-A p | d | b
Specifies an attribute type. By default only persistent attributes are displayed. This flag can be used only when no attribute names are specified on the command line.
p
Displays only persistent attributes.
d
Displays only dynamic attributes.
b
Displays both persistent and dynamic attributes.
For best performance, specify the -A p flag.
-c
Displays the attributes for the resource class. By default, the resource attributes, not the resource class, are displayed. This flag overrides the -r flag.
-d
Specifies delimiter-formatted output. The default delimiter is a colon (:). Use the -D flag if you want to change the default delimiter.
-D delimiter
Specifies delimiter-formatted output that uses the specified delimiter. Use this flag to specify something other than the default colon (:). An example is when the data to be displayed contains colons. Use this flag to specify a delimiter of one or more characters.
-l
Specifies long formatted output. Each attribute is displayed on a separate line. This is the default display format. If the lsrsrc command is issued with the -l flag, but without a resource class name, the -l flag is ignored when the command returns the list of defined resource class names.
-p property
Displays attributes with the specified property. By default, only public attributes are displayed. To display all the attributes regardless of the property, use the -p 0 flag. Use this flag in conjunction with the -A flag when no attributes are specified on the command line.

Persistent attribute properties:

0x0001
Read only
0x0002
Required for define
0x0004
Not valid for define
0x0008
Optional for define
0x0010
Selectable
0x0020
Public

Dynamic attribute properties:

0x0020
Public

A decimal or hexadecimal value can be specified for the property. To display attributes and their values for all attributes that have one or more properties, "OR" the properties of interest together and then specify the "ORed" value with the -p flag. For example, to display attributes and their values for all persistent attributes that are either required for define or optional for define, enter:

-p 0x0a
-r
Displays the resource handles for the resources that match the specified selection string or all resources when no selection string is specified.
-s "selection_string"
Specifies a selection string. 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"'

Only persistent attributes may be listed in a selection string. For information on how to specify selection strings, see the RSCT Guide and Reference.

-t
Specifies tabular formatted output. Each attribute is displayed in a separate column, one resource per line.
-x
Suppresses header printing.
-h
Writes the command's usage statement to standard output.
-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

prop...
Specifies the property name. Both persistent and dynamic property names can be specified to control which properties are displayed and their order. Zero or more properties can be specified. Properties must be separated by spaces. If no property names are specified, the -A p | d | b flag controls whether only persistent properties, only dynamic properties, or both persistent and dynamic properties are displayed. When no property names are specified, only properties that are defined as public are displayed. Use the -p flag to override this default.
resource_class
Specifies the name of the resource class with the resources that you want to display. Zero or one resource_class parameters can be specified. If no resource_class parameter is specified, a list of all resource class names is displayed.

Security

The user needs read permission for the resource_class specified in lsrsrc to run lsrsrc. Permissions are specified in the access control list (ACL) file on the contacted system. See the RSCT Guide and Reference for information about the ACL file and how to modify it.

Exit Status

0
Command has run 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.

Environment Variables

CT_CONTACT
When the CT_CONTACT environment variable is set to a host name or IP address, the command contacts the Resource Monitoring and Control (RMC) daemon on the specified host. If the environment variable is not set, the command contacts the RMC daemon on the local system where the command is being run. The resource class or resources that are displayed or modified by the command are located on the system to which the connection is established.
CT_MANAGEMENT_SCOPE
Determines the management scope that is used for the session with the RMC daemon to monitor and control the resources and resource classes. The management scope determines the set of possible target nodes where the resources and resource classes can be monitored and controlled. The valid values are:
0
Specifies local scope.
1
Specifies local scope.
2
Specifies peer domain scope.
3
Specifies management domain scope.

If this environment variable is not set, local scope is used.

Standard Output

When the -h flag is specified, this command's usage statement is written to standard output. All verbose messages are written to standard output.

Standard Error

All trace messages are written to standard error.

Examples

  1. To list the names of all of the resource classes, enter:
    lsrsrc
    Output is similar to:
    class_name 
    "IBM.Association"
    "IBM.Condition"
    'IBM.EventResponse"
    "IBM.Host"
    "IBM.Ethernet"
    "IBM.TokenRing"
    ... 
  2. To list the persistent attributes for resource IBM.Host that have 4 processors, enter:
    lsrsrc -s "NumProcessors == 4" -A p -p 0 IBM.Host
    Output is similar to:
    Resource Persistent Attributes for: IBM.Host                                    
    resource 1:                                                                     
            Name           = "c175n05.ppd.pok.ibm.com"                                
            ResourceHandle = "0x4008 0x0001 0x00000000 0x0069684c 0x0d7f55d5 0x0c32fde3"                                                                               
            Variety        = 1                                                      
            NodeList       = {1}                                                    
            NumProcessors  = 4                                                      
            RealMemSize    = 1073696768          
  3. To list the public dynamic attributes for resource IBM.Host on node 1, enter:
    lsrsrc -s 'Name == "c175n05.ppd.pok.ibm.com"' -A d IBM.Host 
    Output is similar to:
    Resource Dynamic Attributes for: IBM.Host     
    resource 1:                                   
            ProcRunQueue        = 1.03347987093142
            ProcSwapQueue       = 1.00548852941929
            TotalPgSpSize       = 65536           
            TotalPgSpFree       = 65131           
            PctTotalPgSpUsed    = 0.61798095703125
            PctTotalPgSpFree    = 99.3820190429688
            PctTotalTimeIdle    = 0               
            PctTotalTimeWait    = 51.5244382399734
            PctTotalTimeUser    = 12.8246006482343
            PctTotalTimeKernel  = 35.6509611117922
            PctRealMemFree      = 66              
            PctRealMemPinned    = 4               
            RealMemFramesFree   = 173361          
            VMPgInRate          = 0               
            VMPgOutRate         = 0               
            VMPgFaultRate       = 0 
             ...              
  4. To list the Name, Variety, and ProcessorType attributes for the IBM.Processor resource on all the online nodes, enter:
    lsrsrc IBM.Processor Name Variety ProcessorType
    The output will look like this:
    Resource Persistent Attributes for: IBM.Processor
    resource 1:
            Name          = "proc3"
            Variety       = 1
            ProcessorType = "PowerPC_604"
    resource 2:
            Name          = "proc2"
            Variety       = 1
            ProcessorType = "PowerPC_604"
    resource 3:
            Name          = "proc1"
            Variety       = 1
            ProcessorType = "PowerPC_604"
    resource 4:
            Name          = "proc0"
            Variety       = 1
            ProcessorType = "PowerPC_604"
    
  5. To list both the persistent and dynamic attributes for the resource class IBM.Condition, enter:
    lsrsrc -c -A b -p 0 IBM.Condition
    Output is similar to:
    Resource Class Persistent and Dynamic Attributes for: IBM.Condition
    resource 1:                                                        
            ResourceType = 0                                           
            Variety      = 0                                                                                   

Location

/usr/sbin/rsct/bin/lsrsrc
Contains the lsrsrc command

Related Information


Commands: lsrsrcdef
Files: rmccli
Books: see the RSCT Guide and Reference for information about RMC operations

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]