Modifying a condition

To modify a condition, you use the chcondition command.

Because the chcondition command uses the same flags as the mkcondition command, you need only supply the chcondition command with the name of the condition to change and any changes you want to make.

Examples:
  • To modify the event expression and event description of the "/var space used" condition, you would use the -e and -d flags:
    chcondition  -e "PercentTotUsed > 85" -d "An event 
    will be generated when more than 85 percent" "/var space used"
  • To modify the rearm event expression and rearm description, you would use the -E and -D flags:
    chcondition -E "PercentTotUsed < 70" -D "The event will be 
    rearmed when the percent of the space used in the /var directory falls below 70 
    percent." "/var space used"
  • To modify the condition's selection string expression, you would use the -s flag:
    chcondition -s "Name == \"/usr\"" "/var space used"
    
  • To rename a condition, you would use the -c flag. For instance, the condition in the preceding examples should probably not be called "/var space used" anymore, since the selection string has been modified so that the condition applies to the /usr file system. To change the name of this condition from "/var space used" to "/usr space used", you would enter:
    chcondition -c "/usr space used" "/var space used"

You will not be able to modify a condition that is locked. Instead, the chcondition command will generate an error informing you that the condition is locked. For more information on unlocking a condition so it can be modified, see Locking and unlocking conditions, compound conditions, responses, and condition/response links.

For detailed syntax information on the chcondition command, see its online man page.