Hi all,
We put the following script as a cron job to run at specified time
#!/usr/bin/ksh
cat /usr/tivoli/tsm/server/bin/scripts/password.file | read id password
ADSM="dsmadmc -id=$id -pass=$password"
$ADSM "q proc" | grep "Backup Storage Pool" |\
while read proc_id the_rest
do
proc_id=`echo $proc_id | sed -e 's/,//g'`
$ADSM "cancel proc $proc_id"
done
exit
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
Steven Harris
Sent: Tuesday, October 24, 2006 4:53 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Script to cancel a process
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
>>
>>
>
>
>
>
|