home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
upsmange.zip
/
CLIENT
/
UMC_LOG.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-10-01
|
2KB
|
31 lines
@echo off
rem ***************************************************************
rem Log Script UM-Client 2.0 OS/2
rem ***************************************************************
rem
rem This script may use the following parameters :
rem
rem %1 IP Address of trap emitter
rem %2 Trap number
rem %3 Plug number (or 0 if not present in the trap)
rem %4 Date and time
rem %5 Shutdown indication ("Shutdown" if shutdown is beginning)
rem
rem ***************************************************************
rem Writes formatted log line to UM-Client log file for known traps
if %2=="17" wr_log.exe /l:%4 : Trap 17 %1 Power failed %5 & goto end
if %2=="18" wr_log.exe /l:%4 : Trap 18 %1 Power restored %5 & goto end
if %2=="1" wr_log.exe /l:%4 : "Trap 1" %1 Battery fault %5 & goto end
if %2=="9" wr_log.exe /l:%4 : "Trap 9" %1 Battery low condition %5 & goto end
if %2=="31" wr_log.exe /l:%4 : Trap 31 (plug %3) %1 Off in progress %5 & goto end
if %2=="37" wr_log.exe /l:%4 : Trap 37 %1 Communication failed %5 & goto end
if %2=="38" wr_log.exe /l:%4 : Trap 38 %1 Communication restored %5 & goto end
if %2=="29" wr_log.exe /l:%4 : Trap 29 (plug %3) %1 Off to start %5 & goto end
if %2=="13" wr_log.exe /l:%4 : Trap 13 %1 On bypass %5 & goto end
if %2=="0" wr_log.exe /l:%4 : Inscription failed, UMC stopped & goto end
rem Writes formatted log line to UM-Client log file for unknown traps
wr_log.exe /l:%4 : Trap %2 (plug %3) received from %1 %5
:end