690 likes | 993 Views
Colleague System Maintenance. File System Administration & Maintenance – Part One. Cinda Goff Chuck Hauser 2005-10-26. Presentation Conventions. Names (files, users, daemons) are usually in bold: /etc/syslog.conf
E N D
Colleague System Maintenance File System Administration & Maintenance – Part One Cinda Goff Chuck Hauser 2005-10-26
Presentation Conventions • Names (files, users, daemons) are usually in bold:/etc/syslog.conf • System dependent or variable items are usually in italics: /var/sadm/patch/patchnumber/log • File entries and output are in mono-spaced type:> root 8036 c Tue Apr 26 23:59:00 2005 < root 8036 c Tue Apr 26 23:59:59 2005 • Ämarks a line wrapped to fit on the slide:mv Solaris_8_Recommended_log ÄSolaris_8_Recommended_log.yyyymmdd • ð marks a horizontal tab (09 hex) • Reference OE is Solaris 8 • Reference UniData is 6.0
Introduction • Why maintain files • UniData File Maintenance and Utilities • Account File Cleanup • Transaction Log Cleanup • Status File Purging • File Rebuilds
UniData Maintenance Utilities • Datatel’s WUFA - Weekly Udt File Analysis (free) • Fitzgerald & Long’s FAST - File Analysis and Sizing Tool (license required)
WUFA & FAST Primary Functions • Report file storage • Recommend optimum block size and modulo selection • Automate file resizing
WUFA • Reports on and resizes both static and dynamic files • Support recently added for dictionaries
WUFA Recommendations • Leave all files static upon initial installation • Use weekly WUFA run to evaluate whether some files should be redefined as dynamic • For more information see AnswerNet document 147.992: Whether to use Static vs Dynamic UniData Files in Colleague.
WUFA Processing • Performs thorough system analysis on both static and dynamic files • Provides data file, UDT_GUIDE, for statistical queries • Creates DATATEL.RESIZE.FILES paragraph for file resizing
Running WUFA • WUFA can be run with users on system • DATATEL.RESIZE.FILES must be run in a quiet account • Use cron to automate WUFA execution
Automating WUFA with cron Create for each account: • shell script for cron execution • Datatel crontab entry to run shell script • VOC paragraphs to run WUFA
Datatel wufascript crontab entry • Login as datatel • If the EDITOR environment variable is not set or exported, give the command:EDITOR=vi ; export EDITOR • Giving this command to edit crontab:crontab –e • Add the following line to run the wufa script every night, Monday through Thursday: 0 22 * * 1-4Ä /export/home/datatel/wufascript_collive
Unix Script to run WUFA • Use vi (or another editor) to create a unix shell script that runs a UniData paragraph for the live remote account.cd /export/home/datatelvi wufascript_collive • Make sure the cd command in the script points to the appropriate account: #!/usr/bin/kshumask 007 cd /datatel/live/collive UDTBIN=/usr/ud60/bin UDTHOME=/usr/ud60 export UDTBIN UDTHOME $UDTBIN/udt<<ineof WUFALO ineof #EOF
Variant WUFA Shell Script(part 1) This version will accept an argument specifying the account to run in; the default account is /datatel/live/collive. Example: # wufa.ksh colconv #!/usr/bin/ksh # @(#)wufa.ksh 1.5 @(#) # @(#) Source: cis:/opt/local/sbin/SCCS/s.wufa.ksh 1.5Ä 05/10/20 11:42:54 @(#) # @(#) Last update: 05/10/20 11:42:56 @(#) # # Local Variables PROG="`basename $0`" DEFAULT_DATATELDIR="/datatel/live/collive" DATATELDIR=""
Variant WUFA Shell Script(part 2) # Get UniData Variables . /usr/local/udtparams # Only datatel should run this. UID is probably 100, # but to be safe check user name. UNAME=`id | sed -e 's/).*$//' -e 's/^uid=.*(//'` if [ $UNAME != "datatel" ] then printf "$PROG: stopping, should be run by user Ä datatel.\n" exit 1 fi Use the dot command to load the current UniData value for UDTBIN, umask, etc.
Variant WUFA Shell Script(part 3) if [ "$1" ] then case "$1" in *live ) DATATELDIR="/datatel/live/collive" ;; *test ) DATATELDIR="/datatel/work/coltest" ;; *conv ) DATATELDIR="/datatel/work/colconv" ;; *LIVE17 ) DATATELDIR="/datatel/release/LIVE17/INSTALL" ;; *TEST17 ) DATATELDIR="/datatel/release/TEST17/INSTALL" ;; *DEBUG17 ) DATATELDIR="/datatel/release/DEBUG17/INSTALL" ;; * ) printf "$PROG: stopping, bad datatel directory Ä($1) specified!\n" ; exit 2 ;; esac else DATATELDIR="$DEFAULT_DATATELDIR" fi Test for a script argument. If there is one, choose the correct account. If there is no argument, use the default account (collive).
Variant WUFA Shell Script(part 4) if [ ! -d $DATATELDIR ] then printf "$PROG: stopping, directory $DATATELDIR does notÄ exist!\n" exit 3 fi cd $DATATELDIR $UDTBIN/udt<<INEOF WUFA LO INEOF logger -p user.info "WUFA run on $DATATELDIR" # End /opt/local/sbin/SCCS/s.wufa.ksh
WUFA VOC paragraphs • Create a VOC paragraph in each account that will run WUFA and send the results to a hold file. • Create additional VOC paragraphs for two more hold files that will list any damaged files and any files in level 2 overflow.
VOC paragraph to run WUFA Top of "WUFA" in "VOC", 11 lines,Ä 167 characters. 001: PA 002: SETPTR ,,,,,3,BANNER UNIQUE WUFA,BRIEF 003: WEEKLY.UDT.FILE.ANALYSIS 004: SETPTR ,,,,,3,BANNER UNIQUE DAMAGED,BRIEF 005: XNC.DAMAGED.FILES 006: SETPTR ,,,,,3,BANNER UNIQUE OVER2,BRIEF 007: XNC.OVERFLOW.FILES Bottom
VOC Entry for Damaged Files Top of "XNC.DAMAGED.FILES" in "VOC",Ä 2 lines,103 characters. 001: S 002: LIST UDT_GUIDE BY FILE_NAME WITH Ä DATATEL.DAMAGED GT "" FILE_NAME Ä FMT "25" STATUS DATATEL.DAMAGED LPTR Bottom.
VOC Entry for Overflow 2 Files Top of "XNC.OVERFLOW.FILES" in "VOC",Ä2 lines, 177 characters. 001: S 002: LIST UDT_GUIDE BY FILE_NAMEÄFILE_NAME FMT "25L" STATUS OVERFLOW2 ÄDATATEL.DAMAGED ID.SUP WITHÄDATATEL.DAMAGED GT "" OR WITHÄOVERFLOW2 GT 1 BLOCKSIZEÄNEW_BLOCKSIZE FILETYPE LPTR Bottom.
Resizing Files – MEMRESIZE • WUFA creates a DATATEL.RESIZE.FILES paragraph that assumes a VOC entry called MEMRESIZE. • MEMRESIZE executes the unix level memresize command. • Create a MEMRESIZE entry in both remote and install accounts: AE VOC MEMRESIZE Top of "MEMRESIZE" in "VOC", 2 lines, 77 characters. *--: P 001: PA 002: !/usr/ud60/bin/memresize <<I2,file>> Ä<<I3,modulo>> <<C4,ARG>> memory 32678 Bottom.
Resizing Files • Run the DATATAL.RESIZE.FILES paragraph on a weekly basis. • Exclude files from being resized by putting them in a RESIZE.EXCLUDE savedlist. • The VOC file is always excluded from DATATEL.RESIZE.FILES.
Datatel resizescript crontab entry • Login as datatel • If the EDITOR environment variable is not set or exported, give the command:EDITOR=vi ; export EDITOR • Giving this command to edit crontab:crontab –e • Add the following line to run the script every Saturday morning: 0 2 * * 6 /export/home/datatel/resizescript_collive
Unix Script to run MEMRESIZE • Use vi (or another editor) to create a unix shell script that runs a UniData paragraph for the live remote account.cd /export/home/datatelvi resizescript_collive • Make sure the cd command in the script points to the appropriate account: #!/usr/bin/kshumask 007 cd /datatel/live/collive UDTBIN=/usr/ud60/bin UDTHOME=/usr/ud60 export UDTBIN UDTHOME $UDTBIN/udt<<ineof DATATEL.RESIZE.FILES LO ineof #EOF
Resizing the VOC File • The DATATEL.RESIZE.FILES paragraph will not resize the VOC file • VOC files should always be resized manually. • The account should always be quiet with no user having access to the account. • The steps are performed either from an account colon prompt or at the Unix prompt in the account directory.
Steps for Resizing the VOC (Part 1) • From the colon/SHEL prompt, create a new file with the proper modulo and blocksize as recommended by WUFA: CREATE.FILE VOC.NEW 179,2 • Copy records from the original VOC file to the new VOC: COPY FROM VOC TO VOC.NEW ALL
Steps for Resizing the VOC (Part 2) • From the Unix prompt in the account directory, rename the VOC files and remove the dictionary of the new VOC: # mv VOC VOC.OLD# mv VOC.NEW VOC# rm D_VOC.NEW • From the colon/SHEL prompt, delete the VOC entry for VOC.NEW: DELETE VOC VOC.NEW
Application/Account File Cleanup • appl.PPROCESS purge (UTJP) • Transaction Log Cleanup • EDX.STATUS purge • ELF.TRANSACTIONS purge • Express Load Purge Repository (ELPR) • appl.PRINTERS
Transaction Log Cleanup - UTTP • UTTP can only be run against files for which transaction logging has been set up locally. • If no transaction logging has been set up, this process does not need to be run on a regular basis.
appl.PPROCESS Purge (UTJP) • Access the UTJP screen from the appropriate application in a remote account. • UTJP allows selection by date and time of process, by username, or by mnemonic.
EDX Status Archive Purge (EDSP) • The EDX phantom creates a record in the EDX archive (the EDX.STATUS file) for each DMI transaction. • The records stay in this file until you delete them. Use the EDX Status Archive Purge (EDSP) screen to delete records from the EDX archive .
ELF.TRANSACTIONS Purge (EPRG) • The ELF.TRANSACTIONS file is purged with the EPRG screen. • This screen allows you to purge batches that were imported into Colleague through the ELF routines. • These records are not archived, so once they are purged, they are gone.
Express Load File Purge (ELPR) The Express Load Purge Repository (ELPR) process purges: • unneeded IMAGE directories • VOC paragraphs • data backup repositories for successfully installed software updates
ELPR Screen • You can specify whether or not to purge each item. • In the bottom part of the screen, you can select the software update batches for purging by entering Yes in the Purge field (the default is “No”).
ELPR Comments • Remember that the software updates repository may be shared by more than one installation account. • If it is shared by more than one installation account, make sure you don't purge the IMAGE directories from this software updates repository until you have loaded those updates into the other installation accounts sharing this repository.
ELPR Issue • There is a known issue with ELPR if you have many items to purge. • See AnswerNet document 8870.89 - S_MIO_OPEN errors on ELPR for a workaround.
appl.PRINTERS VOC RUN.#### files _PH_ COMO Output _HOLD_ Records SAVEDLISTS PARAMETERS JSPARAMS X.SECURITY.LOG AE_COMS WWW.STATE & WWW.TOKENS Files Purged at the Colon Prompt
appl.PRINTERS • Records inappl.PRINTERS beginning with SETPTR can be safely purged. • This should be done in a quiet account. • Run this command for each application: SELECT appl.PRINTERS WITH @IDÄ LIKE ‘SETPTR…’ • If the above command returns records, execute this command:DELETE appl.PRINTERS
VOC Process Entries • Some Colleague processes create entries in the VOC that can be cleaned up. • The entries should be removed in a quiet account. • Run this command to remove RUN.#### files: SELECT VOC @ID LIKE “’RUN.’…”Ä AND WITH F1 UNLIKE “C…” • If the above command returns records, execute this command:DELETE VOC
Express Load VOC Entries • The Express Load process creates various entries in the VOC of both the install and remote accounts. • Because multiple naming conventions were used in the past for patches, there are multiple steps for safely removing the various VOC entries. • After the initial cleanup, all of the following steps may not be needed.
Steps to Remove Express Load Entries • Select the _17014_UNIX records: SELECT VOC WITH @ID LIKE …_17014_UNIX… • If the above command returns records, execute this command:DELETE VOC • Select the _170_U records: SELECT VOC WITH @ID LIKE …_170_U… • If the above command returns records, execute this command:DELETE VOC
Steps to Remove Express Load Entries continued • Select the _4178_U records: SELECT VOC WITH @ID LIKE …_4178_U_… • If the above command returns records, execute this command:DELETE VOC
_PH_ / _HOLD_ / SAVEDLISTS Directory Files • These are directory files in each account that are used by various UniData and Colleague processes. • Most of the data in these files can be purged on a periodic basis, but each college should set local naming conventions and retention standards.
_PH_ Records • The _PH_ file stores records of all processes executed in background mode and the output for COMO commands. • COMO output records start with an O_ and the name assigned when starting the como.
_PH_ Background Record Keys Each background record has a multi-part key: • ID of the VOC record executed in background mode • The internal representation of the time the process was executed • The internal representation of the data on which the process was executed
The _HOLD_ File • The HOLD file is the database file in which Envision Run Time writes report output for processing by the BROWSE utility. • Some records are keyed by the date and time the user sent report output to the HOLD file. • Other records have IDs that are strings users entered.
SAVEDLISTS File • The SAVEDLISTS file stores any created list the user has saved using the SAVELIST command. • Envision Run Time also temporarily stores lists of records ids for use in procedures in the SAVEDLISTS file
savedlists File • The savedlists file (lower case) is a workfile that is used when selecting on multivalues. • All data in this file is transient and can be deleted in a quiet account.
PH,HOLD, andSAVEDLISTS Clean Up • Multiple ways to clear data in these files. • Method used depends on a college’s standards and procedures.
The CLEAR.FILE method for PH,HOLD, andSAVEDLISTS Accounts • The UniData CLEAR.FILE command can be used to clear all records in the file:CLEAR.FILE filename • The CLEAR.ACCOUNT command issues a CLEAR.FILE command for the _PH_ and _HOLD_ files.