Joe Rowehl wrote in a message to Jack Stein:
> The only problem I have with OPUS is it can be hung when
> certain callers screw up a D/L, this is very rare, and must
> be something stupid that only a few callers manage, I don't
> know if its OPUS, my set-up or what, but it's rare enough,
> I don't care much, and I devised a recovery scheme that
> works.
JR> I've seen that problem once or twice this year. Care to
JR> share your recovery scheme??? :-)
Sure. The scheme is based on ACTIVE.01.$$$ flag file that OPUS creates when
a user is on-line. When OPUS crashes, CD goes off in the modem because the
caller hangs up, but OPUS doesn't know it, so the flag file remains. (This
is not 100%, but usually is the case). If you are running OS/2 and SIO, you
can check periodically to see if this is the case. SIO comes with SU.EXE,
which will tell you if CD is on or off in your modem. The command SU 2 DCD
will return a 1 if CD is off and a 0 if cd is on.
Armed with this info, I wrote a REXX script that checks if ACTIVE01.$$$
exists, if it does, it runs SU 2 dcd and checks the return code, if it is 0,
then it waits 2 minutes, rechecks, and if it gets the same results, it
reboots the system. It issues a beep signal to let me know it's doing the
check (just for kicks) and issues a different beep signal if it finds a
problem, giving me a chance to kill the script if I'm here so I can do a
manual reset of the OPUS session, rather than a full reboot of the system.
OPUS has never crashed OS/2, but I haven't figured a way to kill the OPUS
session and restart it from a script.
I also added a line to all my maintenence routines that creates a flag file
(NoReboot.$$$) just in case I'm running a maintence thing-ee so no reboot
will occur in the middle of an active routine.
Before it reboots the system, it looks up the last user in the OPUS.LOG, and
records who done it, and when, in a CRASH.log file. This look up I recently
added, and it requires use of GREP to do the look up, because REXX won't look
in the OPEN opus.log file, but GREP will. If you have GREP or something else
that will do this, you can UNCOMMENT the lines that do this.
To run the script, you need OS/2, SIO, and a CRON scheduler. (I use
CRON93.ZIP which is available here, and works great, but there are lots of
them around)
The next message I'll post CRASH1.CMD, which is the REXX script. If you or
anyone use it, and find a way to either get REXX to read OPUS.LOG while its
opened, or, reboot the OPUS session w/o doing a system reboot, I'd love to
see or hear about it.
I broke long lines into 2 in case of word wrap. Search for "..." at the end
of lines and begining of next line, and make them ONE line. Hopefully the
thing won't WRAP into a mess.
Oh, to reboot OS/2, I use 4OS2's REBOOT command. If you don't run 4OS2, then
use OS2's "SETBOOT /B" command instead.
Let me know if you use it, any better ideas, problems, etc. To test it,
comment the REBOOT line, add an ACTIVE01.$$$ file to your FLAG directory.
and run the sucker.
OH, just a plug for BOXER... I use BOXER for OS/2 for scripts, it's color
KEYWORD and SYNTAX highlighting is GREAT. Also nice for CONFIG.SYS and so on.
My registered copies of QEDIT, QEDIT for OS/2 and TSE are collecting dust:-(
Jack
--- timEd/2-B11
---------------
* Origin: Jack's Free Lunch 4OS2 USR16.8 Pgh Pa (412)492-0822 (1:129/171)
|