home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
OS2
/
PTDEM3.ZIP
/
MEMSAMP.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-08
|
3KB
|
119 lines
/***************************************/
/* Pegasus Log Rexx Extension */
/* Version 1.0 */
/* (c) 1993,1994 C.O.L. Systems Inc. */
/* All Rights Reserved */
/* MEM Sample Proc */
/***************************************/
Data1. = ""; /* This is our data stem. Assumes one file input*/
Parse Arg MyFile /* Parse the file name on input to the proc */
/************************/
/* Load the extension */
/************************/
if RxFuncQuery('PegLoadFunctions') <> 0 then do
rcy = RxFuncAdd('PegLoadFunctions','PEGREXX','PegLoadFunctions')
if rcy = 0 then do
rcy = PegLoadFunctions()
if rcy > 0 then
signal BadLoad;
end;
else do
signal BadAdd;
end;
end;
/**************************/
/* Load the file and stem */
/**************************/
rcx = PegLoadFile(MyFile,"Data1.");
/***************************/
/* Check that the file was */
/* loaded ok and the app */
/* that created the log */
/* is CacheMon */
/***************************/
if rcx == 0 & Data1.Creator == 3 then do
/* Copyright information */
say;
do count = 1 to 7
say sourceline(count);
end;
/* Supplied by originator */
say;
say "Data was created by "Data1.Title;
/* For each resource found flag, display the name */
say "Res # = "Data1.Resources;
do count = 1 to Data1.Resources /* Display each on in list */
say "Resource "count" = "Data1.Resources.count;
end
/* Display the number of records */
say "Records = "Data1.Records;
/* Display the number of apps from APPMON or FILEMON */
say "Apps = "Data1.Records.Applications;
/* Display the number of files from APPMON or FILEMON */
say "Files = "Data1.Records.Files;
/* Loop through record count and show paging information */
if( Data1.Records > 0 ) then do
do count = 1 to Data1.Records
if Data1.Records.count.MEM then do
say PegTime('N',Data1.Records.count.TDS),
"Page In = "format(Data1.Records.count.MEM.ctSwapIn,4),
"Faults = "format(Data1.Records.count.MEM.ctFaults,4),
"Page Out = "format(Data1.Records.count.MEM.ctSwapOut,4),
"Discards = "format(Data1.Records.count.MEM.ctDiscard,4);
end;
end;
end;
end;
/* Report a file access error */
else do
if rcx > 0 then
say "Error in file set = "rcx;
else
say "This log file was not created with CacheMon!";
end;
/* Release the extension */
rcx = PegDropFunctions();
call RXFUNCDROP 'PEGLOADFUNCTIONS';
exit;
/****************************************************/
/* Error in syntax occured somewhere here */
/****************************************************/
BadAdd:
say 'Error Adding Pegasus Rexx Function Loader';
exit;
BadLoad:
say 'Error Loading Pegasus Rexx Functions';
exit;