[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

822.0. "auto enable alarms for iconic map PM ?" by MFRNW1::SCHUSTER (Karl Schuster @MFR Network Services) Thu Mar 21 1991 15:03

    I have created about 25 alarm rules with FCL.
    
    For those 25 rules I want to have notification on the iconic map.
    Notification of an alarm works, if I explicitly enable the alarm
    rule during my session. Enabling all 25 alarm rules in Decwindows
    lasts a long time. What can I do that they get all automaticly
    enabled for my session (When I create the rule interactively
    in the iconic map, then there is a auto enable flag).
    
    ENABLE the alarm with MCC_INIT does not work.
    
    Regards,
    Karl
T.RTitleUserPersonal
Name
DateLines
822.1Once you know how, it's simpleBIKINI::KRAUSERobert, TSSC-NaC @MUHFri Mar 22 1991 10:1120
    Hello Karl,

    after experimenting a bit I found that I've been thinking
    too complicated. It's so simple!

    Just create a batch job to enable all your alarm rules and
    keep MCC running (discussed elsewhere in this conference).
    Then start the iconic map and enable notification (can be
    done by default using the customize menu).

    The manual states that an alarm rule has to be enabled only
    once per node. I don't know how this is implemented (global
    sections?) but it works like a charm!

    BTW: MCC_INIT is only run by the FCL PM. It has no effect on
    the iconic map.

    Regards,

    Robert
822.2procedureTOOK::CALLANDERSat Mar 23 1991 15:5013
    I have a com procedure, that if you are interested I can post here, the
    procedure enables the rules in the background and then does a show
    command using the AT clause to keep the MCC session open. The AT is
    setup so that it keeps the session open for one week. It then exits
    back to the batch jobs, prints some log information to a file, and then
    restarts, and re-enables the alarms again.
    
    I do this to avoid the chance that any of the rules may have memory
    leaks, and I would rather reclaim the memory nicely instead of havin
    the app crash --- like any application, if you leave it open to long
    you usually lose some memory....
    
    
822.3yes pleaseSEDSWS::BAKERPaul Baker, UK Product and Technology Group - 844 3311Mon Mar 25 1991 06:377
    
    Yes please, Jill, can you post the .com file - it could save me a lot
    of work generating my own.
    
    Thanks,
    
    Paul.
822.4alarm: batch ok, map problemMFRNW1::SCHUSTERKarl Schuster @MFR Network ServicesMon Mar 25 1991 07:4818
    Jill, please post the .COM file for us.
    
    Meanwhile I tried alarming in batch with a .com file. The alarms
    are enabled and work in the background. But I cant see any colour
    changes on my iconic map. I get colour changes on my map only, if I
    explicitly enable a rule in the map.
    
    My .com file looks like this:
    enable mcc 0 alarms rule <rule1>, in domain <domain>
    		......
    enable mcc 0 alarms rule <rule25>, in domain <domain>
    show mcc 0 alarms rule * state, to file=<file>, at every 12:00:00 -
      until +7:00:00
    
    Conclusion: my alarm rules run in batch, but notification is not
    done to my map.
    
    Karl
822.5with batch o.k.MFRNW1::SCHUSTERKarl Schuster @MFR Network ServicesMon Mar 25 1991 14:208
    Now it works !
    
    The alarm rules have to run successfully in the background batch process.
    Notification has to be enabled via FILE and CUSTOMIZE MAP.
    
    I was just confused, because when I do a show alarms rule in the
    iconic map, the rules stay DISABLED for the map. The
    colourchange on the map comes from the batch process.
822.6explicit notif startupTOOK::HAOTue Mar 26 1991 12:2216
    re .5
    
    Yes, sorry about the confusion.  In order to get color changes on
    the Iconic Map, you have to explicitly start notification which is
    separate from enabling alarm rules.
    
    The part about seeing the alarm rules being disabled yet being able
    to see color change in the Iconic Map PM is a weird situation that
    occurs in the current version of MCC.  I'm not sure when it will be
    fixed.  Basically, the problem is that notification from the Iconic Map
    uses the Event Manager, which is system-wide; therefore, it picked up
    alarm notification events from your batch process.  The "show alarm
    rule" data is only process-wide, namely the Iconic Map session.
    
    Christine
    
822.7MCC_REPEAT_DOMAIN_RULE_EVAL.COMTOOK::CALLANDERTue Mar 26 1991 13:40137
***
PLEASE NOTE THAT YOU WILL HAVE TO READ AN MODIFY THIS FILE TO MEET YOUR
NEEDS.
***

