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

Commands Reference, Volume 3

lscondition Command

Purpose

Lists information about one or more conditions.

Syntax

lscondition [ -m | -n | -e ] [ -C | -l | -t | -d | -D delimiter ] [-A] [-q] [-x] [-a] [-h] [-TV] [condition1 [,condition2,...]:node_name]]

Description

The lscondition command lists the following information about defined conditions:

Name
The name of the condition.
Location
The location of the condition (for management domain scope or peer domain scope).
MonitorStatus
The status of the condition.
ResourceClass
The resource class monitored by this condition.
EventExpression
The expression used in monitoring this condition.
EventDescription
The text description of EventExpression.
RearmExpression
The expression used in determining when monitoring should restart for this condition after an event has occurred.
RearmDescription
The text description of RearmExpression.
SelectionString
The selection string that is applied to the attributes of ResourceClass to determine which resources are included in the monitoring of this condition.
Severity
The severity of the condition: critical, warning, or informational.
NodeNamelist
The host names of the nodes where the condition is registered.
MgtScope
The RMC scope in which the condition is monitored.

For a list of all conditions, enter the lscondition command without any condition names specified. A list of all the condition names is returned with the monitoring status for each condition. The default format in this case is tabular. Specifying a node name following the condition names limits the display to the conditions defined on that node. You can list all of the conditions on a node by specifying a colon (:) followed by the node name. The node name is a node within the management scope, which is determined by the CT_MANAGEMENT_SCOPE environment variable. The management scope determines the list of nodes from which the conditions are listed. For local scope, only conditions on the local node are listed. Otherwise, the conditions from all nodes within the domain are listed.

For all of the information about all condition names, specify the -A flag with the lscondition command. The -A flag causes all information about a condition to be listed when no condition names are specified. When all the information about all conditions is listed, the default format is long. If a monitoring-status flag (-e, -m, or -n) is specified, the conditions with that status are listed. The error information is only displayed when the -e flag is specified.

When more than one condition is specified, the condition information is listed in the order in which the condition names are entered.

By default, when a condition name is specified with the lscondition command, all of the condition's properties are displayed.

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, lscondition -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.
-m
Lists only those conditions that are being monitored without error.
-n
Lists only those conditions that are not being monitored.
-e
Lists only those conditions that are monitored in error.
-C
Displays the mkcondition command that could be used to create the condition. If more than one condition is specified, each mkcondition command appears on a separate line. This flag is ignored when no conditions are specified. This flag overrides the -l flag.
-l
Produces long-formatted output. Displays the condition information on separate lines.
-t
Displays the condition information in separate columns (table format).
-d
Produces delimiter-formatted output. The default delimiter is a colon (:). Use the -D flag if you want to change the default delimiter.
-D delimiter
Produces 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.
-A
Displays all of the properties of the condition.
-q
Does not return an error when the condition does not exist.
-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

condition1 [,condition2,...]
Specifies the name of an existing condition that is defined on the host name node_name. You can specify more than one condition name. This parameter can be a condition name or a substring of a condition name. When it is a substring, any defined condition name that contains the substring will be listed.
node_name
Specifies the node where the condition is defined. If node_name is not specified, the local node is used. node_name is a node within the scope determined by the CT_MANAGEMENT_SCOPE environment variable.

Security

The user needs read permission for the IBM.Condition resource class to run lscondition. Permissions are specified in the access control list (ACL) file on the contacted system. See the RSCT Guide and Reference for details on the ACL file and how to modify it.

Exit Status

0
The command ran successfully.
1
An error occurred with RMC.
2
An error occurred with a command-line interface script.
3
An incorrect flag was entered on the command line.
4
An incorrect parameter was entered on the command line.
5
An error occurred that was based on incorrect command-line input.

Environment Variables

CT_CONTACT
Determines the system where the session with the resource monitoring and control (RMC) daemon occurs. When CT_CONTACT is set to a host name or IP address, the command contacts the RMC daemon on the specified host. If CT_CONTACT is not set, the command contacts the RMC daemon on the local system where the command is being run. The target of the RMC daemon session and the management scope determine the resource classes or resources that are processed.
CT_MANAGEMENT_SCOPE
Determines the management scope that is used for the session with the RMC daemon in processing the resources of the event response resource manager (ERRM). The management scope determines the set of possible target nodes where the resources can be processed. 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

These examples apply to standalone systems:

  1. To list all conditions and their monitoring status, run this command:
    lscondition 
    The output will look like this:
    Name                      Location      MonitorStatus
    "FileSystem space used"   "nodeA"       "Monitored"
    "tmp space used"          "nodeA"       "Not monitored"
    "var space used"          "nodeA"       "Error"       
    
  2. To list general information about the condition "FileSystem space used" in long form, run this command:
    lscondition "FileSystem space used"
    The output will look like this:
    Name             = "FileSystem space used"
    Location         = "nodeA"
    MonitorStatus    = "Monitored"
    ResourceClass    = "IBM.FileSystem"
    EventExpression  = "PercentTotUsed > 99"
    EventDescription = "Generate event when space used is
                        greater than 99 percent full"
    RearmExpression  = "PercentTotUsed < 85"
    RearmDescription = "Start monitoring again after it is
                        less than 85 percent"
    SelectionString  = ""
    Severity         = "w"
    NodeNamelist     = "local"
    MgtScope         = "local"
  3. To list the command that would create the condition "FileSystem space used", run this command:
    lscondition -C "FileSystem space used"
    The output will look like this:
    mkcondition -r IBM.FileSystem -a PercentTotUsed \
    -e "PercentTotUsed > 99" -E "PercentTotUsed < 85" \
    -d "Generate event when space used is greater than 99 percent full" \
    -D "Start monitoring after it is less than 85 percent" \
    -S w "FileSystem space used"
  4. To list all conditions that have the string space in their names, run this command:
    lscondition space	
    The output will look like this:
    Name             = "FileSystem space used"
    MonitorStatus    = "Monitored"
    
    ·
    ·
    ·
    Name = "tmp space used" MonitorStatus = "Not Monitored"
    ·
    ·
    ·
    Name = "var space used" MonitorStatus = "Monitored"
    ·
    ·
    ·
  5. To list the conditions that are in error and display the error information, run this command:
    lscondition -e	
    The output will look like this:
    Name               MonitorStatus      
    "var space used"   "Error"           
     	

This example applies to clustered systems:

  1. To list all conditions and their monitoring status, run this command:
    lscondition 
    The output will look like this:
    Name                      Location    MonitorStatus
    "FileSystem space used"   "nodeA"     "Monitored"
    "tmp space used"          "nodeB"     "Not monitored"
    "var space used"          "nodeC"     "Error"       
    

Location

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

Related Information

ERRM commands: chcondition, lscondresp, mkcondition, rmcondition

Files: rmccli

Books: see the RSCT Guide and Reference for more information about ERRM operations

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