From:	CSBVAX::MRGATE!MIKE@uhvax1.uh.edu@SMTP  7-APR-1988 20:42
To:	ARISIA::EVERHART
Subj:	No dumps during normal shutdown


Received: from uhvax1.uh.edu by KL.SRI.COM with TCP; Wed 6 Apr 88 10:02:41-PDT
Date: Wed, 6 Apr 88 11:35 CST
From: MIKE@uhvax1.uh.edu
Subject: No dumps during normal shutdown
To: info-vax@kl.sri.com
X-VMS-To: IN%"info-vax@kl.sri.com"

I have been experimenting with different settings of the EXE$V_BUGDUMP bit in
the longword EXE$GL_FLAGS.  A week ago I inquired on INFO-VAX if anyone knew of
any side effects of turning this bit off.  All of the answers matched my
suspicions, so now I would like to tell what I have learned:

The EXE$V_BUGDUMP bit in EXE$GL_FLAGS corresponds to the SYSGEN parameter
DUMPBUG (they really are BUGDUMP/DUMPBUG).  The SYSGEN parameter DUMPBUG is
used to tell your VMS system whether or not is should write a dump file if a
BUGCHECK is executed.  DUMPBUG is not "dynamic"; therefore you cannot disable
your VMS system from taking a dump after you have booted with this bit on. 

Now we at the University of Houston like to look at VMS dumps when we think
there is a problem.  What we don't like is to watch the RA81 "Ready" light on
the common system disk blink for 20 or so minutes while our 5 systems do a
normal cluster shutdown (they are all writing their dump files at once, to one
drive).  Since there is no way (yet) to tell VMS to dump anywhere but on the
system disk, I thought it would be nice to be able to not take a dump on a
"normal" "operator-requested" shutdown. 

So into the editor with SYS$SYSTEM:SHUTDOWN.COM.  It turns out that there are
several logical names defined right before the image OPCCRASH is run.  They all
start with OPC$, and one of them is OPC$NODUMP.  Upon reading the OPCCRASH
source, I found that all of the logical names *except* OPC$NODUMP are used
(looks like "in a future release of VAX/VMS"). 

After hitting this dead-end I decided to look into the EXE$V_BUGDUMP setting.
I wrote a small (~10 lines) MACRO program to turn this bit off, and edited
SYS$SYSTEM:SHUTDOWN.COM to run this program one line before running OPCCRASH.
We have been doing this for several weeks on two VAXClusters and two different
MicroVAXen with no ill results.  What you get is no dump during a normal
shutdown.  I checked with my local Digital software support, and after they
checked their sources, they also say it should work.

Now you may ask why didn't Digital just make the DUMPBUG parameter "dynamic".
I really don't think they would want you to be able to do the opposite; turn on
the dump-enable bit after you boot with it off.  That could get messy.

For any of you that want to do this, I am appending the source code.  You should
put the .EXE in SYS$something, because that the only file-system left around
at that point of the shutdown.  Then edit your SYS$SYSTEM:SHUTDOWN.COM,
inserting one line above the line:

$ RUN SYS$SYSTEM:OPCCRASH

the line:

$ RUN SYS$something:NODUMP

To build the program, you should enter:

$ MACRO NODUMP
$ LINK /EXE=SYS$something: NODUMP, SYS$SYSTEM:SYS.STB /SELECTIVE

Listing of NODUMP.MAR

---------------cut past here--------------
	.entry	bugdump,0

	movl	#1,r2
	ashl	#exe$v_bugdump,r2,r2
	$cmkrnl_s routin=stick,arglst=(ap)
	ret

stick:
	.word	^M<>
	bicl2	r2,g^exe$gl_flags
	movl	#ss$_normal,r0
	ret

	.end	bugdump
---------------cut above here-------------

Mike Frederick
University of Houston Computing Center
MIKE@UHVAX1
