Re: Cancel all processes

2004-07-14 Thread Coats, Jack
I have found it helpful to issue a 'cancel req ###' if there is a request
pending
associated with trying to get rid of a process.

In my experience, if it is trying to mount a tape, the tape must be mounted
before the
process will die gracefully.

-Original Message-
From: Warren, Matthew (Retail) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 14, 2004 8:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Cancel all processes


Would it fail, or just take a loong time to complete?

-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Dan Foster
Sent: Wednesday, July 14, 2004 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Cancel all processes

Hot Diggety! MC Matt Cooper (2838) was rumored to have written:
> I am not aware of a cancel all processes.  However, you can write a
> script to do it.  It would be based on the fact that TSM will tell you
> all the processes that are running.select process_num from
processes
> will give you the process_num  numbers that need to be canceled

One caveat, from the 5.1 help information:

: Some processes, such as reclamation, will generate mount requests in
: order to complete processing. If a process has a pending mount
request,
: the process may not respond to a CANCEL PROCESS command until the
mount
: request has been answered or cancelled by using either the REPLY or
: CANCEL REQUEST command, or by timing out.

: Use the QUERY REQUEST command to list open requests, or query the
: activity log to determine if a given process has a pending mount
: request.

So a simple q proc (or equivalent) + canc  operation may
usually work most of the time, but may fail at certain times if you
don't also check for this, too.

-Dan


___ Disclaimer Notice __
This message and any attachments are confidential and should only be read by
those to whom they are addressed. If you are not the intended recipient,
please contact us, delete the message from your computer and destroy any
copies. Any distribution or copying without our prior permission is
prohibited.

Internet communications are not always secure and therefore Powergen Retail
Limited does not accept legal responsibility for this message. The recipient
is responsible for verifying its authenticity before acting on the contents.
Any views or opinions presented are solely those of the author and do not
necessarily represent those of Powergen Retail Limited.

Registered addresses:

Powergen Retail Limited, Westwood Way, Westwood Business Park, Coventry, CV4
8LG.
Registered in England and Wales No: 3407430

Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432


Re: Cancel all processes

2004-07-14 Thread Warren, Matthew (Retail)
Would it fail, or just take a loong time to complete?

-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Dan Foster
Sent: Wednesday, July 14, 2004 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Cancel all processes

Hot Diggety! MC Matt Cooper (2838) was rumored to have written:
> I am not aware of a cancel all processes.  However, you can write a
> script to do it.  It would be based on the fact that TSM will tell you
> all the processes that are running.select process_num from
processes
> will give you the process_num  numbers that need to be canceled

One caveat, from the 5.1 help information:

: Some processes, such as reclamation, will generate mount requests in
: order to complete processing. If a process has a pending mount
request,
: the process may not respond to a CANCEL PROCESS command until the
mount
: request has been answered or cancelled by using either the REPLY or
: CANCEL REQUEST command, or by timing out.

: Use the QUERY REQUEST command to list open requests, or query the
: activity log to determine if a given process has a pending mount
: request.

So a simple q proc (or equivalent) + canc  operation may
usually work most of the time, but may fail at certain times if you
don't also check for this, too.

-Dan


___ Disclaimer Notice __
This message and any attachments are confidential and should only be read by those to 
whom they are addressed. If you are not the intended recipient, please contact us, 
delete the message from your computer and destroy any copies. Any distribution or 
copying without our prior permission is prohibited.

Internet communications are not always secure and therefore Powergen Retail Limited 
does not accept legal responsibility for this message. The recipient is responsible 
for verifying its authenticity before acting on the contents. Any views or opinions 
presented are solely those of the author and do not necessarily represent those of 
Powergen Retail Limited. 

Registered addresses:

Powergen Retail Limited, Westwood Way, Westwood Business Park, Coventry, CV4 8LG.
Registered in England and Wales No: 3407430

Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432


Re: Cancel all processes

2004-07-14 Thread Dan Foster
Hot Diggety! MC Matt Cooper (2838) was rumored to have written:
> I am not aware of a cancel all processes.  However, you can write a
> script to do it.  It would be based on the fact that TSM will tell you
> all the processes that are running.select process_num from processes
> will give you the process_num  numbers that need to be canceled

One caveat, from the 5.1 help information:

: Some processes, such as reclamation, will generate mount requests in
: order to complete processing. If a process has a pending mount request,
: the process may not respond to a CANCEL PROCESS command until the mount
: request has been answered or cancelled by using either the REPLY or
: CANCEL REQUEST command, or by timing out.

: Use the QUERY REQUEST command to list open requests, or query the
: activity log to determine if a given process has a pending mount
: request.

So a simple q proc (or equivalent) + canc  operation may
usually work most of the time, but may fail at certain times if you
don't also check for this, too.

-Dan


Re: Cancel all processes

2004-07-14 Thread MC Matt Cooper (2838)
I am not aware of a cancel all processes.  However, you can write a
script to do it.  It would be based on the fact that TSM will tell you
all the processes that are running.select process_num from processes
will give you the process_num  numbers that need to be canceled
Matt  

-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Patrick Rainer
Sent: Wednesday, July 14, 2004 7:20 AM
To: [EMAIL PROTECTED]
Subject: Cancel all processes

Hi

Is there a possibility to cancel all active processes at once, like
"cancel session all" for sessions?
I need such a command for an installation routine.

Regards
Patrick


Re: Cancel all processes

2004-07-14 Thread Warren, Matthew (Retail)
I don't think there is a psecific command, but from a unix Ksh script I
do it with the following;


procs=$(dsmadmc -id=x -pa=x select \'grepme\',process_num from processes
| awk '/^grepme/{print $2}')
for proc in ${procs}
do
dsmadmc -id=x -pa=x can pr ${proc}
done



