lscondition Command
Purpose
Lists information about one or more conditions.
Syntax
lscondition [-a] [ -m │ -n │ -e ] [ -C │ -l │ -t │ -d │ -D delimiter ] [-A] [-q] [-U] [-x] [-h] [-TV] [condition1 [,condition2,...]:node_name]
Description
Field | Description |
---|---|
Name | The name of the condition. |
Node | The location of the condition (for management domain scope or peer domain scope). |
MonitorStatus | The status of the condition. |
ResourceClass | The resource class that is monitored by this condition. |
EventExpression | The expression that is used in monitoring this condition. |
EventDescription | A description of the EventExpression field. |
RearmExpression | The expression used in determining when monitoring should restart for this condition after an event has occurred. |
RearmDescription | A description of the RearmExpression field. |
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. |
NodeNames | The host names of the nodes where the condition is registered. |
MgtScope | The RMC scope in which the condition is monitored. |
Toggle | Specifies whether the condition toggles between the event and the rearm event. |
Locked | Specifies whether the resource is locked or unlocked. |
EventBatchingInterval | Specifies the time in seconds that is used to determine when the accumulated events are batched together and sent to the response. A value of 0 indicates that no batching is used. |
EventBatchingMaxEvents | Specifies the maximum number of events that can be in a single batch of events. A value of 0 indicates that there is no maximum if the value of EventBatchingInterval is not 0. |
BatchedEventRetentionPeriod | Specifies the time in hours that the batched event file is kept after all associated response scripts are run. |
BatchedEventMaxTotalSize | Specifies that the total saved batched event file size can't exceed a certain size in megabytes (MB) per condition. RecordAuditLog Specifies the level of detail for ERRM log entries to the audit log (ALL, Error Only, or None). |
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.
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 attributes are displayed.
If Cluster Systems Management (CSM) is installed on your system, you can use CSM defined node groups as node name values to refer to more than one node.
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.
- -A
- Displays all of the attributes of the condition.
- -C
- Displays a mkcondition command template based on the condition. By modifying this template, you can create new conditions. If more than one condition is specified, the template for each mkcondition command appears on a separate line. This flag is ignored when no conditions are specified. This flag overrides the –l flag.
- -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.
- -e
- Lists only those conditions that are monitored in error.
- -l
- Produces long-formatted output. Displays the condition information on separate lines.
- -m
- Lists only those conditions that are being monitored without error.
- -n
- Lists only those conditions that are not being monitored.
- -q
- Does not return an error when the condition does not exist.
- -t
- Displays the condition information in separate columns (table format).
- -U
- Indicates whether the resource is locked.
- -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: Administration Guide 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_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 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.
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
- To list all conditions and their monitoring status, run this command:
The output will look like this:lscondition
Name Node MonitorStatus "FileSystem space used" "nodeA" "Monitored" "tmp space used" "nodeA" "Not monitored" "var space used" "nodeA" "Error"
- To list general information about the condition "FileSystem space
used" in long form, run this command:
The output will look like this:lscondition "FileSystem space used"
Name = "FileSystem space used" Node = "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" NodeNames = "{}" MgtScope = "l" Toggle = "Yes" Locked = "No"
- To list the command that would create the condition "FileSystem
space used", run this command:
The output will look like this:lscondition -C "FileSystem space used"
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"
- To list all conditions that have the string space in
their names, run this command:
The output will look like this:lscondition space
Name = "FileSystem space used" MonitorStatus = "Monitored" Name = "tmp space used" MonitorStatus = "Not Monitored" Name = "var space used" MonitorStatus = "Monitored"
- To list the conditions that are in error, run this command:
The output will look like this:lscondition -e
Name MonitorStatus "var space used" "Error"
- To list all conditions and their monitoring status, run this command:
The output will look like this:lscondition -a
Name Node MonitorStatus "FileSystem space used" "nodeA" "Monitored" "tmp space used" "nodeB" "Not monitored" "var space used" "nodeC" "Error"
Location
- /opt/rsct/bin/lscondition