1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
|
!!!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 <abe@purdue.edu>, 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 <chris@sector7.com> 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
<stevel@mail.cdsnet.net>, and the Tru64 UNIX 5.0 port on a test
system provided by Berkley Shands <berkley@cs.wustl.edu>
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 <holder@phy.ucsf.EDU> 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 <UNIX_dialect_abbreviation>
$ 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/<PID>/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
<abe@purdue.edu>.
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 <abe@cc.purdue.edu>
Purdue University Computing Center
July 11, 2001
|