Re: running dsmserv as a ksh co-routine
2000-04-05 17:10:54
> Hi, *Smers
>
> We have been bitten (HARD) by a tape drive going bad - it gave a write
> error, but adsm carried on using it for many, many tapes. A significant
> percentage of these were then rendered unreadable. We have recovered them
> all, but it was a major job.
>
> I have been considering running dsmserv as a ksh co-routine so that I can
> trap a message such as ANR8302E containing the string OP=WRITE, and issue a
> command to vary the affected drive offline until we can investigate.
>
> Is anybody running dsmserv in this way? Any problems or disadvantages? It
> <seems> ok on our test rig so far.
I redirect the output of dsmserv to a timestamper script, which adds
date/time stamps, and then write the lines to a file. I then have a Perl
script that watches the file, and takes action on key messages, mainly
sending me email. I plan to expand the action in the future.
I do this on Solaris and AIX.
Startup server:
/usr/lpp/adsmserv/bin/dsmserv 2>&1 | /usr/local/bin/adsmserv.timestamplog &
/usr/local/bin/adsmserv.timestamplog:
#!/bin/sh
#/bin/dsmadmc -console -id=monitor -pass=*** | adsmserver.timestamplog
read LINEIN
READRC=$?
if [ $READRC -ne 0 ] ; then exit 1 ; fi
while [ $READRC -eq 0 ] ; do
# TSTAMP=`/usr/bin/date +%m/%d/%y.%H:%M:%S`
TSTAMP=`/usr/bin/date +%D%t%T`
echo $TSTAMP $LINEIN >> /var/info/adsmserver.log
read LINEIN
READRC=$?
done
Steve Roder, University at Buffalo
VM Systems Programmer
UNIX Systems Administrator (Solaris and AIX)
ADSM Administrator
(tkssteve AT buffalo DOT edu | (716)645-3564 |
http://ubvm.cc.buffalo.edu/~tkssteve)
|
|
|