Hmmm, I typically use ^T (control-T) to see 'who am I' and $ SHOW US CWHII/FULL. Then shoot to kill as needed.
If we assume 'old', to mean NOT the current session, then you script that as follows:
$ type CLEAN_ME_UP.COM $ ctx = "" $ this = F$GETJPI( "", "PRCNAM" ) $ user = F$GETJPI( "", "USERNAME" ) $ node = F$GETJPI( "", "NODENAME" ) $ temp = F$CONTEXT( "PROCESS", ctx, "USERNAME", user, "EQL" ) $ temp = F$CONTEXT ("PROCESS", ctx, "NODENAME", node, "EQL") $! IF F$TYPE( ctx ) .NES. "PROCESS_CONTEXT" THEN EXIT $loop: $ pid = F$PID( ctx ) $ IF pid .EQS. "" THEN EXIT $ that = F$GETJPI( pid, "PRCNAM" ) $ IF this.EQS.that $ THEN $ WRITE SYS$OUTPUT pid, " new" $ ELSE $ WRITE SYS$OUTPUT pid, " old" $ ENDIF $ GOTO loop
- Of course you want to replace the WRITE SYS$OUTPUT with STOP/ID once satisfied.
- Remove the NODE context if you want to do this for all older processes on every node.
- Consider F$GETJPI( "", "LOGINTIM") if you really want to use 'older' (shoot in foot?)
Cheers, Hein
re-formatted:
$ ctx = "" $ this = F$GETJPI( "", "PRCNAM" ) $ temp = F$CONTEXT( "PROCESS", ctx, "USERNAME", F$GETJPI("","USERNAME"), "EQL" ) $ temp = F$CONTEXT ("PROCESS", ctx, "NODENAME", F$GETJPI("","NODENAME"), "EQL") $! IF F$TYPE( ctx ) .NES. "PROCESS_CONTEXT" THEN EXIT $loop: $ pid = F$PID( ctx ) $ IF pid .EQS. "" THEN EXIT $ IF F$GETJPI( pid, "PRCNAM" ).NES.F$GETJPI("", "PRCNAM") THEN WRITE SYS$OUTPUT "STOP ",pid $ GOTO loop