I will leave the submittal of the job to the user, but the following should get you the info you need. Dan ================================= ! ! COM file to display system, Application, and Disk information. ! $ type/page nl: $ open/write output_file sys$login:info.txt $! $! Set up Symbols $! $ say = "write output_file $ model = f$getsyi("hw_name") $ boot = f$getsyi("boottime") $ node = f$getsyi("nodename") $ ver = f$getsyi("version") $ cal_ver = f$trnlnm("cal$version") $ cal_site = f$trnlnm("cal$sitename") $ dot_line = - "----------------------------------------------------------------------" $! $ say "" $ say "" $ say " ", node,":: is a model ",model,", running VMS ",ver $ say " and was last rebooted on ",boot $ say dot_line $! $ heading1 = - " Total Blocks Free % Error " $ heading2 = " Disk Blocks Used Blocks Full Count " $ say heading1 $ say heading2 $ say dot_line $ usestr_tot = 0 $! $!___ $loop: $ dsk=f$device("*D*","DISK",) $ if dsk .eqs. "" then GOTO all_done $! $ device_type_name = f$getdvi(dsk,"DEVICE_TYPE_NAME") $ device_type_name = f$extract(0,2,device_type_name) $ if device_type_name .eqs. "RX" then GOTO all_done !Skip floppy drive $! $ device_status=f$getdvi(dsk,"MNT") !Process only mounted $ if device_status .eqs. "FALSE" then GOTO loop !devices - BJH - 08-JUL-2003 $! $ volume = f$getdvi(dsk,"volnam") $ blktot = f$getdvi(dsk,"maxblock") !Total Blocks $ blkavl = f$getdvi(dsk,"freeblocks") !Blocks Free $ blkuse = blktot-blkavl !Blocks in use $ pctful= (blkuse*100)/blktot !Percent full $ errcnt = f$getdvi(dsk,"errcnt") !Disk Error Count $! $! Construct right-justified output strings: $! $ totstr="" !Clear all variables $ avlstr="" $ usestr="" $ pctstr="" $ errstr="" $ totstr[9-'f$length(blktot),'f$length(blktot)]:='blktot !Total string $ avlstr[9-'f$length(blkavl),'f$length(blkavl)]:='blkavl !Free string $ usestr[9-'f$length(blkuse),'f$length(blkuse)]:='blkuse !Blocks used string $ pctstr[3-'f$length(pctful),'f$length(pctful)]:='pctful !Percent full string $ errstr[4-'f$length(errcnt),'f$length(errcnt)]:='errcnt !Error count string $ display="!3* !13<!AS!>!13<!AS!>!13<!AS!>!12<!AS!>!8<!AS!>!AS" $ say f$fao(display,volume,totstr,usestr,avlstr,pctstr,errstr) $ usestr_tot = usestr_tot + usestr $ GOTO loop $! $!_______ $all_done: $ say dot_line $ say "Total Blocks used = ''usestr_tot'" $ meg = usestr_tot / 2048 $ say "Total Meg used = ''meg'" $ close output_file $ TYPE SYS$LOGIN:INFO.TXT;0 $ delete/nolog sys$login:info.txt;* $ exit
|