home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 29 Fixes_o
/
29-Fixes_o.zip
/
warpfix.zip
/
CMPD.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-07-28
|
4KB
|
130 lines
@echo off
setlocal
rem CMPD.CMD for CM/2 1.11.
rem Executables used by this command file:
rem saveram2.exe, file compression
rem copyini.exe, copy locked files
rem qsystem.exe query system hardware
if "%1"=="" goto :help
if not %cmpath%=="" goto cm11
set %cmpath%="\cmlib"
:cm11
set Dest=%CMPath%\cmpd
set Log=%Dest%\cmpd.log
if not "%2"=="" goto FFSTSpecified
set EPW=C:
:FFSTSpecified
set EPW=%2
set EPW=%EPW%\os2
set LAPS=%3
if not "%LAPS%"=="" goto :LAPSset
set LAPS=%CMPath%\..
:LAPSset
set LAPS=%LAPS%\ibmcom
if not exist %EPW%\system goto ParameterError
if not exist %cmpath% goto ParameterError
echo Creating %CMPath%\%1.ram
mkdir %Dest% >nul 2>>&1
rem Copy the locked files: system error logs
copyini %EPW%\system\log0001.dat %Dest%\log0001.dat >%Log% 2>>&1
copyini %EPW%\system\log0001.bak %Dest%\log0001.bak >>%Log% 2>>&1
rem Save process environment, APPC information, HW config,and cmkernel info.
pstat >%Dest%\pstat.txt 2>>&1
display >%Dest%\display.txt 2>>&1
qsystem -D >%Dest%\qsystem.txt 2>>&1
cmquery >%Dest%\cmquery.txt 2>>&1
copy %EPW%\config.sys %Dest% >>%Log% 2>>&1
copy %EPW%\startup.cmd %Dest% >>%Log% 2>>&1
copy c:\config.sys %Dest% >>%Log% 2>>&1
copy c:\startup.cmd %Dest% >>%Log% 2>>&1
syslevel >%Dest%\syslvl.txt 2>>&1
rem Delete the old CMPD output file, we only want one copy
del %CMPath%\%1.ram >>%Log% 2>>&1
rem Copy CM dump & trace files by PMR number.
cmtrace copy %dest%\%1.trc /o >>%Log% 2>>&1
if ERRORLEVEL 1 goto NotActive
cmtrace stop >nul 2>>&1
:NotActive
rem cmtrace stop >nul 2>>&1
rem cmtrace copy %dest%\%1.trc /o >nul 2>>&1
copy %CMPath%\%1*.* %Dest% >>%Log% 2>>&1
rem Copy non-locked FFST/2 logs.
copy %EPW%\system\os2mlog.dat %Dest% >>%Log% 2>>&1
copy %EPW%\system\epw\os2mlog.dat %Dest%\os2mlog2.dat >>%Log% 2>>&1
copy %EPW%\system\*.dmp %Dest% >>%Log% 2>>&1
copy %EPW%\system\epw\*.dmp %Dest% >>%Log% 2>>&1
copy %CMPath%\*.log %Dest% >>%Log% 2>>&1
rem Display a list of ISDN adapter dumps. These are very large.
rem They are rarely created so we just want to know if any exist.
dir c:\i*.dmp >>%Dest%\idmp.dir 2>>&1
dir \i*.dmp >>%Dest%\idmp.dir 2>>&1
dir %EPW%\..\i*.dmp >>%Dest%\idmp.dir 2>>&1
rem Look in all alternate locations for cm.log and cmrinst.log.
copy %EPW%\cmlib\cm.log %Dest% >>%Log% 2>>&1
copy c:\cm.log %Dest% >>%Log% 2>>&1
copy %EPW%\install\cmrinst.log %Dest% >>%Log% 2>>&1
copy %cmpath%\cm2apar.log %Dest% >>%Log% 2>>&1
rem Copy CM/2 config files.
copy %cmpath%\cm.ini %Dest% >>%Log% 2>>&1
copy %CMPath%\*.rsp %Dest% >>%Log% 2>>&1
copy %CMPath%\*.cfg %Dest% >>%Log% 2>>&1
copy %CMPath%\*.cf2 %Dest% >>%Log% 2>>&1
copy %CMPath%\*.ndf %Dest% >>%Log% 2>>&1
copy %CMPath%\*.sec %Dest% >>%Log% 2>>&1
copy %CMPath%\network.ini %Dest% >>%Log% 2>>&1
copy %CMPath%\net_00.sup %Dest% >>%Log% 2>>&1
copy %CMPath%\*.cxm %Dest% >>%Log% 2>>&1
copy %CMPath%\cml2*.* %Dest% >>%Log% 2>>&1
rem Copy LAPS information if applicable.
copy %LAPS%\protocol.ini %Dest% >>%Log% 2>>&1
copy %LAPS%\lantran.log %Dest% >>%Log% 2>>&1
echo Compressing:
dir /w %Dest%\*
rem Compress all those files.
saveram2 /Qt %Dest%\*.* %CMPath%\%1.ram
rem Clean up
echo Y | del %Dest%\* >>nul 2>>&1
rmdir %Dest% >>nul 2>>&1
if exist %Dest% goto EraseError
goto end
:ParameterError
echo CMPD has determined that the parameters passed do not correctly indicate the
echo location of files to be collected. Verify the location of CMLIB, FFST
echo error logs, and review the command syntax.
echo -
:help
echo %0 PMRnumber ╒FFST/2 Drive■ ╒LAPS Drive■
echo e.g. %0 5X123456 c: d:
echo The parameter ╒FFST/2 Drive■ refers to the drive where FFST/2 is
echo configured to store its error logs. This is usually the boot drive.
echo Any unsaved trace data will be saved in: PMRNumber.trc
goto end
:EraseError
echo The CMPD temporary files could not be erased. You may erase
echo %Dest%\* to save disk space once the files are no longer locked.
goto end
:end
endlocal