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

Commands Reference, Volume 3, i - m

lsrsrc Command

Purpose

Displays attributes and values for a resource or a resource class.

Syntax

To display the attributes and values for a resource:

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

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

To display the attributes and values for a resource class:

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

To display a list of all of the resource classes:

lsrsrc

Description

The lsrsrc command displays the persistent and dynamic attributes and their values for a resource or a resource class.

When no attribute names are specified:

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

To display a list of the attributes and values for a resource class, specify the -c flag.

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

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

For best performance, specify either the -A p flag or only persistent attributes 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 attribute values for attributes that are defined as Quantum. To list attribute 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.

To display all RSCT peer domains in Distributed Management (DM) scope, specify the -c flag with the -a flag. The lsrsrc -c -a command displays peer domain names at the end of the output, as a class attribute ActivePeerDomain.

-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. This flag overrides the -r flag.

To display all RSCT peer domains in Distributed Management (DM) scope, specify the -c flag with the -a flag. The lsrsrc -c -a command displays peer domain names at the end of the output, as a class attribute ActivePeerDomain.

-C rpd_name_1 ... rpd_name_n
Displays the class attributes of globalized classes in RSCT peer domains for Distributed Management (DM) scope. The lsrsrc -C command displays peer domain names at the end of the output, as a class attribute ActivePeerDomain.
-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.
-i
Generates a template of the Resource_Data_Input file that can then, after appropriate editing, be used as input to the mkrsrc command. The output is displayed in long (stanza) format. All required and optional attributes that can be used to define a resource are displayed. The attribute data type is displayed as the value in the attr=value pairs. It is suggested that when you use this flag, the output of the lsrsrc command be directed to a file. This flag overrides the -s and -A d flags.
-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 of 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
reqd_for_define (required)
0x0004
inval_for_define (not valid)
0x0008
option_for_define (optional)
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 "OR"ed value with the -p flag. For example, to display attributes and their values for all persistent attributes that are either reqd_for_define or option_for_define, enter:

lsrsrc -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.

-t
Specifies table format. Each attribute is displayed in a separate column, with 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

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

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.

Exit Status

0
The command has run successfully.
1
An error occurred with RMC.
2
An error occurred with the command-line interface (CLI) script.
3
An incorrect flag was specified on the command line.
4
An incorrect parameter was specified on the command line.
5
An error occurred with RMC that was based on incorrect 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
    The output will look like this:
    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
    The output will look like this:
    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 
    The output will look like this:
    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
    The output will look like this:
    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, mkrsrc

Files: rmccli

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