# # Script name: sho_filesys_siz_start_new in /apps/nns_com/fea/scripts # # Short Desc: 1. According to the NNS-IDEAS-data-installation-id passed to # this script, prepares a list of relevant file-systems and # their percent used. # 2. Starts a window in which to show an I-DEAS user the %-used # in file systems for a given NNS I-DEAS 'data-installation'. # # Called by: /apps/ideas_ms2/nnscripts/make_uparam2 # which is called by /apps/ideas_ms2/bin/ideas # # Parameter input: an I-DEAS DataInstallation ID #, in NNS_DMNUM # # Created by: Blaise Montandon 12Dec95 from 1st version of the 2 scripts # sho_filesys_siz_start & sho_filesys_siz # Updated : Blaise Montandon 17Jan96 to show window-list of big files # Updated : Blaise Montandon 19Jan96 revise highlighting # Updated : Blaise Montandon 22Mar96 to handle mfgproto file system # Updated : Blaise Montandon 1Apr96 do NOT pop iconified filesys msg on # screen when all filesys < 85% full # Updated : Blaise Montandon 8May97 better .rhosts handling # # if test \( "$TERM" = 'iris-ansi' -o "$TERM" = 'iris-ansi-net' \) # then # HIbold='' # HIdim='' # HIundlin='' # HIrevvid='' # HIboldul='' # HIdimul='' # HIboldrv='' # HIdimrv='' # HIreset='' # else # HIbold='' # HIdim='' # HIundlin='' # HIrevvid='' # HIboldul='' # HIdimul='' # HIboldrv='' # HIdimrv='' # HIreset='' # fi # export HIbold HIdim HIundlin HIrevvid HIboldul HIdimul HIboldrv HIdimrv HIreset # HILITE=1 # yellow (bold) # HILITE=2 # red (dim) # HILITE=4 # underline, white # HILITE=7 # reverse video, white # HILITE=1;4 # yellow (bold) w. underline # HILITE=2;4 # red (dim) w. underline # HILITE=1;7 # yellow (bold) w. reverse video # HILITE=2;7 # red (dim) w. reverse video # HILITE=1;7;4 # yellow (bold) w. reverse video and underline # HILITE=2;7;4 # red (dim) w. reverse video and underline # set -x # ***** CHECK THAT AN IDEAS DATA-INSTALLATION ID# IS SET IN NNS_DMNUM ********* if test "${NNS_DMNUM}" = "" then echo " *** ERROR in /apps/nns_com/fea/scripts/sho_filesys_siz_start_new: NNS_DMNUM variable is not set. This script needs it. Called by: /apps/ideas_ms2/nnscripts/make_uparam2 which is called by /apps/ideas_ms2/bin/ideas. " exit fi # ***** EXIT IF IDEAS DATA-INSTALLATION ID# VAR FOR VIVID IS SET ************** # If the nns set_dmid menu is being passed by a setting of the # NNS_DATA_INSTALLATION_ID variable (as in VIVID-IDEAS routines # developed by Kobey), exit from this script -- i.e. do not post # a filesys-used info window. if test ! "${NNS_DATA_INSTALLATION_ID}" = "" then exit fi # ***** SET AN INTERESTING FONT, ACCORDING TO TIME OF ENTRY ****************************** # CURMIN=`date | cut -d: -f2` CURSEC=`date | cut -d: -f3 | cut -d" " -f1` # if [ $CURSEC -gt 35 ] # then # exit # fi # WINFONT=courb18 WINFONT=lucidasanstypewriter-bold-12 if [ $CURSEC -gt 10 -a $CURSEC -lt 18 ] then WINFONT=rock18 fi if [ $CURSEC -gt 20 -a $CURSEC -lt 28 ] then # WINFONT=-*-helvetica-bold-r-normal--14-*-*-*-p-82-iso8859-1 # WINFONT=helvb14 WINFONT=screen-bold18 fi if [ $CURSEC -gt 30 -a $CURSEC -lt 38 ] then # WINFONT=timr14 WINFONT=international15 fi if [ $CURSEC -gt 40 -a $CURSEC -lt 48 ] then # WINFONT=haebfix15 # fixed(sony): WINFONT='-*-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1' fi # # WINFONT=helvb14 PROPORTIONAL # # WINFONT=timr14 PROPORTIONAL # # WINFONT=courb18 TOO BIG # haebfix(sgi): NICE but not bold (faint) # WINFONT=haebfix15 # WINFONT=-*-haebfix-medium-r-normal--15-*-*-*-m-90-iso8859-1 # lucida???typewriter(b&h): NICE, big # WINFONT=lucidasanstypewriter-bold-12 # lucidatypewriter(b&h): NICE, smaller # WINFONT='-*-lucidatypewriter-bold-r-normal-sans-14-*-*-*-m-80-iso8859-1' # lucidatypewriter(b&h): NICE, big # WINFONT='-*-lucidatypewriter-bold-r-normal-sans-17-*-*-*-m-100-iso8859-1' # screen(sgi): NICE, big # WINFONT=screen-bold18 # WINFONT='-*-screen-bold-r-normal--18-*-*-*-m-100-iso8859-1' # international(): NICE but not bold # WINFONT=international15 # rock(...): NICE but PROPORTIONAL # WINFONT=rock18 # courier(adobe): OK # WINFONT='-*-courier-bold-r-normal--14-*-*-*-m-90-iso8859-1' # courier(bitstream): NICE # WINFONT='-*-courier-bold-r-normal--0-*-*-*-m-0-iso8859-1' # clean(schumacher): OK # WINFONT='-*-clean-bold-r-normal--15-*-*-*-c-90-iso8859-1' # fixed(sony): NICE but not bold # WINFONT='-*-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1' # fixed(misc): NICE # WINFONT='-*-fixed-bold-r-normal--15-*-*-*-c-90-iso8859-1' # iris(): NICE but a little blocky # WINFONT='-*-medium-r-normal--13-130-*-*-*-90-iso8859-1' # terminal(bitstream): NICE big # WINFONT='-*-terminal-bold-r-normal--18-*-*-*-c-110-iso8859-1' # terminal(sgi): OK but wide # WINFONT='-*-terminal-bold-r-normal--17-*-*-*-c-100-iso8859-1' # Some fonts available: # -fn variable # -fn timr18 # -fn timbi18 # -fn screen-bold16 # -fn rock18 # -fn lutbs18 # -fn lucidasanstypewriter-bold-12 # -fn lucidasans-bolditalic-12 # -fn lucidasans-bold-14 # -fn helvbo18 # -fn helvb18 # -fn haeberli24 # -fn courbo18 # -fn courb18 # -fn utopr18 # -fn Screen15 \ # -fn -sgi-screen-medium-r-normal--15-150-72-72-m-80-iso8859-1 # -fn -sgi-*-*-*-*-*-15-150-*-*-*-*-*-* \ # -fn -sgi-rock-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -sgi-haeberli-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -sgi-laura-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-courier-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-helvetica-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-itc avant garde gothic-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-itc bookman-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-new century schoolbook-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-palatino-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-times-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -adobe-utopia-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -bitstream-charter-*-r-*-*-17-*-*-*-*-*-*-* \ # -fn -bitstream-courier-*-r-*-*-17-*-*-*-*-*-*-* \ # ********************* GET THE FILESYSTEM %s *********************************** # ****** AND START FORMULATING THE LIST FOR THIS DATA INSTALLATION ************** # if test "$USER" = "ideasadm" # then # set -x # fi # ********************* DE-COMMENT THE 'set -x' ABOVE FOR TESTING ************ FILEOUT="$HOME/temp.lis" echo "\ ....... `date`....... ${HIbold} Giga bytes %used FileSystem ======== ===== =============== ${HIreset}" > $FILEOUT . /apps/nns_com/fea/scripts/mak_rhosts DFKOUTLOC=`df -k` DFKOUTA=`rsh sgia df -k` # . /apps/nns_com/fea/scripts/mv_rhosts # ................ set the ICONIC variable to default value to ............. # ................ display the Filesystem %'s in an iconified window ....... ICONIC="-iconic" # ********************* FUNCTION TO BE USED BELOW TO *********************************** # ****** GET FILE SYSTEM % USED AND OTHER INFO FOR A PARTICULAR FILESYS NAME. *********** # ****** ALSO DETERMINES WHETHER DISPLAY WILL BE ICONIFIED. *********** prt_hilite () { #------------------------------------------------------------------------ # This function is used to check percent used of a filesys and print hilited. # Usage: prt_hilite filsys-name #------------------------------------------------------------------------ # Initialize filesys="$1" if test \( "$filesys" = "/local/scratch" -o "$filesys" = "/local/scratch$" \) then PERCENT=`echo "$DFKOUTLOC" | grep "$filesys" | \ awk '{ print ($6) }' | cut -d% -f1` DFKOUT="$DFKOUTLOC" else PERCENT=`echo "$DFKOUTA" | grep "$filesys" | \ awk '{ print ($6) }' | cut -d% -f1` DFKOUT="$DFKOUTA" fi ## if test ${PERCENT} -gt 73 ## for testing if test ${PERCENT} -gt 85 then echo "$DFKOUT" | grep "$filesys" | \ awk '{printf ("%7.3f  %4s  %s \n", $3/1000000, $6, $7)}' >> $FILEOUT ICONIC="" feopt2=$LISTYPE else echo "$DFKOUT" | grep "$filesys" | \ awk '{printf ("%7.3f  %4s  %s \n", $3/1000000, $6, $7)}' >> $FILEOUT fi } # **************** SHOW FILESYS INFO FOR /usr/people & /local/scratch ********** # **************** (THIS IS DONE NO MATTER WHAT INSTALLATION-ID) *************** LISTYPE="HOM" # prt_hilite '/usr/people ' prt_hilite '/usr/people$' LISTYPE="LOC" #prt_hilite '/local/scratch' prt_hilite '/local/scratch$' SHOLOC="" if test "${feopt2}" = "LOC" then SHOLOC="yes" fi # **************** USE INSTALLATION ID TO SELECT THE FILESYS INFO TO SHOW ********** case ${NNS_DMNUM} in 1) # ideas dmid 1 - subs echo " For 'subs' projects:" >> $FILEOUT LISTYPE="SPF" # prt_hilite '/proj1 ' prt_hilite '/proj1$' LISTYPE="SPF2" # prt_hilite '/proj1/subs2 ' prt_hilite '/proj1/subs2$' LISTYPE="SPDA" # prt_hilite '/proj1a ' prt_hilite '/proj1a$' LISTYPE="STF" # prt_hilite '/ideas_team1 ' prt_hilite '/ideas_team1$' ;; 2) # ideas dmid 2 - nuc echo " For 'nuc' projects:" >> $FILEOUT LISTYPE="NPF" # prt_hilite '/proj2 ' prt_hilite '/proj2$' LISTYPE="NTF" # prt_hilite '/ideas_team2 ' prt_hilite '/ideas_team2$' ;; 3) # ideas dmid 3 - cvn echo " For 'cvn' projects:" >> $FILEOUT LISTYPE="CPF" # prt_hilite '/proj3 ' prt_hilite '/proj3$' echo " For 'cvn' (& 'othr') projects:" >> $FILEOUT LISTYPE="CTF" # prt_hilite '/ideas_team3 ' prt_hilite '/ideas_team3$' ;; 4) # ideas dmid 4 - othr echo " For 'othr' projects:" >> $FILEOUT LISTYPE="OPF" # prt_hilite '/proj3/othr ' prt_hilite '/proj3/othr$' echo " For 'othr' (& 'cvn') projects:" >> $FILEOUT LISTYPE="OTF" # prt_hilite '/ideas_team3 ' prt_hilite '/ideas_team3$' ;; 5) # ideas dmid 5 - washdc echo " For 'washdc' projects:" >> $FILEOUT LISTYPE="" # prt_hilite '/proj5 ' prt_hilite '/proj5$' LISTYPE="" # prt_hilite '/ideas_team5 ' prt_hilite '/ideas_team5$' ;; 21) # ideas dmid 21 - mfgproto echo " For 'mfgproto' projects:" >> $FILEOUT LISTYPE="" # prt_hilite '/proj21 ' prt_hilite '/proj21$' LISTYPE="" # prt_hilite '/ideas_team21 ' prt_hilite '/ideas_team21$' ;; 91) # ideas dmid 91 - test1 echo " For 'trng', 'test1', & 'test2' projects:" >> $FILEOUT LISTYPE="" # prt_hilite '/proj4 ' prt_hilite '/proj4$' LISTYPE="" # prt_hilite '/ideas_team4 ' prt_hilite '/ideas_team4$' ;; 92) # ideas dmid 92 - test2 echo " For 'trng', 'test1', & 'test2' projects:" >> $FILEOUT LISTYPE="" # prt_hilite '/proj4 ' prt_hilite '/proj4$' LISTYPE="" # prt_hilite '/ideas_team4 ' prt_hilite '/ideas_team4$' ;; 0) # ideas dmid 0 - trng echo " For 'trng', 'test1', & 'test2' projects:" >> $FILEOUT LISTYPE="" # prt_hilite '/proj4 ' prt_hilite '/proj4$' LISTYPE="" # prt_hilite '/ideas_team4 ' prt_hilite '/ideas_team4$' ;; *) # all sgia partitions for any other entry in $1 echo " For 'subs' projects:" >> $FILEOUT LISTYPE="" # prt_hilite '/proj1 ' # prt_hilite '/proj1a ' # prt_hilite '/ideas_team1 ' prt_hilite '/proj1$' prt_hilite '/proj1a$' prt_hilite '/ideas_team1$' echo " For 'nuc' projects:" >> $FILEOUT # prt_hilite '/proj2 ' # prt_hilite '/ideas_team2 ' prt_hilite '/proj2$' prt_hilite '/ideas_team2$' echo " For 'cvn' & 'othr' projects:" >> $FILEOUT # prt_hilite '/proj3 ' # prt_hilite '/ideas_team3 ' prt_hilite '/proj3$' prt_hilite '/ideas_team3$' echo " For 'trng', 'test1', & 'test2' projects:" >> $FILEOUT # prt_hilite '/proj4 ' # prt_hilite '/ideas_team4 ' prt_hilite '/proj4$' prt_hilite '/ideas_team4$' ;; esac # **************** ADD CLEANUP HELP/GUIDELINES FOR USERS ********** echo " ............................................................... ${HIbold} 1.${HIboldul} If /usr/people is more than 85% full, ${HIbold}please check your ${HIreset}home directory${HIbold} and its ${HIreset}'ideas' subdirectory. ${HIundlin} Remove ${HIreset} large files ... or ${HIundlin} move ${HIreset} short-term,usem-and-deletem files to /local/scratch. ${HIdim}See FEA/MCADD menu options${HIbold} 'u f uy/uh/ud/uf', 'u f cl', 'u f rc', 'u f cm' ${HIdim}for some utilities to periodically ${HIbold}summarize/delete/move/compress files. You can use ${HIreset}'c sz hom'${HIbold} to see the${HIreset} major users${HIbold} of /usr/people, use${HIreset} 'u f ud'${HIbold} to see the${HIreset} major directories${HIbold} of those users, and ${HIreset}'u f uf'${HIbold} to identify their${HIreset} huge files${HIbold}. Call the user or alert C63 OS Support through 8-HELP, to get${HIreset} huge files${HIbold} removed. ${HIdim}'u n iu' or 'u o i' shows a userid-username table. Notes to big users may be automated soon through the mail system. ${HIbold} 2.${HIboldul} If /proj# is more than 85% full, ${HIbold}please check for ${HIreset}model files${HIbold} and ${HIreset}drawing setup files ${HIbold}that can be removed via ${HIreset} Item/Project Management ${HIbold} in I-DEAS. ${HIboldrv} And FEA users should look for output/input files to delete from /proj#/.../FEA-userid directories ... and model files from which FE analysis results can be removed. You can compress the cleaned model file by save-as to a new model file. Delete the old model file. ${HIreset} ${HIbold} 3.${HIboldul} If /ideas_team# is more than 85% full, ${HIbold}please check for ${HIreset}part, assembly, and drawing files ${HIbold}that can be removed via ${HIreset} Library Management ${HIbold} in I-DEAS. ${HIbold} 4.${HIreset} Notify your (departmental) 'I-DEAS or FEA Project Data & Data-Space Coordinator' if there appears to be a looming space crunch, or if your project may consume a file system." >> $FILEOUT # ***Press Enter (with mouse-cursor in this window) to close this window." # read NNS_JUNK if test "${ICONIC}" = "" then echo " ${HIboldrv} !! A FILE SYSTEM ABOVE IS MORE THAN 85% FULL!! !!TAKE ACTION!! ${HIreset}" >> $FILEOUT fi # set - # ..................... DISPLAY THE PREPARED LISTING .................... FEDIR=/apps/nns_com/fea export FEDIR # xwsh -bg midnightblue -fg white \ if test \( "$ICONIC" = "" -a ! "$feopt2" = "HOM" -a ! "$feopt2" = "LOC" \) then echo " ${HIboldrv} A size-sorted list of I-DEAS project/team files will be presented in an adjacent window.${HIreset}" >> $FILEOUT fi if test \( "$ICONIC" = "" -a "$feopt2" = "HOM" \) then echo " ${HIboldrv} A size-sorted list of SGIA users' Home directories will be presented in an adjacent window.${HIreset}" >> $FILEOUT fi if test "$ICONIC" = "" then xwsh -bg blue4 -fg white \ -title "shoFILSYSused" -name "shoFILSYSused" -hold \ $ICONIC -fn $WINFONT \ -geometry 65x56+010+010 \ -autofork -e cat $FILEOUT # -e $FEDIR/scripts/shofil $FILEOUT fi # -fn Screen15 \ # -geometry 80x34+010+330 \ # ... WHEN THE ABOVE WINDOW IS NOT ICONIFIED (I.E. A FILE-SYSTEM IS > 85%) .... # ...... *** AND THE FILE SYSTEM IS NOT /USR/PEOPLE or /LOCAL, *** ............ # ............... DISPLAY A MENU OF BIG-DIRS&FILS LISTING ..................... if test \( "$ICONIC" = "" -a ! "$feopt2" = "HOM" -a ! "$feopt2" = "LOC" \) then feopt1="" # feopt1="NOMENU" export feopt1 feopt2 xwsh -bg blue4 -fg white \ -title "shoBIGdirfils" -name "shoBIGdirfils" \ -fn Screen15 \ -geometry 80x44+600+010 \ -e $FEDIR/scripts/engdirfil_sizes.menu CtlBreak # -autofork -e $FEDIR/scripts/engdirfil_sizes.menu CtlBreak # -hold \ # The above listings are generated by ideasadm using the script # /usr/people/ideasadm/cleandir/CREAT_PROJSIZ_LISTS fi # ... WHEN THE ABOVE WINDOW IS NOT ICONIFIED (I.E. A FILE-SYSTEM IS > 85%) .... # ...... *** AND THE FILE SYSTEM IS /USR/PEOPLE, *** .......................... # ............... DISPLAY A MENU OF BIG-DIRS&FILS LISTING ..................... if test \( "$ICONIC" = "" -a "$feopt2" = "HOM" \) then feopt1="" # feopt1="NOMENU" export feopt1 feopt2 xwsh -bg blue4 -fg white \ -title "shoBIGHOMEdirs" -name "shoBIGHOMEdirs" \ -fn Screen15 \ -geometry 80x44+600+010 \ -e $FEDIR/scripts/engdirfil_sizes.menu CtlBreak # -autofork -e $FEDIR/scripts/engdirfil_sizes.menu CtlBreak # -hold \ # The above listings are generated by ideasadm using the script # /usr/people/ideasadm/cleandir/CREAT_PROJSIZ_LISTS fi if test "${SHOLOC}" = "yes" then xwsh -bg blue4 -fg white \ -title "sho_LOCSCR_fils" -name "sho_LOCSCR_fils" \ -fn Screen15 \ -geometry 80x44+600+010 \ -e $FEDIR/scripts/sho_locscr_fils # -autofork -e $FEDIR/scripts/sho_locscr_fils fi # if test "$USER" = "ideasadm" # then # set - # fi exit