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

Commands Reference, Volume 1


chresponse Command

Purpose

Adds or deletes the actions of a response or renames a response.

Syntax

chresponse [-h] -a -n Action [-d Days_of_week[,Days_of_week...]] [-t Time_of_day[,Time_of_day...]] -s Action_script [-r Return_Code] [-e a | r | b] [-o] [-T] [-V] Response

chresponse [-h] -p -n Action [-T] [-V] Response

chresponse [-h] -c New_response [-T] [-V] Response

Description

chresponse [-h] -a -n Action [-d Days_of_week[,Days_of_week...]] [-t Time_of_day[,Time_of_day...]] -s Action_script [-r Return_Code] [-e a | r | b] [-o] [-T] [-V] Response

chresponse [-h] -p -n Action [-T] [-V] Response

chresponse [-h] -c New_response [-T] [-V] Response

Parameters

Response
The name of the response to be changed.

Flags

-a
Adds the action specification to Response.

-c New_response
Specifies a new name to assign to the response. The new name must not already exist. The new name replaces the current name.

-d Days_of_week

Specifies the days of the week when the action being defined can be run. Days_of_week and Time_of_day together define the interval when the action can be run.

Enter the numbers of the days separated by a plus sign (+) or as a range of days separated by a hyphen (-). More than one Days_of_week parameter can be specified, but the parameters must be separated by a comma(,). The number of Days_of_week parameters specified must match the number of Time_of_day parameters specified. The default is all days. If no value is specified but a comma is entered, the default value is used. The numbers of the days follow:

1
Sunday

2
Monday

3
Tuesday

4
Wednesday

5
Thursday

6
Friday

7
Saturday

-e a | r | b
Specifies the type of event that causes the action being defined to run:

a
Event

r
Rearm event

b
Both event and rearm event

The default is event (a flag).

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

-n Action
Specifies the name of the action. When the -a flag is used, this is the name of the action being defined. When the -p flag is used, this is the name of the action to be deleted. Action names must be unique within a response. Only one action can be defined at a time.

-o
Directs all standard output from Action_script to the audit log. The default is not to keep standard output. Standard error is always directed to the audit log.

-p
Deletes Action from Response.

-r Return_code
Specifies the expected return code for Action_script. The actual return code of Action_script is compared to the expected return code. A message is written to the audit log indicating whether they match. If the -r flag is not specified, the actual return code is written to the audit log, and no comparison is performed.

-s Action_script
Specifies the fully qualified path for the script or command to run for the action being defined. See the man pages for logevent, notifyevent, and wallevent for descriptions of predefined response scripts that are provided with the application.

-t Time_of_day
Specifies 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. More than one Time_of_day parameter can be specified, but the parameters must be separated by a comma (,). The number of Days_of_week parameters specified matches the number of Time_of_day parameters specified. The default is 0000-2400. If no value is specified but a comma is entered, the default value is used.

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

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.

Security

This command requires root authority.

Examples

  1. To delete the action named "E-mail root" from the response named "E-mail root anytime" ("E-mail root" cannot be the only action), type:
     chresponse -p -n "E-mail root"  "E-mail root anytime"
    
  2. To add the action named "E-mail root" to be used Monday through Friday from 8 am to 6 pm that uses the command /usr/sbin/rsct/bin/notifyevent root, that saves standard output in the audit log, and that expects return code 5 from the action to the response "E-mail root any time", type:
    chresponse  -a  -n "E-mail root" -d 2-6 -t 0800-1800 \       
    -s "/usr/sbin/rsct/bin/notifyevent root" -o  -r 5  \       
    "E-mail root anytime"
    
  3. To rename the response "E-mail root anytime" to "E-mail root and admin any time", type:
    chresponse  -c "E-mail root and admin anytime"   "E-mail root anytime" 
    

Files


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

Related Information

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

The rmccli General Information file.

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


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