Lists information about one or more responses.
lsresponse [-a] [ -C │ -l │ -t │ -d │ -D delimiter ] [-A] [-q] [-U] [-x ] [ -b ] [-h] [-TV] [response1[,response2,...] :node_name]
Field | Description |
---|---|
ResponseName | The name of the response. |
Node | The location of the response. |
Action | The name of an action. |
DaysOfWeek | The days of the week when the action can be run. DaysOfWeek and TimeOfDay together define the interval when the action can be run. The values for the days can be separated by plus signs (+) or displayed as a range of days separated by a hyphen (-). Multiple DaysOfWeek values are separated by commas (,). The number of DaysOfWeek values must match the number of TimeOfDay values. The values for each day follow:
|
TimeOfDay | The time range when Action can be run, consisting of the start time followed by the end time separated by a hyphen. DaysOfWeek and TimeOfDay together define the interval when the action can be run. The time is in 24-hour format (HHMM), where the first two digits represent the hour and the last two digits represent the minutes. Multiple TimeOfDay values are separated by commas (,). The number of DaysOfWeek values must match the number of TimeOfDay values. |
ActionScript | The script or command to run for the action. |
ReturnCode | The expected return code for ActionScript. |
CheckReturnCode | Indicates whether the actual return code for ActionScript is compared to its expected return code. The values are: y (yes) and n (no). |
EventType | The type of event that causes the action to be run: event, rearm event, or both. |
StandardOut | Indicates whether standard output is directed to the audit log. The values are: y (yes) and n (no). |
EnvironmentVars | Indicates any environment variables that will be set before the action is run. |
UndefRes | Indicates whether the action is to be run if a monitored resource becomes undefined. The values are: y (yes) and n (no). |
Locked | Indicates whether the resource is locked or unlocked. |
EventBatching | Indicates whether the response action supports event batching. |
To get a list of all response names, run the lsresponse command alone without any response names specified. A list of all response names is returned. The default format in this case is tabular.
Specifying a node name after the response names limits the display to the responses defined on that node. List all of the responses on a node by specifying a colon (:) followed by the node name. The node name is a node within the management scope determined by the CT_MANAGEMENT_SCOPE environment variable. The management scope determines the list of nodes from which the responses are listed. For local scope, only responses on the local node are listed. Otherwise, the responses from all nodes within the domain are listed.
To see all the information about all response names, specify the -A flag with the lsresponse command. The -A flag causes all information about a response to be listed when no response names are specified. When all of the information about all responses is listed, the long format is the default.
When more than one response is specified, the response information is listed in the order in which the responses are entered.
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. For information about working with CSM node groups and using the CSM nodegrp command, see the CSM: Administration Guide and the CSM: Command and Technical Reference.
The user needs read permission for the IBM.EventResponse resource class to run lsresponse. Permissions are specified in the access control list (ACL) file on the contacted system. See the Administering RSCT guide for details on the ACL file and how to modify it.
If this environment variable is not set, local scope is used.
This command is part of the Reliable Scalable Cluster Technology (RSCT) fileset for AIX®.
When the -h flag is specified, this command's usage statement is written to standard output. All verbose messages are written to standard output.
All trace messages are written to standard error.
lsresponse
The output will look like this: ResponseName
"E-mail root anytime"
"E-mail root first shift"
"Critical notifications"
"Generate SNMP trap"
lsresponse -U
The
output will look like this: ResponseName Node Locked
"Broadcast event on-shift" "nodeA" "No"
"E-mail root off-shift" "nodeA" "No"
"E-mail root anytime" "nodeA" "No"
"Log event anytime" "nodeA" "No"
"Informational notifications" "nodeA" "No"
"Warning notifications" "nodeA" "No"
"Critical notifications" "nodeA" "No"
"Generate SNMP trap" "nodeA" "No"
lsresponse "Critical notifications"
The
output will look like this: ResponseName = "Critical notifications"
Node = "nodeA"
Action = "Log Critical Event"
DaysOfWeek = 1+2+7
TimeOfDay = 0000-2400
ActionScript = "/usr/sbin/rsct/bin/logevent /tmp/criticalEvents"
ReturnCode = 0
CheckReturnCode = "y"
EventType = "b"
StandardOut = "y"
EnvironmentVars = '"Env1=5","Env=10"'
UndefRes = "n"
ResponseName = "Critical notifications"
Node = "nodeA"
Action = "E-mail root"
DaysOfWeek = 6+2,6+2,6+5
TimeOfDay = 1700-2400,0000-0800,0000-2400
ActionScript = "/usr/sbin/rsct/bin/notifyevent root"
ReturnCode = 0
CheckReturnCode = "y"
EventType = "b"
StandardOut = "y"
EnvironmentVars = ""
UndefRes = "n"
lsresponse -C "Critical notifications"
The
output will look like this: mkresponse -n "Log Critical Event" -d 1+2+7 -t 0000-2400 \
-s "usr/sbin/rsct/bin/logevent /tmp/criticalEvents" \
-e b -r 0 "Critical notifications"
lsresponse "E-mail"
The
output will look like this: ResponseName = "E-mail root anytime"
Action = "E-mail root"
⋮
ResponseName = "E-mail root first shift"
Action = "E-mail root"