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

Commands Reference, Volume 3


lsrsrcdef Command

Purpose

Lists a resource or resource class definition.

Syntax

lsrsrcdef [-h] [-c] [-s] [-a p | d] [-e] [-p 0] [-l | -i | -t | -d | -D Delimiter] [-x] [-T] [-V] [Resource_class [Attr...]]

Description

The lsrsrcdef command lists the definition of a resource class, or the persistent or dynamic attributes of a resource instance or a resource class.

Use lsrsrcdef with no parameters specified to get a list of all resource class names.

To see just the resource class definition, specify the -c flag and a Resource_class parameter without specifying the -a flag.

To see the persistent or dynamic attribute definitions of the resource class, specify a Resource_class parameter and the -c flag with the appropriate -a flag (-a d for dynamic attribute or -a p for persistent attribute definitions). To see the persistent or dynamic attribute definitions for a resource, specify the appropriate -a p | d flag without the -c flag.

By default, when no Attr parameters are specified on the command line, only the definitions for public attributes are displayed. To override this default, use the -p flag or specify the name of the attribute you wish to display.

By default, for the attributes that contain descriptions, the descriptions are not displayed. Specify the -e flag to display the descriptions. Because some of the descriptions are very long, the default is not to display them.

Parameters

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 the attributes for the resource are listed. Specific attribute names may be specified 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.

Resource_class
Resource class name. The name of the resource class whose attribute definitions are to be displayed. If no Resource_class parameter is specified, a list of all of the resource class names is displayed.

Flags

-a p | d
Specifies the attribute type. Either persistent or dynamic attribute definitions may be displayed. Use this flag with the -c flag for the persistent or dynamic attribute definitions of the resource class.

p
Displays only persistent attributes

d
Displays only dynamic attributes

-c
Displays the resource class definition. By default, the resource definition is displayed. Combine with the -a p | d flag to display the resource class definition for persistent or dynamic attributes. Use the -c flag alone, without the -a p | d flag, to see the resource class definition.

-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
Expands the descriptions. By default the definitions are displayed, but the textual descriptions are not displayed because they may be lengthy. Specify this flag to see both the definitions and descriptions.

-h
Writes the command's usage statement to standard output.

-i
Generates a template of the Resource Data Input file which 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 default value 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.

-l
Specifies long formatted output, one entry per line. This is the default display format. If the lsrsrcdef 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 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.

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

-x
Suppresses header printing.

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.

Examples

  1. To list the names of all of the resource classes defined on the system, type:
    lsrsrcdef
    

    Output is similar to:

    class_name
    "IBM.ATMDevice"       
    "IBM.Association"     
    "IBM.AuditLog"        
    "IBM.AuditLogTemplate"
    "IBM.Condition"       
    "IBM.EthernetDevice"  
    "IBM.EventResponse"   
    ... 
    
  2. To list the resource class definitions for resource IBM.Host, type:
    lsrsrcdef -c IBM.Host
    

    Output is similar to:

    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 list the resource class persistent attribute definitions for resource IBM.Host, type:
    lsrsrcdef -c -a p -p 0 IBM.Host 
    

    Output is similar to:

    Resource Class Persistent Attribute Definitions for: IBM.Host
    attribute 1:                                                 
            program_name              = "Variety"                            
            display_name              = ""                                   
            group_name                = ""                                   
            properties                = {"read_only","invalid_for_define"}   
            description               = ""                                   
            attribute_id              = 0                                    
            group_id                  = 255                                  
            data_type                 = "uint32"                             
            variety_list              = {{1..1}}                             
            variety_count             = 1                                    
            default_value             = 0            
    
  4. To list the resource persistent attribute definitions and descriptions for resource IBM.Host, type:
    lsrsrcdef -a p -p 0 -e IBM.Host
    

    Output is similar to:

    Resource Persistent Attribute Definitions for: IBM.Host                         
    attribute 1:                                                                    
            program_name       = "Name"                                             
            display_name       = "Name"                                             
            group_name         = "General"                                          
            properties         = {"required_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","invalid_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 list the public dynamic attributes for resource IBM.Host, type:
    lsrsrcdef -a d IBM.Host
    

    Output is similar to:

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

Files


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

Related Information

The lsrsrc, mkrsrc commands.

The Resource Data Input file.

The rmccli General Information file.

The RSCT 2.2 Resource Monitoring and Control Guide and Reference contains more information regarding RMC operations.


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