[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

1524.0. "MCC job takes excessive CPU time" by WELCLU::CRIDDLE (Graham Criddle, DS Tech Consultant, 853-4015) Thu Sep 19 1991 09:25

    Hi..
    
    I have a batch job which resubmits itself to run at 23:00 each night to
    automatically enable MCC alarms.
    
    It operates basically like this:
    
    - Resubmit for the next night
    - MAN/ENT
    	@rules_needed		! the rules to enable (29 in 3 domains)
    	show mcc 0 alarms rule * all status, at start = (+23:59:00) ,-
    		 in domain 'domain name' 
    	disable the rules
    	exit
    - exit
    
    which enables the rules, waits for a day and then exits.
    
    This has been working fine for the week or so since I started running
    it and used in the order of 2 minutes CPU time in the 24 hours it took
    to run.
    
    Yesterday I changed it so that instead of the 'show mcc 0 alarms...'
    line it called a command procedure:
    
    @alarms_wait.com
    
    which contained the line
    
    show mcc 0 alarms rule * all status, at start = (tomorrow+0-23:30) ,-
    	in domain = 'domain name'
    
    
    This time whin I came in this morning the MCC_MAIN image was using an
    excessive amount of CPU time.
    Looking at the log file for the batch job the last line executed was
    the call to the command procedure to execute the delayed show command
    as I would have expected.
    I had to delete the job, and it had consumed 9:48:58 hours of CPU time
    in 10:10:13 hours of elapsed time.
    
    
    Any thoughts on this??
    Rgds,
    Graham
T.RTitleUserPersonal
Name
DateLines
1524.1file still openTOOK::CALLANDERMCC = My Constant CompanionTue Sep 24 1991 17:4916
my guess is that since the delay was inside of the command file, that the
fcl is opening the file for the read, and with the file in a still open
state, it is now waiting for the command to be allowed to execute. potential
problems could exist depending upon your open file limit (which could be
causing the alarms module to thrash in its' attempt to open the data
files that it uses). 

It is definitely better for the overall operation of the system to put the
wait outside of the command procedure. I can understand the desire for the
com file (so you can change the content without haveing to touch the batch
job), but simply put the show at start in the main procedure and then
call the command file.

(BTW: what is your open file limit?)

jill
1524.2Reasons for approach.WELCLU::CRIDDLEGraham Criddle, DS Tech Consultant, 853-4015Wed Sep 25 1991 12:0731
    Hi, Jill..
    
    Thanks for the input.
    
    My file limit is 400.
    
    I see what you are saying about doing the SHOW inside FCL as opposed to
    inside a command procedure but it was the only way I could think of to
    do what I wanted to do.
    
    I want this job to run until 23:30 each night irrespective of when it
    starts.
    If I use delta time it will run for a fixed length of time and so the
    end time is dependent on the start time which is not what I wanted.
    If I use absolute time and say 23:30:00 as my end point, it is possible
    for the job to not get submitted until say 23:45 (due to pending batch
    jobs or system reboot) and then the time condition to be satisfied at
    once, and thus the job will terminate prematurely.
    
    The command procedure I use to determine the SHOW timing uses either
    23:30:00 or TOMORROW+0-23:30 depending on when the job is submitted and
    this decision is taken at the top of my batch job in a bit of DCL.
    
    Is there anyway in which I can achieve what I am trying to do in
    another way?
    
    Rgds,
    Graham
    
    PS. Since the reported problem, this job has been running without fail
    every night.
1524.3NSSG::R_SPENCENets don't fail me now...Wed Sep 25 1991 13:047
    Gee, all I do is put a
    
    MCC> show mcc 0 all char, at start=tomorrow    !at midnight
    
    and then exit and resubmit the job. Won't this do?
    
    s/rob
1524.4tommorrowTOOK::CALLANDERMCC = My Constant CompanionWed Sep 25 1991 21:431
great suggestion! yes that is the prefferred mechanism.
1524.5ThanksWELCLU::CRIDDLEGraham Criddle, DS Tech Consultant, 853-4015Thu Sep 26 1991 11:507
    Ok, thanks...
    
    A lot simpler that what I am doing...
    
    Rgds,
    Graham
    
1524.6BATCH_RULES.COMNSSG::R_SPENCENets don't fail me now...Thu Sep 26 1991 17:48120
Here is the proceedure I use. Try it.
    
    s/rob
    
    
    
$ REVISION  = "V1.0" ! 11-Sep-1991"
$ set noverify
$!
$!
$!***************************************************************************
$!*                                                                         *
$!*  COPYRIGHT (c) 1991 BY                                             *
$!*  DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS.                 *
$!*  ALL RIGHTS RESERVED.                                                   *
$!*                                                                         *
$!*  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED  *
$!*  ONLY IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE  *
$!*  INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR  ANY  OTHER  *
$!*  COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY  *
$!*  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE IS  HEREBY  *
$!*  TRANSFERRED.                                                           *
$!*                                                                         *
$!*  THE INFORMATION IN THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT NOTICE  *
$!*  AND  SHOULD  NOT  BE  CONSTRUED AS  A COMMITMENT BY DIGITAL EQUIPMENT  *
$!*  CORPORATION.                                                           *
$!*                                                                         *
$!*  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE  OR  RELIABILITY OF ITS  *
$!*  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.                *
$!*                                                                         *
$!*                                                                         *
$!***************************************************************************
$!
$!++
$! Facility:	DECmcc Director Alarms Tools
$!
$! Module:	BATCH_MCC_ALARMS.COM
$!
$! Abstract:	
$!
$! Inputs:    P1 optionally contains name of domain for rules. If left
$!		out, then all rules will be enabled.
$!
$! Outputs:      SYS$SCRATCH:MCC_ENABLE_ALL_RULES.COM
$!		 SYS$LOGIN:BATCH_RULES_ENABLE_ALL.COM
$!		DECmcc Procedure that will enable all wanted rules for
$!		production use.
$!
$! Dependancies: MCC_READ_RULES.COM
$!		This file should be in the same directory as BATCH_RULES.COM
$!
$! Author:	Rob Spence
$!
$! Created:	July 1991
$!
$! Modified by:
$!
$!	X1.0	RJS		Rob Spence		19-Jul-1991
$!		First Baselevel
$!
$!	V1.0	RJS		Rob Spence		11-Sep-1991
$!		Add use of MCC_READ_RULES.COM to enable rules.
$!
$!
$! Tested on VMS V5.3-1, V5.3-2
$!
$! Usage:
$!	Submit to Batch to enable ALL alarm rules in this instance of
$!	DECmcc. Will exit and re-enable rules periodically to permit
$!	production rules to be changed or updated as needed.
$!----------------------------------------------------------------------------
$! Initialization
$ set noon
$ set output_rate=0:15
$ NODE              = f$getsyi("nodename")
$ if node .eqs. "" then
  NODE              = f$trnlmn("SYS$NODE")
$ PID               = f$getjpi("0","PID")
$ vms_version       = f$getsyi("VERSION")
$ hardware          = f$getsyi("HW_NAME")
$!
$ procedure_file    = -
F$ENVIRONMENT("PROCEDURE") - f$parse(F$ENVIRONMENT("PROCEDURE"),,,"VERSION")
$ procedure_log     = procedure_file - ".COM" + ".LOG"
$ procedure_dir     = f$parse(F$ENVIRONMENT("PROCEDURE"),,,"DEVICE") -
			+f$parse(F$ENVIRONMENT("PROCEDURE"),,,"DIRECTORY")
$!
$! Verify DCL commands are as expected
$ copy             := copy
$ purge            := purge
$ delete           := delete/nolog
$ submit           := submit
$!
$ wo               := write sys$output
$ we               := write sys$error
$!
$ wo "BATCH_RULES ''revision'  ''f$time()',"
$ wo "          on node ''node', a ''hardware', running VMS ''vms_version'"
$!
$main:
$! Read out the rules that are to be enabled.
$ @'procedure_dir'MCC_READ_RULES
$!
$ copy -
	 SYS$SCRATCH:MCC_ENABLE_ALL_RULES.COM -
	 SYS$LOGIN:BATCH_RULES_ENABLE_ALL.COM
$!
$Manage/Enterprise
	do sys$login:batch_rules_enable_all
!	show mcc 0 all char, at start=tomorrow    !at midnight
	show mcc 0 all char, at start +01:00:00   !every 1 hour
    exit  !This will disable the rules cleanly
$!
$clean_up:
$ show time
$ purge/log/keep=10 'procedure_log'
$ purge/log/keep=5 SYS$LOGIN:BATCH_RULES_ENABLE_ALL.COM
$ purge/log/keep=7 SYS$SCRATCH:MCC_ENABLE_ALL_RULES.COM
$ submit/noprint/keep/restart 'procedure_file'
$exit
1524.7wanna be moderator Rob?TOOK::CALLANDERMCC = My Constant CompanionThu Sep 26 1991 19:005
    And now you know why Rob is joining MCC as a team member....
    
    So I don't have to keep up with the notes so much ;->