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

Commands Reference, Volume 3


lsresponse Command

Purpose

Lists information about one or more responses.

Syntax

lsresponse [-h] [-A] [-C | -l | -t | -d | -D Delimiter] [-q ] [-x] [-T] [-V] [Response [Response... ]]

Description

The lsresponse command lists information about defined responses. The following information about the response is included:

Action
Name of an action.

ActionScript
The script or command to run for the action.

CheckReturnCode
Indicates if the actual return code for ActionScript is compared to its expected return code. The character 'y' is for yes and 'n' is for no.

DaysOfWeek

The days of the week when the action is allowed to be run. Days_of_week and Time_of_day together define the interval when the action can be run.

The numbers of the days can be separated by a plus sign (+) or displayed as a range of days separated by a hyphen (-). If there is more than one Days_of_week, they are separated by a comma (,). The number of Days_of_week matches the number of Time_of_day. The numbers of the days follow:

1
Sunday

2
Monday

3
Tuesday

4
Wednesday

5
Thursday

6
Friday

7
Saturday

EventType
The type of event that causes the action to be run; event, rearm event, or both.

Name
Name of the response.

ReturnCode
The expected return code for ActionScript.

StandardOut
Indicates if standard output is directed to the audit log. The character 'y' is for yes and 'n' is for no.

TimeOfDay

The time range when Action can be run, consisting of the start time followed by the end time separated by a hyphen. Days_of_week and Time_of_day 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. The start time must be less than the end time because the time is specified by day of the week. If there is more than one Time_of_day, they are separated by a comma (,). The number of Days_of_week matches the number of Time_of_day.

To get a list of all response names, enter 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. 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 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 that the responses are entered.

Parameters

Response
Name of the response whose information we want to list. Additional response names may also be supplied.

Flags

-A
Displays all of the attributes linked with the response names.

-C
Outputs the mkresponse command that can be used to create the response and one of its actions. If more than one response is specified, every mkresponse command appears on a separate line. This flag is ignored when no responses are specified.

-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 (:). For example, when the data to be displayed contains colons, use this flag to specify another delimiter of one or more characters.

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

-l
Specifies long formatted output. Displays the response information on separate lines.

-q
Does not return an error when Response does not exist.

-t
Specifies tabular formatted output. The response information is displayed in separate columns.

-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 headers when 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 that was based on faulty command line input.

Examples

  1. To list general information about the response "Critical notifications", type:
    lsresponse "Critical notifications"
     
    
    Output is similar to:
    Name             = "Critical notifications"                      
    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"                                
     
    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"
    
  2. To list all of the responses, type:
    lsresponse 
    
    Output is similar to:
    Name                       
    "E-mail root anytime"
    "E-mail root first shift"
    "Critical notifications"  
    
  3. To list the command that would create the response "Critical notifications" along with one of its actions, type:
    lsresponse -C "Critical notifications"
    
    Output is similar to:
    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"
    

Files


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

Related Information

The chresponse, lscondresp, mkcondresp, mkresponse, rmresponse commands.

The rmccli General Information file.

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


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