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

Commands Reference, Volume 3


mkcondition Command

Purpose

Creates a new condition definition which can be monitored.

Syntax

mkcondition [-h] -r Resource_class -e Event_expression [-E Rearm_expression] [-d Event_description] [-D Rearm_description] [-n Node_name[,Node_name...]] [-s "Selection_string"] [-S c | w | i] [-T] [-V] Condition

mkcondition [-h] -c Existing_condition [-r Resource_class] [-e Event_expression] [-E Rearm_expression] [-d Event_description] [-D Rearm_description] [-n Node_name[,Node_name...]] [-s "Selection_string"] [-S c | w | i] [-T] [-V] Condition

Description

The mkcondition command creates a new condition with the name specified by the Condition parameter. The condition is used to monitor a resource for the occurrence of the condition (or event). One or more responses to an event can be defined by using the mkresponse command. The conditions can then be linked to the responses by using the mkcondresp command, or by using the startcondresp command to link responses and start monitoring.

Parameters

Condition
The unique name of the new condition to be created.

Flags

-c Existing_condition
Copy an existing condition. If any other flags are specified, update the new condition as indicated by the flags. Links with responses are not copied.

-d Event_description
Specifies user-supplied text that describes the event expression.

-D Rearm_description
Specifies user-supplied text that describes the rearm expression.

-e Event_expression
Specifies the event expression, which determines when an event occurs. It includes a dynamic attribute of the Resource_class with a mathematical comparison symbol (for example, >, <) and a constant. When this expression evaluates to TRUE, an event is generated.

-E Rearm_expression
Specifies the 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.

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

-n Node_name
Specifies the host name for a node or list of host names for a list of nodes, separated by commas, where this condition is registered. The default is the local node. Use asterisk (*) to register the condition on all nodes defined in the ManagedNode resource class.

Attention: This flag is not supported on AIX 5.1.

-r Resource_class
Specifies the resource class to be monitored by this condition. The lsrsrcdef command can be used to list the resource-class names.

-s "Selection_string"
Specifies a selection string that is applied to all of the Resource_class attributes to determine which resources should be monitored by the Event_expression. The default is to monitor all resources within the Resource_class. The selection string must be enclosed within double or single quotation marks. For information on how to specify selection strings, see "Using Expressions" in the chapter "Using the Monitoring Application" of the RSCT 2.2 Resource Monitoring and Control Guide and Reference.

-S c | w | i
Specifies the severity of the event:

c
Critical

w
Warning

i
Informational

The default is i.

-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 define a condition with the name "JFS space used up" to check for percentage of space used greater than 90% and to rearm when the percentage is back down below 85%, type:
    mkcondition -r IBM.FileSystem  \                    
    -e "PercentTotUsed > 90" -E "PercentTotUsed < 85" \       
    "JFS space used up"
     
    
  2. To define a condition with the name "tmp space used up" to check for percentage of space used greater than 90% for /tmp and to rearm when the percentage is back down below 85%, including comments, type:
    mkcondition -r IBM.FileSystem  \                    
    -e "PercentTotUsed > 90" -E "PercentTotUsed < 85" \          
    -d "Generate event when tmp > 90% full"  \                    
    -D "Restart monitoring tmp again after back down < 85% full"\ 
    -s 'Name=="/tmp"'  "tmp space used up"
    
  3. To define a condition with the name "Space used up" as a copy of "JFS space used up", type:
    mkcondition -c "JFS space used up"  "Space used up"
    
  4. To define a condition with the name "var space used up" as a copy of "tmp space used up", but change the selection to /var, type:
    mkcondition -c "tmp space used up" -s 'Name=="/var"' \    
    "var space used up"
    

Files


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

Related Information

The chcondition, lscondition, mkcondresp, mkresponse, rmcondition, startcondresp commands.

The rmccli General Information file.

The RSCT 2.2 Resource Monitoring and Control Guide and Reference contains more information regarding Event Response operations and information on how to use expressions and selection strings.


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