Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!ur-tut!sunybcs!boulder!hao!ames!ucbcad!ucbvax!vms.CIS.PITTSBURGH.EDU!Postmaster From: Postmaster@vms.CIS.PITTSBURGH.EDU.UUCP Newsgroups: comp.os.vms Subject: Undeliverable mail Message-ID: <8710280630.AA21675@ucbvax.Berkeley.EDU> Date: Mon, 26-Oct-87 10:38:00 EST Article-I.D.: ucbvax.8710280630.AA21675 Posted: Mon Oct 26 10:38:00 1987 Date-Received: Sat, 31-Oct-87 01:08:15 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 82 The message could not be delivered to: Addressee: 000426 Reason: %MAIL-E-NOSUCHUSR, no such user 10217_000426 at node CISVM2 ---------------------------------------- Received: from JNET-DAEMON by vms.cis.pittsburgh.edu; Sat, 24 Oct 87 19:01 EDT Received: From CMUCCVMA(MAILER) by PITTVMS with RSCS id 0929 for 000426@PITTVMS; Sat, 24-OCT-1987 19:00 EDT Received: by CMUCCVMA (Mailer X1.25) id 0926; Sat, 24 Oct 87 19:03:36 EDT Date: Thu, 22 Oct 87 17:38:10 edt From: Bob Boyd 8*565-3627 22-Oct-1987 1705 Subject: RE: RUN/DETACHED/TIME_LIMIT=n Sender: INFO-VAX Discussion To: BETH DOE <000426@vms.cis.pittsburgh.edu> Reply-to: INFO-VAX@KL.SRI.COM Comments: To: info_vax@mcnc.org, rlb@mcnc.org Perkins@Arc.CDN had a question about running an image with a time limit. Looking at the HELP RUN PROCESS I see there is /TIME_LIMIT=n. I think a workable solution is the following: $ RUN/DETACHED SYS$SYSTEM:LOGINOUT.EXE/INPUT=mydisk:[mydir]myprog.com - /OUTPUT=mylog.log- /PROCESS_NAME=TIMED_JOB - /TIME_LIMIT=n ! as calculated for your needs Then in MYPROG.COM $ ON ERROR THEN $ SUBMIT CLEANUP.COM ! I don't know if this will work -- $! just suggesting it as a possibility. $ RUN MY_IMAGE $ SUBMIT CLEANUP.COM ! you should get a few extra seconds of cpu time If the last line of the above example won't do it, then you could have another process sit and watch it and when it goes away, then do the cleanup. Here is how to do it: $ SPAWN/NOWAIT @BUSYCHECK TIMED_JOB 0-0:1:0.0 SUBMIT CLEANUP.COM ------------------------------------------------------------------------- $! busycheck.com -- monitor a process to see if it's alive $! $! p1 -- process name to be monitored $! p2 -- delay time in between checks. $! $! p3 - p8 command and qualifiers to execute when done $! $ if p1.eqs."" then inquire p1 "Process name" $ if p2.eqs."" then p2 := 0:0:5.0 $ proc_name = p1 $ delay = p2 $ ! $ ctx = -1 $LOOP: $ pid = f$pid(ctx) $ proc_name = f$edit(f$getjpi(pid,"prcnam"),"trim") $ if F$LOC(P1,proc_name).ge.f$len(proc_name) then goto LOOP $ new_cpu = f$getjpi(pid,"cputim") $ ! $WAIT_LOOP: $ wait 'delay' $ new_cpu = f$getjpi(pid,"cputim") $ if $status then $ goto WAIT_LOOP $ $!finish up here $ 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' $ ! $ EXIT $ ! $!Last Modified: 22-OCT-1987 17:34:37.31 ----------------------------------------------------------------- Bob Boyd Usenet: rlb@rtpark.rtp.ge.com GE Microelectronics Ctr. Voice: (919)549-3627 POB 13049, MS 7T3-01 GE DIALCOMM: 8*565-3627 RTP, NC 27709-3049 GE DECnet: RTPARK::RLB