Patch Name: PHCO_1423 Patch Description: Avoid unnecessary stat calls by /bin/ls ls is reported to run very slow for NFS mounted file systems and the performance becomes unbearable on slow networks and in directories having large number of files. The reason why ls runs slow is that it does a stat() for each file in the directory. This is done so as to support Context Dependent Files (CDFs) on HP-UX since ls needs to use stat() call to determine if an entry existing in the directory is valid in the current context or not. ls does not list CDFs which are not valid in the context of the machine on which the CDF exists. The problem was reported at customer sites using a Domain system as the NFS server. Fix: A special version of ls is being provided which will work fine on systems which do not have CDFs. By putting this restriction, calls to stat() system call have been reduced and are not done as long as only file names are requested. On systems containing CDFs, ls will work fine in most of the cases but behave differently if a directory contains a hidden CDF which is not valid in the current context ( henceforth, referred to as "hidden CDF" ). Normally ls does not list such files unless it is invoked with -H option. The behavior of patched version for such files will be as follows : (i) If ls is invoked without any command line option or with a command line option that does not print any information other than the file name, such hidden CDFs will be displayed. (ii) If ls is invoked with the name of this hidden CDF as a command line argument it will print an error "... not found" (iii) If ls is invoked with a command line option which necessitates a stat(), hidden CDFs will not be displayed and no error will be flagged. (iv) If ls is invoked with -H option, the hidden CDF will be displayed with a + sign after file name. (v) If ls is invoked with the name of hidden CDF with a + sign appended to the end of the file name, the individual components of the CDF will be displayed. The unpatched version of ls will behave the same as the patched version in the situations 2 to 5 above; only in the first situation the patched version of ls will behave differently. For details on CDF and process context see man CDF(4) and context(4). Path Name: /hp-ux_patches/s700/8.X/PHCO_1423 Effective Date: 920814 Patch Files: /bin/l /bin/ll /bin/ls /bin/lsf /bin/lsr /bin/lsx SR#: None "what" string/timestamp: ./bin/l: $Revision: 70.3 $ PATCH_8_07: ls.o 92/08/14 ./bin/ll: $Revision: 70.3 $ PATCH_8_07: ls.o 92/08/14 ./bin/ls: $Revision: 70.3 $ PATCH_8_07: ls.o 92/08/14 ./bin/lsf: $Revision: 70.3 $ PATCH_8_07: ls.o 92/08/14 ./bin/lsr: $Revision: 70.3 $ PATCH_8_07: ls.o 92/08/14 ./bin/lsx: $Revision: 70.3 $ PATCH_8_07: ls.o 92/08/14 "sum" output: 36257 328 ./bin/l 36257 328 ./bin/ll 36257 328 ./bin/ls 36257 328 ./bin/lsf 36257 328 ./bin/lsr 36257 328 ./bin/lsx Dependencies: None. Supersedes: None. Patch Package Size: 205 Kbytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. Note: Please back up your system before you patch. --------------------------------------------------------------------------- After getting the patch onto your machine, unshar the patch (sh PHCO_1423). To install this patch do the following: 1) Run the update program (Note: you must be logged in as root to update a system). 2) Once in the update "Main Menu" move the highlighted line to "Change Source or Destination ->" and press "Return" or "Select Item". 3) Make sure the highlighted item in the "Change Source or Destination" window is "From Tape Device to Local System ...", then press "Return" or "Select Item". 4) You should now be in the "From Tape Device to Local System" window. Change the "Source: /dev/rmt/0m" to "Source: /tmp/PHCO_1423.updt" (this assumes that you are in the /tmp directory where PHCO_1423.updt has been placed). Note: You must enter the complete path name. 5) Press "Done". 6) From here on follow the standard directions for update. The customized script that update runs will move the original software to /system/PHCO_1423/orig. HP recommends keeping this software there in order to recover from any potential problems. It is also recommended that you move the PHCO_1423.text file to /system/PHCO_1423 to be retained for future reference. If you wish to put this patch on a magnetic tape and update from the tape drive, dd a copy of the patch to the tape drive. As an example the following will create a copy of the patch that update can read: dd if=PHCO_1423.updt of=/dev/rmt/0m bs=2048