Re: Cancel All Processes
2003-03-25 18:39:16
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 <swl AT stanford DOT edu>
Information Technology Systems and Services, Stanford University
|
|
|