Article 156749 of comp.os.vms: In article <325941DC.56E2@ornl.gov>, Bill Riddle wrote: > Can anyone tell me how to identify processes under OpenVMS that have > been "disconnected". We are experiencing problems with processes that > users are abnormally exiting, but the images that they are running are > continuing "forever". These processes are consuming all of the > available cpu and are seriously hindering perforamance. I have checked > the DCL lexical functions f$getjpi and f$getdvi but cannot locate the > information I need. Any suggestions would be appreciated. You can use the following code, which I just copied from one of our procedures: $ disconnected = "FALSE" ! Assume not disconnected $ IF mode .EQS. "INTERACTIVE" $ THEN $ owner = F$GETJPI(pid,"OWNER") $ IF owner .EQS. "" $ THEN $ terminal = F$GETJPI(pid,"TERMINAL") $ ELSE $ terminal = F$GETJPI(owner,"TERMINAL") $ ENDIF $ port = F$GETDVI(terminal,"TT_ACCPORNAM") $ disconnected = F$GETDVI(terminal,"STS") .AND. %X1 $ WRITE SYS$OUTPUT "Terminal = [''terminal']" $ WRITE SYS$OUTPUT "Port = [''port']" $ WRITE SYS$OUTPUT "Disconnected = [''disconnected']" $ ENDIF We use this code above to automatically terminate jobs which we've declared "looping" and which are disconnected. You'll need your own code to determine what's to be considered looping in your environment. I hope this helps. -- Ed Wilts Ed.Wilts@gems1.gov.bc.ca