README for UW Locate SYNOPSIS locate - Quickly search an afs cell for a file. Also, anaylize mount point data for the cell. DEPENDENCIES UW Locate requires perl and GNU make. COMPONENTS README - This file. locate.perl - The user client to search the locate db. locate.man - Man page for locate. do-index.perl - Generates the locate data on each afs file server. do-update.perl - Builds master indices and mount point data. cellname, mkdirs - Installation scripts. mount-analysis.perl - Generates reports of cell mount points. locate-index.sh - Wrapper for do-index locate-update.sh - Wrapper for do-update Makefile - Makefiles for various architectures index.c - Get files & mount points in one afs volume. PREPARATION There are two directory trees needed by locate; the data tree and the program tree. By default they are in the same location, /afs//common/afs. The install process creates all the needed subdirectories. You should create and replicate a volume (volumes if you put the data and programs in separate locations), and mount it. You need to mount both the readonly and read-write volumes. By default, the RO is mounted at /afs//common/afs, and the read-write at /afs//common/afs.rw. If you choose not to replicate the volume, change the values in the Makefile, defining the appropriate *_RW to have the same values as the read-only versions. INSTALLATION 1) Edit the Makefile, substituting values for the following variables: PERL - The location of your perl binary LOCATE_DIR & LOCATE_RW - The location of the locate databases and supporting files. The defaults are /afs//common/afs and /afs//common/afs.rw. BINROOT & BINROOT_RW - The root of the directory tree that contains the server and client programs and the client man page. The default is /afs/. GZIP - The location of the gzip command in your environment. The default is to use $PATH. If you don't have gzip, you should be able to substitute /bin/true, but I haven't verified this. 2) Create the LOCATE_DIR directory (probably in its own volume). Then type 'make dirs' to create the hash directories used by index/locate. 3) You need to come up with a method for updating the locate database from a bos cron job. We have a script, /usr/afs/etc/afsklog, which gets us a token (but I haven't included it in this distribution). Alternatively, you can use a host-based acl on the locate db directories. If you use a token scheme, edit the do-*.perl scripts, replacing the afsklog section with you token program. 4) Build index, customize the scripts, and install the server and client programs for each architecture. The makefile has several sets of libraries for different architectures. Uncomment the AFS_LIB definition for a target architecture and save the Makefile. Then go to a machine of that architecture and type 'make install'. Do this for each target architecture. 5) Create bos cron jobs to rebuild the db on some schedule. The locate-index script needs to be run on each file server, and the locate-update script must be run on only one server. At cs.wisc.edu, we update the database once a week. Thus our bos create statements for two servers 'foo' and 'bar' would look something like this (substitute the directory where you installed the scripts for /sbin below): % bos create foo locate-index cron '/sbin/locate-index' \ 'sun 8:00' % bos create bar locate-index cron '/sbin/locate-index' \ 'sun 8:00' % bos create foo locate-update cron '/sbin/locate-update' \ 'sun 8:05' You would also create locate-index jobs for any other file servers in your cell. Also note the the locate-update script starts 5 minutes after the locate-index script. 6) Once the database has been created, the locate command can be used to quickly find any file in your cell. In addition, the mount-analysis command (run from locate-update), will place reports in /afs//[.]reports about mount points, volumes, setuid/setgid files, and file size distribution data for the cell. CONTACTS This distribution is available via anonymous ftp from URL: ftp://ftp.cs.wisc.edu/pub/afs/locate.tar.gz or from afs path /afs/cs.wisc.edu/public/pub/afs/locate.tar.gz. Comments, bugs, and enhancements can be e-mailed to afs@cs.wisc.edu