!!!NOTICE!!! !!!NOTICE!!! !!!NOTICE!!! !!!NOTICE!!! !!!NOTICE!!!! ! ! ! Revision 1.29 represents the end of life for lslk. I don't have time ! ! to support it. Please don't report bugs to me. I will politely ! ! decline to work on them. ! ! ! ! Vic Abell , July 11, 2001 ! ! ! !!!NOTICE!!! !!!NOTICE!!! !!!NOTICE!!! !!!NOTICE!!! !!!NOTICE!!!! Notes for the Lock File Lister, lslk ******************************************************************** | The latest release of lslk is always available via anonymous ftp | | from vic.cc.purdue.edu. Look in pub/tools/unix/lslk. | ******************************************************************** Contents Introduction UNIX Dialects Supported Dialect Notes Checking the Distribution Building Lslk Installing Lslk Running Lslk Distribution Restrictions Cautions Warranty Bug Reports Version Release Notes Y2K Statement Introduction ============ The UNIX lock file lister, lslk, attempts to list all the locks held on the local files of the executing system -- i.e., on the active inodes. The locks may come from local processes or remote ones on NFS clients, served by the executing system. Note: Linux and PTX 2.1.9 lslk don't report on locks held by remote NFS client processes. Note the restriction that local files must be represented by inodes for lslk to find their locks. If a UNIX dialects uses another types of local file system -- e.g., a Veritas VxFS file system -- lslk won't be able to find locks on files in such a file system. UNIX Dialects Supported ======================= AIX 3.2.5, 4.1.4, and 4.2[.1] DEC OSF/1, Digital UNIX, and Tru64 UNIX [2345].[01] and 3.2 Linux SCO OpenDesktop or OpenServer 3.0 and 5.0.[0245] Sequent PTX 2.1.9, 4.2.1, 4.3, and 4.4 Solaris 2.[345], 2.5.1, 2.6, 7, and 8 -- excluding Veritas VxFS SunOS 4.1.[34] Dialect Notes ============= Chris Eleveld did the Digital UNIX and Linux /dev/kmem-based lslk ports. I helped expand, refine, and test the Digital UNIX port on DEC OSF/1 and Tru64 UNIX. I did the Linux /proc-based lslk port on a test system provided by Steve Logue , and the Tru64 UNIX 5.0 port on a test system provided by Berkley Shands Chris notes that he was unable to locate information on remote Linux locks, so his Linux /dev/kmem-based port doesn't report on them; neither does my /proc-based port. (Linux doesn't do remote locking.) Chris also doubts that the /dev/kmem-based lslk will report on locks on dynamic inodes like those on the Win-95 file system. (The /proc-based lslk probably will.) Gaylord Holder helped tested lslk on Digial UNIX 4.0. Lslk can't find locks on local Solaris Veritas VxFS files. Checking the Distribution ========================= The lslk Configure script runs a script to take an inventory of the lslk distribution. The script is found in the Inventory file. It compares the files extracted from the lslk distribution tar archive with a list in the file MANIFEST. If you don't want to take inventory, use the -n flag when you run the Configure script and Configure won't execute the Inventory script. Building Lslk ============= To build: $ Configure $ make To see the list of supported UNIX dialects: $ Configure -h Note that a given lslk executable is specific to the dialect version under which it was compiled. Installing Lslk =============== To run lslk you must have permission to read /dev/kmem, etc. -- except for the /proc-based Linux lslk (See the next paragraph.) Permission to read /dev/kmem is usually available if the real GID that executes lslk is in the group that is authorized to read /dev/kmem, and is certainly available if the real UID is root. The Makefiles have no install rules, but do have some suggestions on how you might go about installing lslk. The /proc-based Linux lslk can run without any special permissions, but it probably won't be able to report file sizes and full path names (in Linux 2.1.x kernels that report them), because it probably won't be able to scan the /proc//fd/ subdirectories for all processes holding locks. If you want the /proc-based lslk to be able to report size and path names for all locks, you must install lslk setuid-root. Running Lslk ============ See the man page source, lslk.8, the formatted man page, lslk.man, or the output of the ``-h'' option for information on lslk options. The options allow the lslk user to specify criteria for selecting which locks will be listed. Distribution Restrictions ========================= Lslk may be used and distributed freely, subject to these limitations: 1. Neither the author nor Purdue University is responsible for any consequences of the use of this software. 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. Credit to the author and Purdue University must appear in documentation and sources. 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. This notice may not be removed from or altered in the lslk source files. Cautions ======== Lslk is a tool that is closely tied to the UNIX operating system version. Except for the /proc-based Linux lslk, it uses header files that describe kernel structures and reads kernel structures that typically change from OS version to OS version. DON'T TRY TO USE AN LSLK BINARY, COMPILED FOR ONE UNIX OS VERSION, ON ANOTHER. On some UNIX dialects, notably SunOS and Solaris, lslk versions may be even more restricted by architecture type. An lslk binary, compiled for SunOS 4.1.3 on a sun4c machine, for example, won't work on a sun4m machine. Although I have no evidence that they exist, the potential for similar restrictions exists in Solaris versions of lslk. AN LSLK BINARY, COMPILED FOR ONE SOLARIS ARCHITECTURE, ISN'T GUARANTEED TO WORK ON A DIFFERENT SOLARIS ARCHITECTURE. One final caution: lslk only examines inodes to find local files that might be locked. If local files aren't represented by inodes -- e.g., as in a Veritas VxFS file system -- lslk won't find their locks. Warranty ======== Lslk is provided as-is without any warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of lslk is with you. Should lslk prove defective, you assume the cost of all necessary servicing, repair, or correction. Bug Reports =========== Now that the obligatory disclaimer is out of the way, let me hasten to add that I accept lslk bug reports and try hard to respond to them. I will also consider and discuss requests for new features, ports to new dialects, or ports to new OS versions. PLEASE DON'T SEND A BUG REPORT ABOUT LSLK TO THE UNIX DIALECT VENDOR. At worst such a bug report will confuse the vendor; at best, the vendor will forward the bug report to me. Please send all bug reports, requests, etc. to me via e-mail at . Version Release Notes ===================== Version release notes may be found in the CHANGELOG file of the lslk distribution. Y2K Statement ============= Lslk is probably Y2K compliant.. The only time code in lslk have uses the alarm() function from the standard C library to limit kernel function deadlocks. The sole parameter to alarm is a second value. However, I haven't done any lslk Y2K compliance testing. Since I distribute the lslk sources freely, I expect lslk beneficiaries to share the work. Y2K compliance testing is a share. No one has reported on lslk Y2K compliance testing, either favorably or unfavorably. Vic Abell Purdue University Computing Center July 11, 2001