-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Patrick Rainer
Sent: Wednesday, July 14, 2004 12:20 PM
To: [EMAIL PROTECTED]
Subject: Cancel all processes

Hi

Is there a possibility to cancel all active processes at once, like
"cancel session all" for sessions?
I need such a command for an installation routine.

Regards
Patrick


___ Disclaimer Notice __
This message and any attachments are confidential and should only be read by those to 
whom they are addressed. If you are not the intended recipient, please contact us, 
delete the message from your computer and destroy any copies. Any distribution or 
copying without our prior permission is prohibited.

Internet communications are not always secure and therefore Powergen Retail Limited 
does not accept legal responsibility for this message. The recipient is responsible 
for verifying its authenticity before acting on the contents. Any views or opinions 
presented are solely those of the author and do not necessarily represent those of 
Powergen Retail Limited. 

Registered addresses:

Powergen Retail Limited, Westwood Way, Westwood Business Park, Coventry, CV4 8LG.
Registered in England and Wales No: 3407430

Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432


Re: Cancel All Processes

2003-03-25 Thread Scotty Logan
On Tuesday, March 25, 2003, at 01:57  PM, Dearman, Richard wrote:
Does anyone have a script to cancel all process?  For example you can
"cancel sess all" to cancel all sessions but there is no "cancel proc
all"
command.  So there must be a scripting way of doing this.
This should work on a unix-like system:

dsmadmc -se=S -id=I -pa=P -tab "select 'cancel process',process_num
from processes > /tmp/canpr_$$.mac"
dsmadmc -se=S -id=I -pa=P -item macro /tmp/canpr_$$.mac
The macro may fail if some of the processes end between the two
dsmadmcs - the -itemcommit should fix that, but if it doesn't:
dsmadmc -se=S -id=I -pa=P -tab "select 'cancel process',process_num
from processes > /tmp/canpr_$$.mac"
while read c; do dsmadmc -se=S -id=I -pa=P $c; done < /tmp/canpr_$$.mac
  Scotty

--
Scotty Logan <[EMAIL PROTECTED]>
Information Technology Systems and Services, Stanford University


Re: Cancel All Processes

2003-03-25 Thread Todd Lundstedt
I have a script that cancels any migration, reclamation, move, and backup
stgpool processes.  I modified it slightly here, but it should work to
cancel any process running in TSM.  However, remember that the process will
not necessarily cancel immediately.  It has to finish what it is doing at
that time before canceling, for instance a 150GB file that just started
reclaiming will take approximately 3 hours to reclaim (on my system).  A
cancel process will not actually cancel that process until that file is
finished moving.
Anyway.. here is the slightly modified script.

PROCESSES=somepath/procs

dsmadmc -id=someTSMid -pass=TSMidpasswd q pro | awk '{ print $1 }' >
$PROCESSES

for ProcNo in `cat $PROCESSES`
do
  dsmadmc -id=someTSMid -pass=TSMidpasswd cancel pro $ProcNo
done

I haven't tested this, but it should work, maybe with some slight
modification to the 'awk' parameters.



|+>
||  "Dearman, |
||  Richard"  |
||  <[EMAIL PROTECTED]|
||  DU>   |
||  Sent by:  |
||  "ADSM: Dist   |
||  Stor Manager" |
||  <[EMAIL PROTECTED]|
||  IST.EDU>  |
|||
|||
||  03/25/2003|
||  03:57 PM  |
||  Please respond|
||  to "ADSM: Dist|
||  Stor Manager" |
|||
|+>
  
>|
  |
|
  |  To: [EMAIL PROTECTED] 
 |
  |  cc:   
|
  |  Fax to:   
|
  |  Subject: Cancel All Processes 
|
  
>|




Does anyone have a script to cancel all process?  For example you can
"cancel sess all" to cancel all sessions but there is no "cancel proc all"
command.  So there must be a scripting way of doing this.



THanks

***EMAIL DISCLAIMER*** This
email and any files transmitted with it may be confidential and are
intended
solely for the use of th individual or entity to whom they are addressed.
If you are not the intended recipient or the individual responsible for
delivering the e-mail to the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is strictly prohibited.  If you have received this e-mail in error, please
delete it and notify the sender or contact Health Information Management
312.996.3941.


Re: Cancel All Processes

2003-03-25 Thread Jolliff, Dale
Million ways to skin a cat, but here's one crude way.


dsmadmc -se=$SERVER -id=$ID -pa=$PA -commadelimited "select
process_num,
 process, status from processes"  | tail +8 | grep -v ANR | grep -v ANS |
grep , > $OUTFILE
PROCESSES=`cat $OUTFILE | cut -d, -f1`
for PROCESS in $PROCESSES
do
dsmadmc -se=$SERVER -id=$ID -pa=$PA "canc process $PROCESS"

done
print $SERVER >> $MAILFILE
cat $OUTFILE >> $MAILFILE
rm $OUTFILE
done

-Original Message-
From: Dearman, Richard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 3:57 PM
To: [EMAIL PROTECTED]
Subject: Cancel All Processes


Does anyone have a script to cancel all process?  For example you can
"cancel sess all" to cancel all sessions but there is no "cancel proc all"
command.  So there must be a scripting way of doing this.



THanks

***EMAIL DISCLAIMER*** This
email and any files transmitted with it may be confidential and are intended
solely for the use of th individual or entity to whom they are addressed.
If you are not the intended recipient or the individual responsible for
delivering the e-mail to the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is strictly prohibited.  If you have received this e-mail in error, please
delete it and notify the sender or contact Health Information Management
312.996.3941.