[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Commands Reference, Volume 1
chcondition Command
Purpose
Changes
any of the attributes of a defined condition.
Syntax
chcondition [-c new_condition] [-r resource_class] [-e event_expression]
[-E rearm_expression] [-d event_description] [-D rearm_description]
[-m l | m | p ] [-n node_name1[,node_name2...]] [-s "selection_string"]
[-S c | w | i ] [-h] [-TV] condition[:node_name]
Description
The chcondition command changes the attributes of a defined condition
to the values supplied. If the name of the condition is changed using the -c flag, any links
with responses remain intact.
Flags
- -c new_condition
- Assigns a new name to the condition. The new name replaces the current
name. The new_condition name is a character string that identifies
the condition. If the name contains spaces, it must be enclosed in quotation
marks. A name cannot consist of all spaces, be null, or contain embedded
double quotation marks.
- -r resource_class
- Specifies which resource class this condition will monitor. The lsrsrcdef command can be used to list the resource class names.
- -e event_expression
- Specifies an event expression. The event expression determines when
an event occurs. It includes a dynamic property of the resource_class with a mathematical
comparison symbol (> or <, for example) and a constant.
When this expression evaluates to TRUE, an event is generated.
- -E rearm_expression
- Specifies a rearm expression. After the event_expression has
evaluated to TRUE and an event is generated, the rearm expression determines
when monitoring for the event_expression begins again. Typically,
the rearm expression prevents multiple events from being generated for the
same event evaluation. The rearm expression includes a dynamic attribute
of the resource_class with a mathematical comparison symbol (>, for example) and a constant.
- -d event_description
- Specifies a user-supplied text that describes the event expression.
- -D rearm_description
- Specifies a user-supplied text that describes the rearm expression.
- -s "selection_string"
- Specifies a selection string that is applied to all of the resource_class attributes to determine which resources event_expression should
monitor. The default is to monitor all resources within resource_class. The selection string must be enclosed within double or single quotation
marks. For information on how to specify selection strings, see RSCT Guide and Reference.
- -S c | w | i
- Specifies the severity of the event:
- c
- Critical.
- w
- Warning.
- i
- Informational. This is the default.
- -m l | m | p
- Specifies the management scope to which the condition applies. The management
scope determines how the condition is registered and how the selection string
is evaluated. The scope can be different from the current configuration, but
monitoring cannot be started until an appropriate scope is selected. The
valid values are:
- l
- Specifies local scope. The condition applies
only to the local node (the node where the condition is defined). Only the
local node is used in evaluating the selection string.
- m
- Specifies management domain scope. The condition
applies to the management domain in which the node where the condition is
defined belongs. All nodes in the management domain are used in evaluating
the selection string. The node where the condition is defined must be the
management server in order to use management domain scope.
- p
- Specifies peer domain scope. The condition applies
to the peer domain in which the node where the condition is defined belongs.
All nodes in the peer domain are used in evaluating the selection string.
- -n node_name1[,node_name2...]
- Specifies the host name for a node (or a list of host names separated
by commas for multiple nodes) where this condition will be monitored. You
must specify the -m flag with a value of m or p if you want to use
the -n flag.
This way, you can monitor conditions on specific nodes instead of the entire
domain.
- -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
- condition
- Specifies the name of an existing condition that is defined on node_name.
- node_name
- Specifies the node in a domain 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 of the chcondition command needs write permission to
the IBM.Condition resource class on the node where the condition
is defined. Permissions are specified in the access control list (ACL) file
on the contacted system. See 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:
- To change the condition name from "FileSystem space used" to "Watch FileSystem
space", run this command:
chcondition -c "Watch FileSystem space" "FileSystem space used"
- To change a rearm expression and rearm description for a condition with
the name "tmp space used", run this command:
chcondition -E "PercentTotUsed < 80" \
-D "Start monitoring tmp again after it is less than 80 percent full" \
"tmp space used"
In these examples, which apply to management domains, the node where the
command is run is on the management server.
- To change the condition with the name "FileSystem space used" on the management
server to check for space usage that is greater than 95%, run this command:
chcondition -e "PercentTotUsed > 95" "FileSystem space used"
- To change the condition with the name "NodeB FileSystem space used" on NodeB to check for space usage that is greater than 95%, run this command:
chcondition -e "PercentTotUsed > 95" \
"NodeB FileSystem space used":NodeB
This example applies to a peer domain:
- To change the condition defined on NodeA with the name "FileSystem
space used" to check for space usage that is greater than 95%, run this command:
chcondition -e "PercentTotUsed > 95" \
"FileSystem space used":NodeA
Location
- /usr/sbin/rsct/bin/chcondition
- Contains the chcondition command
Related Information
ERRM commands: lscondition, lscondresp, mkcondition, rmcondition
Files: rmccli
Books: see the RSCT Guide and Reference for more information about ERRM operations and about how to use
expressions and selection strings
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]