$!
$! MCC_REPEAT_DOMAIN_RULE_EVAL.COM
$!
$! This is an example command procedure that will keep your alarms evaluating
$! for a month. The month limit is an arbitrary number.
$!
$! The procedure takes one optional input argument, this argument can be
$! either a "C" or a "D". A "C" means that the rules need to be created,
$! a "D" means to delete any rules already existing by the names we are
$! using and to recreate the rules.
$!
$! Once the rules are set up (set up is omitted if no parameter is passed into
$! the procedure) then the loop starts. The procedure will set up MCC
$! to enable the rule and run for 7 days. After 7 days MCC will exit and
$! be restarted. This will happen 4 times before the procedures exits. 
$!
$! If an error occurs, premature exit from MCC, it will automatically loop
$! back and restart MCC again.
$!
$!
$! PSUEDO CODE
$!
$!  initialize COUNT to 0
$!  Check input argument
$!  if input arg = NULL goto START_LOOP
$!  else if input arg = Delete goto DELETE_RECREATE
$!      else if input arg = Create goto CREATE_NEW
$!          else goto BAD_INPUT
$!  DELETE_RECREATE
$!      delete the test rule
$!  CREATE_NEW
$!      create the test rule
$!  START_LOOP
$!      start up MCC
$!      undefine symbols just in case
$!      enable rule
$!      check state of rule every 24 hours for 7 days
$!      exit MCC
$!  if COUNT < 4 
$!      goto START_LOOP
$!  else
$!      done
$!  BAD_INPUT
$!      print error and exit
$!
$!
$!
$! ASSOCIATED FILES
$!
$!      DAILY_RULES.LIS -- output file listing the state of all defined rules
$!                         a new version is created every 7 days
$!
$!      EVALUATION_TRIGGER.COM
$!                      -- this is the command procedure to be run each time
$!                         the rule fires
$!
$!                         the rule is set up to check the state of the rule
$!                         and as long as the rule is enabled it will fire
$!                         every 24 hours, this is controled by the AT clause
$!                         in the expression.
$!
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$   COUNT = 0
$   DEFINE $TRAINING DUA0:[TRAINING]
$!
$   IF "''p1'" .eqs. "" THEN GOTO START_LOOP
$   IF "''p1'" .eqs. "D" THEN GOTO DELETE_RECREATE
$   IF "''p1'" .eqs. "C" THEN GOTO CREATE_NEW
$      GOTO BAD_INPUT
$!
$ DELETE_RECREATE:
$!
$   on error then goto ERROR_CONTINUE
$   MANAGE/ENTERPRISE/INTERFACE=CHARACTER_CELL
        DELETE DOMAIN X RULE TEST1
        EXIT
$!
$ CREATE_NEW:
$!
$   on error then goto ERROR_CONTINUE
$   MANAGE/ENTERPRISE/INTERFACE=CHARACTER_CELL
        CREATE DOMAIN X RULE TEST1 -
            EXPRESS = ( DOMAIN X RULE TEST1 STATE = ENABLED, -
                           AT START=(NOW) EVERY 23:59: ), -
            PROCEDURE = $TRAINING:EVALUATION_TRIGGER.COM
        EXIT
$!
$ START_LOOP:
$!
$   on error then goto ERROR_CONTINUE
$   MANAGE/ENTERPRISE/INTERFACE=CHARACTER_CELL
        UNDEFINE ALARMS
        UNDEFINE RULES
        ENABLE DOMAIN X RULE TEST1
! Here is where you would insert your enable directives
        SHOW DOMAIN X RULE * STATE, TO FILE = $TRAINING:DAILY_RULE.LIS, -
            AT EVERY 23:59: UNTIL +7-::
        EXIT
$!
$   COUNT=COUNT+1
$   IF COUNT .eqs. 4 THEN GOTO DONE
$!
$   GOTO START_LOOP
$!
$ ERROR_CONTINUE:
$!
$   COUNT=COUNT+1
$   IF COUNT .eqs. 4 THEN GOTO DONE
$!  ELSE
$       WRITE SYS$OUTPUT "An ERROR occurred; restarting DECmcc"
$       GOTO START_LOOP
$!
$ DONE:
$!
$   EXIT
$!
$ BAD_INPUT:
$   WRITE SYS$OUTPUT "Input argument can be a `C'reate, `D'elete, or none"
$   EXIT
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$! This procedure can be easily modified to enable all rules by specifying
$! your enable commands in the START_LOOP. Removing of the COUNT argument
$! will allow the procedure to run continuously, instead of only 4 weeks.
$!
$! Note that the TO qualifer is used on the show state command. This file
$! is opened and closed between each write. Therefore a procedure can
$! be written to send the file, through mail, on a daily basis to the
$! person responsible for monitoring the status of the background process.