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

Commands Reference, Volume 3


lsrsrc Command

Purpose

Lists (displays) resources or a resource class.

Syntax

lsrsrc [-h] [-s "Selection_string"] [-a p | d | b] [-p 0] [-l | -t | -d | -D Delimiter] [-x] [-T] [-V] [Resource_class [Attr...]]

lsrsrc [-h] [-s "Selection_string"] -r [-l | -t | -d | -D Delimiter] [-x] [-T] [-V] [Resource_handle]

lsrsrc [-h] -c [-a p | d | b] [-p 0] [-l | -t | -d | -D Delimiter] [-x] [-T] [-V] Resource_class [Attr...]

Description

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

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

When one or more attribute names are specified, exactly the attribute names specified and their values are displayed in the order specified, provided that each of the specified attribute names are 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 attributes and values.

Specify the -r flag to display only the resource handles linked with the resources in the displayed 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 tabular 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.

Parameters

Attr
Attribute name. Both persistent and dynamic attribute names may be specified to control which attributes are displayed and their order. Zero or more attributes may be specified. Attributes must be separated by spaces. If no attribute names are specified, the -a p | d | b flag controls whether only persistent attributes, only dynamic attributes, or both persistent and dynamic attributes 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.

Resource_class
Resource class name. The name of the resource class whose resources you wish displayed. Zero or one Resource_class parameter can be specified. If no Resource_class parameter is specified, a list of all resource class names is displayed.

Flags

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

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

-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 "Using Expressions" in the chapter "Using the Monitoring Application" of the RSCT 2.2 Resource Monitoring and Control Guide and Reference.

-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, type:
    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, type:
    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, type:
    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, type:
    lsrsrc IBM.Processor Name Variety ProcessorType
    

    Output is similar to:

    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, type:
    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                                                                                   
    

Files


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

Related Information

The lsrsrcdef command.

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 ]