Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!murdu.OZ.AU!u3369429 From: u3369429@murdu.OZ.AU.UUCP Newsgroups: mod.computers.vax Subject: bigsis Message-ID: <8703200403.20382@murdu.OZ> Date: Fri, 20-Mar-87 14:03:13 EST Article-I.D.: murdu.8703200403.20382 Posted: Fri Mar 20 14:03:13 1987 Date-Received: Sun, 22-Mar-87 23:42:06 EST Sender: daemon@ucbvax.BERKELEY.EDU Followup-To: mod.computers.vax Distribution: world Organization: I.A.E.S.R., Melbourne University (temporarily in Darwin) Lines: 96 Keywords: bigsis shar Approved: info-vax@sri-kl.arpa Summary: bigsis didn't compile, but try my STATG.COM In message <8703162033.AA04165@sdcsvax.UCSD.EDU> bruceb@telesoft.UUCP (Bruce Bergman @spot) writes: >It occurred to me the other day that I have been using this neat >utility for viewing processes (similar to SHOW SYSTEM), and that >there are others who may like this program. > bigsis.c > bigsis.man >The .c file should be compiled with DEC C V2.0 or greater, on >VMS V4.2 or greater. Well, it doesn't. This VMS 4.5 / CC 2.2-015 Our JPIDEF.H looks probably different from yours, but that can be fixed by commenting your JPI define`s. But I cant't find PCBDEF.H nor any PCB-symbols in any library. What am I missing? Anyway, when I finally read BIGSIS's man page, it occurred to me that I have a procedure which does roughly the same thing. I found this procedure a long time ago and it works for me; i.e. on group and user level. I don't know anything about world privs. >I've got a bunch of other nifty utilities I wrote, which I may >post at a later date. I'd like to see how this one goes over >first, though. Yeah, post a summary of what they do. (But make sure they compile :-) ) > Oh yes, the means of collecting the files into >one 'archive' is my own design. I didn't have any of the shar >programs running around, so I wrote my own. Hope it works okay. I immediately went away and incorporated your checksum feature in my shar. BTW, both files (bigsis) failed. Michael Bednarek (u3369429@murdu.oz.au) X----X----X----X----X----X----X Cut here and execute X----X----X----X----X----X $! SHAR STATG.COM $! created by U3369429 19-MAR-1987 10:59:10.49 $ Pass_or_Failed="Failed,Passed" $ File ="STATG.COM" $ Check_Sum=858615415 $write sys$error "extract STATG.COM" $copy sys$input STATG.COM $deck/dollars="870319 10:59:10" $ Verify='F$Verify(F$TRNLNM("COMMAND_DEBUG")) $! STATG.COM Procedure to display status of processes in a group $ On Control_Y then goto Clean_up ! Provide an orderly exit $ Old_Priv=F$SetPRV("GROUP,WORLD") ! Enable privileges $! $ If P1.eqs."" then P1=F$GetJPI(0,"GRP") $ Write SYS$Output "Status of processes in ''Old_Priv' ''P1'" $ Write SYS$Output "" $ CTX="" $ Write SYS$Output "''F$FAO("!8AS !8AS !14AS !3AS !3AS !6AS !10AS !9AS !4AS", - "PID","Username","Proc Name","Sta","Pri"," I/O"," CPU Time", - "Page Flts","Size")'" $ Write SYS$Output "" $! $Loop: $ PID=F$PID(CTX) $ If "''PID'".eqs."" then goto Clean_up $ prcn=f$getjpi(pid,"PRCNAM")' $ User=F$GetJPI(PID,"Username") $ state=F$GetJPI(PID,"STATE") $ prio=F$GetJPI(PID,"PRI") $ dirio=F$GetJPI(PID,"DIRIO")+F$GetJPI(PID,"BUFIO") $ cput=F$GetJPI(PID,"CPUTIM") $ cpu_m=cput/6000 $ cpu_s=(cput-(cpu_m*6000))/100 $ cpu_h=cput-(cpu_m*6000)-(cpu_s*100) $ pagf=F$GetJPI(PID,"PAGEFLTS") $ size=F$GetJPI(PID,"WSSIZE") $ ImagName=F$GetJPI(PID,"IMAGNAME") $ Write SYS$Output - "''F$FAO("!8AS !8AS !14AS !3AS !2SW !7SL !3ZL:!2ZL.!2ZL !9SL !5SL", - pid,User,prcn,state,prio,dirio,cpu_m,cpu_s,cpu_h,pagf,size)'" $! use your favourite method of displaying real life names here $ Set NoOn ! in case we don't know her/him $!WhoIs 'User $ Search COM_LIB:ALLDIR.COM 'User $ Set On $ Write SYS$Output F$GetJPI(PID,"LOGINTIM") $ If ImagName.nes."" then Write SYS$Output " Image Name: ",ImagName $ Write SYS$Output "" $ Goto loop $! $ Clean_up: ! Restore settings to their value at entry time $ Old_Priv=F$SetPRV("''Old_Priv'") $ Verify=F$Verify(Verify) 870319 10:59:10 $ Write SYS$ERROR "Checking CHECKSUM" $ Checksum 'File $ Success=F$Element(Check_Sum.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed) $ Write SYS$ERROR "Original checksum:",'Check_Sum'," and now:", - 'CHECKSUM$CHECKSUM'," (''Success')"