ADSM-L

Re: Script to cancel a process

2006-10-25 09:50:01
Subject: Re: Script to cancel a process
From: Timothy Hughes <Timothy.Hughes AT OIT.STATE.NJ DOT US>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 25 Oct 2006 09:48:17 -0400
Steven, Thanks

Your right about getting the process numbers from the Server side into
the Script
I was thinking the same thing. And to make it even more complicated It's
on 1 or
2 process numbers that run long (like 8 or 9hrs). So I was thinking to
just have
the name "Backup Storage Pool' itself in the script so that the script
will cancel ANY
Backup Storage Pool process that is active after a specified period of
time.

Regards

Tim

Steven Harris wrote:

Tim,

The problem is that there is no reasonable way to get the process
numbers from a server side query substituted into a script that you
can run.

Thus you are pretty much limited to client side scripting.  Don't
forget, though, that your server machine can also run a client.  If its
a requirement that the scheduling be controlled from the TSM scheduler,
you can -from an admin schedule- schedule a client action  on the
server-machine-as-client, that runs a command that runs a script that
cancels the processes.

Convoluted, but it works. I've occasionally used this approach to email
devconfig/volhist and plan file offsite automatically.

Regards

Steve

Steve Harris
AIX and TSM Admin
Brisbane Australia

Timothy Hughes wrote:

William

Thanks,  Can a similar script be implemented into an automated  TSM
server script using
the admin schedule? I am still a newbie at scripting and have not gotten
into Aix scripts.

Tim


William Sherrill wrote:

Tim,

Here is a simple shell script that we run around 7:30 to make sure
none of
those processes are running. It is a script that someone came up
with on
their own and seems to work real well.

#!/bin/ksh
# Cancel selected proc
cat /u/adsmadm/adsm/.passwd | read tsmpw
dsmadmc -id=admin -pass="$tsmpw" -out=/tmp/adsm.$$.out5 "q pr"
cat /tmp/adsm.$$.out5 | grep "Backup Storage Pool" > /tmp/adsm.$$.out3A
if [ -s /tmp/adsm.$$.out3A ]
then
while read jproc3 jrest
do
echo "$jproc3" | sed 's/,//' | read jproc3A
dsmadmc -id=admin -pass=sysops -out=/tmp/adsm.$$.out4 "can pr
"$jproc3A""
sleep 1
done < /tmp/adsm.$$.out3A
fi
rm /tmp/adsm.$$.ou*
# end of script

Bill Sherrill







<Prev in Thread] Current Thread [Next in Thread>