lsrsrcdef Command

Purpose

Displays definition information for a resource or a resource class.

Syntax

For a resource...

To display the definition:

lsrsrcdef [-p property] [-e] [-s] [ -l-i-t-d-D delimiter ] [-x] [-h] [-TV] resource_class [attr…]

To display the persistent attribute definitions:

lsrsrcdef -A p [-p property] [-e] [-s] [ -l-i-t-d-D delimiter ] [-x] [-h] [-TV] resource_class [attr…]

To display the dynamic attribute definitions:

lsrsrcdef -A d [-p property] [-e] [-s] [ -l-i-t-d-D delimiter ] [-x] [-h] [-TV] resource_class [attr…]

For a resource class...

To display the definition:

lsrsrcdef -c [-p property] [-e] [-s] [ -l-i-t-d-D delimiter ] [-x] [-h] [-TV] resource_class [attr…]

To display the persistent attribute definitions:

lsrsrcdef -c -A p [-p property] [-e] [-s] [ -l-i-t-d-D delimiter ] [-x] [-h] [-TV] resource_class [attr…]

To display the dynamic attribute definitions:

lsrsrcdef -c -A d [-p property] [-e] [-s] [ -l-i-t-d-D delimiter ] [-x] [-h] [-TV] resource_class [attr…]

To display a list of all of the resource class names:

lsrsrcdef

Description

The lsrsrcdef command displays the definition of a resource or a resource class or the persistent or dynamic attribute definitions of a resource or a resource class. By default:
  • if no attr parameters are specified on the command line, this command displays the definitions for public attributes. To override this default, use the -p flag or specify the name of the attribute you want to display.
  • this command does not display attribute descriptions. To display attribute definitions and descriptions, specify the -e flag.

Flags

-A p | d
Specifies the attribute type. You can display either persistent or dynamic attribute definitions. Use this flag with the -c flag to display the persistent or dynamic attribute definitions of a resource class.
p
Displays only persistent attributes
d
Displays only dynamic attributes
-c
Displays the definition of a resource class definition. To display the persistent attribute definitions for a resource class, specify this flag with the -A p flag. To display the dynamic attribute definitions for a resource class, specify this flag with the -A d flag.
-d
Specifies delimiter-formatted output. The default delimiter is a colon (:). Use the -D flag 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.
-e
Specifies expanded format. By default, the descriptions of the definitons are not displayed. Specify this flag to display the definitions and the descriptions.
-i
Generates a template of 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 lsrsrcdef command be directed to a file. This flag overrides the -s and -A d flags.
-l
Specifies "long" format — one entry per line. This is the default display format. If the lsrsrcdef -l command is issued without a resource class name, this flag is ignored when the command returns the list of defined resource class names.
-p property
Displays attribute definitions for attributes with the specified property. By default, only the definitions for public attributes are displayed. To display all attribute definitions regardless of the property, use the -p 0 flag.
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 request the attribute definitions 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 request the attribute definitions for all persistent attributes that are either reqd_for_define or option_for_define, enter:
lsrsrcdef -p 0x0a
-s
Displays the structured data definition. Specify this flag for the structured data definition to be expanded so that each element definition of the structured data attributes is displayed.
-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 attribute definitions you want to display.
attr
If a resource_class parameter is specified, zero or more attribute names can be specified. If no attr parameter is specified, the definition for all of the attributes for the resource are displayed. Specify individual attribute names to control which attributes are displayed and their order. Specify only persistent attribute names when the -A p flag is used. Specify only dynamic attribute names when the -A d flag is used. Attributes must be separated by spaces.

Security

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

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_IP_AUTHENT
When the CT_IP_AUTHENT environment variable exists, the RMC daemon uses IP-based network authentication to contact the RMC daemon on the system that is specified by the IP address to which the CT_CONTACT environment variable is set. CT_IP_AUTHENT only has meaning if CT_CONTACT is set to an IP address; it does not rely on the domain name system (DNS) service.
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.

Implementation Specifics

