From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 30-NOV-1989 11:10
To:	MRGATE::"ARISIA::EVERHART"
Subj:	PerfMeter V2.0 for DECWindows/VMS, Part 1 of 5 Parts

Received: From CRASH.CS.UMASS.EDU by GIZMO.SRI.COM with TCP; Thu, 30 NOV 89 06:32:36 PDT
Received: from vax5.cs.umass.edu by crash.cs.umass.edu (5.61/Ultrix2.0-B)
	id AA08095; Thu, 30 Nov 89 09:29:30 -0500
Message-Id: <8911301429.AA08095@crash.cs.umass.edu>
Date: Thu, 30 Nov 89 09:30 EST
From: "From the screen of Deneva...  30-Nov-1989 0929" <HELLER@cs.umass.EDU>
Subject: PerfMeter V2.0 for DECWindows/VMS, Part 1 of 5 Parts
To: info-vax@kl.sri.COM
X-Vms-To: coins::in%"info-vax@kl.sri.com"

......................... Cut between dotted lines and save ....................
$!..............................................................................
$!
$! VAX/VMS archive file created by VMS_SHAR Version:'09-Jun-1987'
$! Copyright (c) 1987, by Michael Bednarek
$! To unpack, simply execute (@) the file.
$! This archive was created by HELLER
$!      on Tuesday 28-NOV-1989 09:31:58.06
$! It contains the following file(s):
$! PFM020.RELEASE_NOTES KITINSTAL.COM DECWSHARLIBRARIES.OPT PERF_METER.HLP
$! PFM_STARTUP.COM PERF_METER_CONST.DAT PERF_METER.C PERF_METER.UIL MAKEFILE.
$! PERF_METER_CONST.H PERF_METER_CONST.UIL CPUDEF.H
$!==============================================================================
$! ATTENTION: To keep each article below 15872 bytes, this program
$!            has been transmitted in several parts.
$! You should concatenate ALL parts to ONE file and execute (@) that file.
$!==============================================================================
$ Set Symbol/Scope=(NoLocal,NoGlobal)
$ CR[0,8]=13
$ Pass_or_Failed="failed!,passed."
$ Goto Start
$Convert_File:
$ Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd
$No_Error1:Open/Write Out 'File_is
$ Open/Read In VMS_SHAR_DUMMY.DUMMY
$Next_Record: Read/End_Of_File=EOF In Record
$ Write Out F$Extract(1,255,Record)
$ Goto Next_Record
$EOF: Close Out
$ Close In
$ Delete VMS_SHAR_DUMMY.DUMMY;*
$ Checksum 'File_is
$ Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR
$ Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd
$No_Error2:Return
$Start:
$ File_is="PFM020.RELEASE_NOTES"
$ Check_Sum_is=1428121683
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X
X	Performance Meter Utility for DECWindows V2.0
X
X	(c) 1989 by Robert Heller
X
X	This utility displays performance indicators in a small DECWindows
Xwindow.  Included in the display is CPU busy, processor modes, and disk I/O
Xstatistics on the system device (SYS$SYSDEVICE) and a "local" disk (defined
Xby the logical PFM$LOCALDISK).
X
X	Differences from version V1.0:  Added paging statistics (faults,
Xpaging I/O, free page count, modified page count). Minor adjustments in
Xplacements of various widgets.
X
X	Differences from version V1.1:  Added changes suggested by Mark
XPizzolato - INFO COMM Computer Consulting, Redwood City, Ca,
Xmark@infopiz.UUCP or uunet!lupine!infopiz!mark:
X	- Compaction of the Modes Display to save window real estate.
X	- Respacing of the Counter Titles to allow user specified titles
X		(via logical names PFM$DEVICE_n_TITLE)
X	- Allowed up to 4 User Selected Devices to Monitor, selected by
X		defining PFM$DEVICE_n_NAME and PFM$DEVICE_n_TITLE
X	- Smoothed out the Counter Updates to remove the delayed flicker.
X	And fixed the X graphics contexts to use GXinvert instead of GXcopy,
Xto allow display visibity of reverse-background display setups (Suggested by
XChristopher Ho <chris%skat.usc.edu@usc.EDU>).
X
X
X	Contact info:			Robert Heller
X			InterNet:	Heller@cs.umass.edu
X			BIX:		locks.hill.bbs
X			FidoNet:	1:321/153.0
$ GoSub Convert_File
$ File_is="KITINSTAL.COM"
$ Check_Sum_is=2130717896
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X$!--------------------------------------------------------
X$!  KITINSTAL.COM - Kit Install procedure file for Perf Meter
X$!  Robert Heller Created on Tue Nov 14 08:30:10 1989
X$!   Last mod - 
X$!--------------------------------------------------------
X$!  Contents:
X$!--------------------------------------------------------
X$ on control_y then vmi$callback CONTROL_Y
X$ on error then exit $status
X$ if p1 .nes. "VMI$_INSTALL" then exit vmi$_unsupported
X$ type sys$input
X
X  Installation of Robert Heller's Perf Meter V2.0 (DECWindows utility)
X
X$ !
X$ ! Make sure that we have enough disk space to succeed and set up the
X$ ! environment.
X$ !
X$ pfm$peak = 250
X$ pfm$net  = 200
X$ !
X$ vmi$callback CHECK_NET_UTILIZATION pfm$ 'pfm$net'
X$ if .not. pfm$ then vmi$callback MESSAGE e noblocks -
X	"This kit requires ''pfm$net' additional blocks after installation."
X$ if .not. pfm$ then exit vmi$_failure
X$ vmi$callback SET safety conditional 'pfm$peak'
X$ vmi$callback set purge YES
X$ !
X$ ! Setup directories where files should go, and various other defaults.
X$ !
X$ pfm$exe_directory       == "SYS$SYSTEM:"
X$ pfm$dat_directory       == "SYS$LIBRARY:"
X$ pfm$helplib           == "SYS$HELP:HELPLIB.HLB"
X$ pfm$source_directory    == "SYS$SYSROOT:[PERF_METER_SOURCE]"
X$ pfm$create_helplib    == "FALSE"
X$ !
X$ ! Now verify each of these defaults and create directories, etc.
X$ !
X$exe_dir: ! first .EXE directory...
X$ vmi$callback ASK pfm$exe_directory "Directory to place .EXE files" -
X		'pfm$exe_directory' S "Enter a directory or a logical name"
X$ if F$PARSE(pfm$exe_directory) .nes. "" then GOTO exe_dir_ok
X$ !
X$ ! Exe directory does not exist.  See if we should make it.
X$ !
X$ vmi$callback MESSAGE w nodire -
X  "The directory for the .EXE files (''pfm$exe_directory') does not exist"
X$ vmi$callback ASK pfm$ok "Should I make this directory" Y B "Type Yes or No"
X$ if .not. pfm$ok then GOTO exe_dir
X$ vmi$callback create_directory user 'pfm$exe_directory'
X$exe_dir_ok:
X$dat_dir: ! first .EXE directory...
X$ vmi$callback ASK pfm$dat_directory "Directory to place data (.UID) files" -
X		'pfm$dat_directory' S "Enter a directory or a logical name"
X$ if F$PARSE(pfm$dat_directory) .nes. "" then GOTO dat_dir_ok
X$ !
X$ ! dat directory does not exist.  See if we should make it.
X$ !
X$ vmi$callback MESSAGE w nodire -
X  "The directory for the data files (''pfm$dat_directory') does not exist"
X$ vmi$callback ASK pfm$ok "Should I make this directory" Y B "Type Yes or No"
X$ if .not. pfm$ok then GOTO dat_dir
X$ vmi$callback create_directory user 'pfm$dat_directory'
X$dat_dir_ok:
X$helplib: ! third help library to use
X$ vmi$callback ASK pfm$helplib "Help library to place help text in" -
X		'pfm$helplib' S "Enter a help library name"
X$ pfm$helplib == f$parse(pfm$helplib,"SYS$HELP:HELPLIB.HLB",,,"SYNTAX_ONLY")
X$ if F$SEARCH(pfm$helplib) .nes. "" then GOTO helplib_ok
X$ !
X$ ! Help library does not exist.  See if we should make it.
X$ !
X$ pfm$helplibdire == f$parse(pfm$helplib,"","","device","syntax_only") + -
X  		       f$parse(pfm$helplib,"","","directory","syntax_only")
X$ if f$parse(pfm$helplibdire) .nes. "" then GOTO helplib_dir_ok
X$ !
X$ ! Helplib directory does not exist.  See if we should make it.
X$ !
X$ vmi$callback MESSAGE w nodire -
X  "The directory for the helplibrary (''pfm$helplibdire') does not exist"
X$ vmi$callback ASK pfm$ok "Should I make this directory" Y B "Type Yes or No"
X$ if .not. pfm$ok then GOTO helplib
X$ vmi$callback create_directory user 'pfm$helplibdire'
X$helplib_dir_ok:
X$ vmi$callback MESSAGE w nohelplib -
X  "The Help library (''pfm$helplib') does not exist"
X$ vmi$callback ASK pfm$ok "Should I make this help library" Y B "Type Yes or No"
X$ if .not. pfm$ok then GOTO helplib
X$ pfm$create_helplib == "TRUE"
X$helplib_ok:
X$ !
X$ ! Now see if the source code should be made available
X$ !
X$ vmi$callback ASK pfm$provide_sources -
X	"Do you want the source code to be available (about 110 blocks)" Y B -
X	"Type Yes or No"
X$ if .not. pfm$provide_sources then GOTO skip_source
X$source_dir: ! first source directory...
X$ vmi$callback ASK pfm$source_directory "Directory to place source files" -
X		'pfm$source_directory' S "Enter a directory or a logical name"
X$ if F$PARSE(pfm$source_directory) .nes. "" then GOTO source_dir_ok
X$ !
X$ ! source directory does not exist.  See if we should make it.
X$ !
X$ vmi$callback MESSAGE w nodire -
X  "The directory for the source files (''pfm$source_directory') does not exist"
X$ vmi$callback ASK pfm$ok "Should I make this directory" Y B "Type Yes or No"
X$ if .not. pfm$ok then GOTO source_dir
X$ vmi$callback create_directory user 'pfm$source_directory'
X$source_dir_ok:
X$skip_source:
X$ !
X$ ! Questions done.  Tell user he can go to lunch, etc.
X$ !
X$questions_done:
X$ say ""
X$ say "  No further questions will be asked during the installation."
X$!
X$! For all files in kit, 
X$!
X$!	Set file owner		= [1,4] (SYSTEM)
X$!	Set file protection	= (S:RWED, O:RWED, G:RWED, W:RE)
X$!
X$ on control_y then continue                                    
X$ on error then continue                                           
X$ set message/nofacility/noseverity/notext/noidentification
X$ set file/nolog/owner=[1,4]/protection=(S:RWED, O:RWED, G:RWED, W:RE)/truncate -
X	vmi$kwd:*.*;*
X$ set message/facility/severity/text/identification
X$ on error then exit $status
X$ on control_y then vmi$callback CONTROL_Y
X$
X$ !
X$ ! link the .EXE file
X$ !
X$ link /notraceback/nodebug/nodebug/nomap /exe=vmi$kwd:perf_meter.exe -
X	vmi$kwd:perf_meter.obj,DECWSHARLIBRARIES.OPT/opt,-
X	sys$system:sys.stb/selective
X$ !
X$ ! stash the files.
X$ !
X$ ! Executables:
X$ vmi$callback provide_image pfm$ perf_meter.exe    'pfm$exe_directory'
X$ ! UID file
X$ vmi$callback provide_file  pfm$ perf_meter.uid    'pfm$dat_directory'
X$ !
X$ ! update help library:
X$ !
X$ if pfm$create_helplib .eqs. "TRUE" then library/create/help 'pfm$helplib'
X$ vmi$callback UPDATE_LIBRARY 'pfm$helplib' pfm$ help "/replace" vmi$kwd:perf_meter.hlp
X$ !
X$ ! setup the startup file
X$ !
X$ open/write pfm$upd_scom vmi$kwd:pfm_updscom.com
X$ write pfm$upd_scom "$ edit/edt/nocommand/nojournal vmi$kwd:pfm_startup.com"
X$ write pfm$upd_scom "subs/$$EXE_DIRECTORY$$/",pfm$exe_directory,"/ whole"
X$ write pfm$upd_scom "subs/$$DAT_DIRECTORY$$/",pfm$dat_directory,"/ whole"
X$ write pfm$upd_scom "exit"
X$ write pfm$upd_scom "$ exit"
X$ close pfm$upd_scom
X$ @vmi$kwd:pfm_updscom.com/out=nl:
X$ !
X$ vmi$callback provide_file pfm$ pfm_startup.com sys$common:[sysmgr]
X$ vmi$callback set startup pfm_startup.com
X$ type sys$input:
X
XThe Perf_Meter program needs some system logical names defined.  A file named
Xpfm_STARTUP.COM will be placed in SYS$COMMON:[SYSMGR]. This file should be run
Xfrom SYS$STARTUP:SYSTARTUP_V5.COM on all of the systems in the VAXCluster that
Xrun DECWindows.
X
X$ !
X$ ! do sources...
X$ !
X$ if .not. pfm$provide_sources then GOTO pfm_done
X$ !
X$ vmi$callback restore_saveset b
X$ vmi$callback provide_file pfm$ perf_meter_const.dat 'pfm$source_directory'
X$ vmi$callback provide_file pfm$ perf_meter_const.uil 'pfm$source_directory'
X$ vmi$callback provide_file pfm$ perf_meter_const.h   'pfm$source_directory'
X$!
X$ vmi$callback provide_file pfm$ perf_meter.c         'pfm$source_directory'
X$ vmi$callback provide_file pfm$ cpudef.h             'pfm$source_directory'
X$!
X$ vmi$callback provide_file pfm$ perf_meter.uil       'pfm$source_directory'
X$!
X$ vmi$callback provide_file pfm$ decwsharlibraries.opt  'pfm$source_directory'
X$!
X$ vmi$callback provide_file pfm$ perf_meter.hlp        'pfm$source_directory'
X$!
X$ vmi$callback provide_file pfm$ makefile.              'pfm$source_directory'
X$ !
X$pfm_done:
X$ exit vmi$_success
$ GoSub Convert_File
$ File_is="DECWSHARLIBRARIES.OPT"
$ Check_Sum_is=859466534
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
Xsys$share:vaxcrtl/share
Xsys$share:decw$dwtlibshr/share
Xsys$share:spishr/share
$ GoSub Convert_File
$ File_is="PERF_METER.HLP"
$ Check_Sum_is=1551059627
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X1 PERF_METER
X
X   Format:  Run PFM$EXE:Perf_Meter
X   (Note:  must be run in a DECWindows context: i.e. DECW$DISPLAY must be 
X    defined.)
X
X   A file named DECW$PFM.DAT is used to customize the Perf Meter.  Three 
Xvariables are definable:
X
X   PerfMeter.YPos=xpos
X   PerfMeter.XPos=ypos
X   PerfMeter.UpdatePeriod=updateperiod
X
X   Default values are:  xpos = 0, ypos = 95, and updateperiod = 5 (seconds).
X
$ GoSub Convert_File
$ File_is="PFM_STARTUP.COM"
$ Check_Sum_is=675550428
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X$!--------------------------------------------------------
X$!  PFM_STARTUP.COM - Perf_Meter startup .COM file
X$!  Robert Heller Created on Tue Nov 14 08:54:56 1989
X$!   Last mod - 
X$!--------------------------------------------------------
X$!  Contents:
X$!--------------------------------------------------------
X$ set noon
X$ exe_dir = "$$EXE_DIRECTORY$$"
X$ dat_dir = "$$DAT_DIRECTORY$$"
X$!
X$ define/system/exec PFM$EXE 'exe_dir'
X$ define/system/exec PFM$DATA 'dat_dir'
X$!
X$ write sys$output "******* Perf Meter Setup *******"
X$ exit 1
$ GoSub Convert_File
$ File_is="PERF_METER_CONST.DAT"
$ Check_Sum_is=711814535
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X/* main windows */
X
XPFM_MAIN_WINDOW
X
X/* Menu bar */
X
XPFM_MENU_BAR
X
X/* FIle menu */
X
XPFM_EXIT_BUTTON
X
X/* output windows */
X
XPFM_CPU_GRAPH
XPFM_STATE_GRAPH
XPFM_DEVICE_0_IOCOUNT_NAME
XPFM_DEVICE_0_IOCOUNT_TOTAL
XPFM_DEVICE_0_IOCOUNT_DELTA
XPFM_DEVICE_1_IOCOUNT_NAME
XPFM_DEVICE_1_IOCOUNT_TOTAL
XPFM_DEVICE_1_IOCOUNT_DELTA
XPFM_DEVICE_2_IOCOUNT_NAME
XPFM_DEVICE_2_IOCOUNT_TOTAL
XPFM_DEVICE_2_IOCOUNT_DELTA
XPFM_DEVICE_3_IOCOUNT_NAME
XPFM_DEVICE_3_IOCOUNT_TOTAL
XPFM_DEVICE_3_IOCOUNT_DELTA
XPFM_PAGEFAULTS_TOTAL
XPFM_PAGEFAULTS_DELTA
XPFM_PAGEIO_TOTAL
XPFM_PAGEIO_DELTA
XPFM_FREEPAGES_TOTAL
XPFM_FREEPAGES_DELTA
XPFM_MODPAGES_TOTAL
XPFM_MODPAGES_DELTA
X
X
X/* max widget - must come last */
X
XMAX_WIDGET
$ GoSub Convert_File