This command is part of the Reliable Scalable Cluster Technology (RSCT) fileset for AIX®.

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 display the names of all of the resource classes defined on the system, enter:
    lsrsrcdef
    The output will look like this:
    class_name
    "IBM.ATMDevice"       
    "IBM.Association"     
    "IBM.AuditLog"        
    "IBM.AuditLogTemplate"
    "IBM.Condition"       
    "IBM.EthernetDevice"  
    "IBM.EventResponse"   
    ... 
  2. To display the resource class definitions for resource IBM®.Host, enter:
    lsrsrcdef -c IBM.Host
    The output will look like this:
    Resource Class Definition for: IBM.Host                       
    resource class 1:                                             
            class_name         = "IBM.Host"                       
            class_id           = 8                                
            properties         = {"has_rsrc_insts","mtype_subdivided"}
            display_name       = ""                               
            description        = ""                               
            locator            = "NodeList"                       
            class_pattr_count  = 1                                
            class_dattr_count  = 3                                
            class_action_count = 0                                
            pattr_count        = 6                                
            dattr_count        = 47                               
            action_count       = 0                                
            error_count        = 0                                
            rsrc_mgr_count     = 1                                
    rsrc_mgrs 1:                                                  
            mgr_name  = "IBM.HostRM"                              
            first_key = 1                                         
            last_key  = 1              
  3. To display the resource class persistent attribute definitions for resource IBM.Host, enter:
    lsrsrcdef -c -A p -p 0 IBM.Host 
    The output will look like this:
    Resource Class Persistent Attribute Definitions for: IBM.Host
    attribute 1:                                                 
            program_name              = "Variety"                            
            display_name              = ""                                   
            group_name                = ""                                   
            properties                = {"read_only","inval_for_define"}   
            description               = ""                                   
            attribute_id              = 0                                    
            group_id                  = 255                                  
            data_type                 = "uint32"                             
            variety_list              = {{1..1}}                             
            variety_count             = 1                                    
            default_value             = 0            
  4. To display the resource persistent attribute definitions and descriptions for resource IBM.Host, enter:
    lsrsrcdef -A p -p 0 -e IBM.Host
    The output will look like this:
    Resource Persistent Attribute Definitions for: IBM.Host                         
    attribute 1:                                                                    
            program_name       = "Name"                                             
            display_name       = "Name"                                             
            group_name         = "General"                                          
            properties         = {"reqd_for_define","public","selectable"}        
            description        = "Identifies the current name of the host           
                                  as returned by command."
            attribute_id       = 0                                                  
            group_id           = 0                                                  
            data_type          = "char_ptr"                                         
            variety_list       = {{1..1}}                                           
            variety_count      = 1                                                  
            default_value      = ""                                                 
    attribute 2:                                                                    
            program_name       = "ResourceHandle"                                   
            display_name       = "Resource Handle"                                  
            group_name         = "Internal"                                         
            properties         = {"read_only","inval_for_define","selectable"}    
            description        = "A globally unique handle that identifies the host. 
                                  Every resource is assigned a resource handle, 
                                  which is used internally for identifying and
                                  locating each resource.  The resource handle 
                                  is fixed in size and avoids the problems of 
                                  name space collisions across different types 
                                  of resources."  
            attribute_id       = 1                                                       
            group_id           = 255                                                     
            data_type          = "rsrc_handle_ptr"                                       
            variety_list       = {{1..1}}                                                
            variety_count      = 1 
            default_value      = "0x0000 0x0000 0x00000000 0x00000000 0x00000000 0x00000000"
    attribute 3:                                                                    
            program_name       = "Variety"                                                 
            display_name       = "Variety"                                                 
            group_name         = "Internal"                                                
    	...                 
  5. To display the public dynamic attributes for resource IBM.Host, enter:
    lsrsrcdef -A d IBM.Host
    The output will look like this:
    Resource Dynamic Attribute Definitions for: IBM.Host 
    attribute 1:                                   
            program_name           = "ProcRunQueue"                                      
            display_name           = ""                                                  
            group_name             = ""                                                  
            properties             = {"public"}                                            
            description            = ""                                                  
            attribute_id           = 1                                                   
            group_id               = 1                                                   
            data_type              = "float64"                                             
            variable_type          = 0                                                   
            variety_list           = {{1..1}}                                            
            variety_count          = 1                                                   
            init_value             = 0                                                   
            min_value              = 0                                                   
            max_value              = 100                                                 
            expression             = "(ProcRunQueue - ProcRunQueue@P) >= (ProcRunQueue@P * 0.5)"
            expression_description = ""                                              
            rearm_expression       = "ProcRunQueue < 50"                              
            rearm_description      = ""                                                  
            PTX_name               = ""                                                  
    attribute 2:                                                                         
    ...
                      

Location

/usr/sbin/rsct/bin/lsrsrcdef