Notes for the distribution of lsof version 4
********************************************************************
| The latest release of lsof is always available via anonymous ftp |
| from lsof.itap.purdue.edu. Look in pub/tools/unix/lsof. |
********************************************************************
Contents
Dialects Supported
How Lsof Works
Lsof Output
Getting Started Quickly
Limiting, Filtering, and Selecting Lsof Output
Parsing Lsof Output with Another Program
Repeat Mode
Distribution Restrictions
Cautions
Distribution Contents
Warranty
Bug Reports
The lsof-l Mailing List
Version 3 Release Notes
3.0, May 24, 1994
...
3.88, February 17, 1997
What's New in Version 4
Version 4 Release Notes
4.0, February 24, 1997
4.01, March 3, 1997
4.02, March 21, 1997
4.03, April 7, 1997
4.04, April 17, 1997
4.04 supplement, April 18, 1997
4.05, April 24, 1997
4.06, April 30, 1997
4.07, May 12, 1997
4.08, May 23, 1997
4.09, June 1, 1997
4.10, June 8, 1997
4.11, June 12, 1997
4.12, June 24, 1997
4.13, July 9, 1997
4.14, July 22, 1997
4.15, August 15, 1997
4.16, September 25, 1997
4.17, October 14, 1997
4.18, October 25, 1997
4.19, October 30, 1997
4.20, November 11, 1997
4.21, December 1, 1997
4.22, December 15, 1997
4.23, January 16, 1998
4.24, January 28, 1998
4.25, February 7, 1998
4.26, February 17, 1998
4.27, March 6, 1998
4.28, March 10, 1998
4.29, March 26, 1998
4.30, April 9, 1998
4.31, April 21, 1998
4.32, May 13, 1998
4.33, May 22, 1998
4.34, June 26, 1998
4.35, July 17, 1998
4.36, August 4, 1998
4.37, September 15, 1998
4.38, November 25, 1998
4.39, December 29, 1998
4.40, January 25, 1999
4.41, February 27, 1999
4.42, March 30, 1999
4.43, May 11, 1999
4.44, June 24, 1999
4.45, July 30, 1999
4.46, October 23, 1999
4.47, November 29, 1999
4.48, January 14, 2000
4.49, April 3, 2000
4.50, June 29, 2000
4.51, August 21, 2000
4.52, November 8, 2000
4.53, December 6, 2000
4.54, January 19, 2001
4.55, February 15, 2001
4.56, May 3, 2001
4.57, July 19, 2001
4.58, September 13, 2001
4.59, October 20, 2001
4.60, November 9, 2001
4.61, January 22, 2002
4.62, March 7, 2002
4.63, April 23, 2002
4.64, June 26, 2002
4.65, October 10, 2002
4.66, December 22, 2002
4.67, March 27, 2003
4.68, June 18, 2003
4.69, October 16, 2003
4.70, January 16, 2004
4.71, March 11, 2004
4.72, July 13, 2004
4.73, October 21, 2004
4.74, January 17, 2005
4.75, May 16, 2005
4.76, August 30, 2005
4.77, April 10, 2006
4.78, April 24, 2007
4.79, April 15, 2008
4.80, May 12, 2008
4.81, October 21, 2008
4.82, March 25, 2009
Dialects Supported
==================
Lsof (for LiSt Open Files) lists files opened by processes on
selected Unix systems. Version 4 is a source reorganization of
version 3, itself a major revision of version 2. Version 4 has
been tested on:
AIX 5.3
Apple Darwin 9 (Mac OS X 10.5)
FreeBSD 4.9 for x86-based systems
FreeBSD 7.[012] and 8.0 for AMD64-based systems
Linux 2.1.72 and above for x86-based systems
Solaris 9 and 10
(The pub/tools/unix/lsof/contrib directory on lsof.itap.purdue.edu
contains information on other ports.)
If your favorite Unix dialect is not in the list, or if your version
of it is more recent than the ones listed, please contact me at
<abe@purdue.edu>.
Version 3 of lsof was tested on:
AIX 3.2.5, 4.1[.[1234]], and 4.2
BSDI BSD/OS 2.0, 2.0.1, and 2.1 for x86-based systems
DC/OSx 1.1 for Pyramid systems
Digital UNIX (DEC OSF/1) 2.0, 3.0, 3.2, and 4.0
EP/IX 2.1.1 for the CDC 4680
FreeBSD 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5 for x86-based
systems
HP-UX 8.x, 9.x, 10.01, 10.10, and 10.20
IRIX 5.2, 5.3, 6.0, 6.0.1, and 6.[124]
Linux through 2.0.27 for x86-based systems
NetBSD 1.0, 1.1, and 1.2 for x86 and SPARC-based
systems
NEXTSTEP 2.1 and 3.[0123]
OpenBSD 1.2 and 2.0 for x86-based systems
Reliant UNIX 5.43 for Pyramid systems
RISC/os 4.52 for MIPS R2000-based systems
SCO OpenServer Release 1.1, 3.0, and 5.0.x for x86-based
systems
SCO UnixWare 2.1 and 2.1.1 for x86-based systems
Sequent PTX 2.1.[1569], 4.0.[23], 4.1.[024], 4.2[.1],
and 4.3
Solaris 2.[12345], 2.5.1, and 2.6-Beta
SunOS 4.1.x
Ultrix 4.2, 4.3, 4.4, and 4.5
Version 3 and its predecessor, version 2, may be found at:
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD
How Lsof Works
==============
Using available kernel data access methods -- getproc(), getuser(),
kvm_*(), nlist(), pstat(), read(), readx(), /proc -- lsof reads
process table entries, task table entries, user areas and file
pointers to reach the underlying structures that describe files
opened by processes.
Lsof interprets most file node structures -- advfsnodes, autonodes,
cnodes, cdrnodes, devnodes, fifonodes, gnodes, hsnodes, inodes,
mfsnodes, pcnodes, procnodes, rnodes, snodes, specnodes, s5inodes,
tmpnodes. It understands NFS connections. It recognizes FIFOs,
multiplexed files, Unix and Internet sockets. It knows about
streams. It understands /proc file systems for some dialects. On
many dialects it recognizes execution text and library references.
It knows about AFS on some Unix dialects.
Lsof Output
===========
The lsof output describes:
* the identification number of the process (PID) that has opened
the file;
* the process group identification number (PGID) of the process
(optional);
* the process identification number of the parent process (PPID)
(optional);
* the command the process is executing;
* the owner of the process;
* for all files in use by the process, including the executing
text file and the shared libraries it is using:
* the file descriptor number of the file, if applicable;
* the file's access mode;
* the file's lock status;
* the file's device numbers;
* the file's inode number;
* the file's size or offset;
* the name of the file system containing the file;
* any available components of the file's path name;
* the names of the file's stream components;
* the file's local and remote network addresses;
* the TLI network (typically UDP) state of the file;
* the TCP state, read queue length, and write queue length
of the file;
* the file's TCP window read and write lengths (Solaris
only);
* other file or dialect-specific values.
Getting Started Quickly
=======================
If you want to get started using lsof quickly, or see some examples
of how lsof can be used, consult the 00QUICKSTART file of the lsof
distribution.
The 00QUICKSTART file won't help you build or install lsof, but it
will cut through the density of the lsof man page, giving you more
readily an idea of what you can do with lsof.
For information on building and installing lsof, consult the 00README
file of the lsof distribution.
Limiting, Filtering, and Selecting Lsof Output
==============================================
Lsof accepts options to limit, filter, and select its output.
These are the possible criteria:
* Process ID (PID) number -- to list the open files for a given
process;
* Process Group ID (PGID) -- to list the open files for all
the processes of a given process group;
* User ID number or login name -- to list the open files for
all the processes of a given user;
* Internet address -- to list the open files using a given
Internet address (host name), protocol, or port (number or
name); or to list all open Internet files;
* command name;
* file descriptor name or number;
* list all open NFS files;
* list all open Unix domain socket files;
* list all uses of a specific file;
* list all open files on a file system.
Selection options are normally ORed -- i.e., an open file meeting
any of the criteria is listed. The selection options may be ANDed
so that an open file will be listed only if it meets all the
criteria.
In the absence of any selection criteria, lsof lists files open to
all processes.
Parsing Lsof Output with Another Program
========================================
The lsof -F option directs it to produce "field" output that can
easily be parsed by another program. The lsof distribution contains
sample awk, perl 4, and perl 5 scripts in its scripts subdirectory
that show how to post-process field output.
Repeat Mode
===========
Lsof can be directed to produce output, delay for a specified time,
then repeat the output, cycling until stopped by an interrupt or
quit signal. This mode is useful for monitoring the status of some
file operation -- e.g., an ftp transfer or a tape backup operation.
Repeat mode is more efficient when combined with lsof's selection
options, since they limit lsof overhead.
It's possible to use lsof's field output options to supply repeat
mode output to another process for its manipulation. The scripts
subdirectory of the lsof distribution has sample Perl scripts
showing how to consume lsof repeat mode output from a pipe.
Distribution Restrictions
=========================
Lsof 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 lsof source
files.
Cautions
========
Lsof is a tool that is closely tied to the Unix operating system
version. 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 LSOF BINARY, COMPILED FOR ONE UNIX OS VERSION,
ON ANOTHER.
On some Unix dialects, notably SunOS and Solaris, lsof versions
may be even more restricted by architecture type. An lsof binary,
compiled for SunOS 4.1.3 on a sun4c machine, for example, won't
work on a sun4m machine.
AN LSOF BINARY, COMPILED FOR ONE SOLARIS 1.X ARCHITECTURE, ISN'T
GUARANTEED TO WORK ON A DIFFERENT SOLARIS 1.X ARCHITECTURE.
Distribution Contents
=====================
The lsof distribution is checked for completeness when it is
constructed and by the Inventory script when you run the Configure
script. (See The Inventory Script section of the 00README file of
this distribution.)
Lsof is organized in these parts:
* The main lsof directory, containing common sources,
configuration and setup scripts and three subdirectories:
dialects/, lib/, and scripts/.
Lsof is compiled in the main lsof directory after configuration.
The selected dialect sources are copied or linked from the
specified subdirectory. (Symbolic linking is the standard
method.)
Common lsof definitions may be found in lsof.h; common
function prototypes, proto.h; and common storage, store.c.
* The dialects/ subdirectory contains subdirectories with
sources specific to UNIX dialect implementations -- e.g.,
the dialects/sun/ subdirectory contains sources for the
SunOS (Solaris 1.x) and Solaris (2.x) implementations of
lsof. The dialects subdirectories also contain Makefiles
and scripts for assisting dialect source configuration.
Dialect configuration definitions may be found in dlsof.h;
other dialect definitions, dlsof.h; dialect prototypes,
dproto.h; and dialect storage, dstore.c.
* The lib/ subdirectory contains sources for common lsof
functions. Not all dialects use the functions -- some have
their own versions of them. The lib/ functions are enabled
and customized with #define's in the dialect machine.h header
files.
* The scripts/ subdirectory contains sample scripts for
processing lsof field (-F) output. The scripts are written
in AWK, Perl 4, and Perl 5.
The 00PORTING file of the lsof distribution has more information
on lsof components, configuration, and construction.
Warranty
========
Lsof 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 lsof is with
you. Should lsof 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 lsof 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 LSOF 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 email at
<abe@purdue.edu>.
The lsof-l Mailing List
=======================
Information about lsof, including notices about the availability
of new revisions, may be found in mailings of the lsof-l listserv.
For more information about it, including instructions on how to
subscribe, read the 00LSOF-L file of the lsof distribution.
Version 3 Release Notes
=======================
See 00DIST in the last lsof 3 revision 3.88, for its complete
set of release notes. Lsof revision 3.88 may be found at:
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD
3.0 May 24, 1994
This is the first official release of lsof 3.
...
3.88 February 17, 1997
+======================================+
| This is the last version 3 revision. |
+======================================+
Added documentation files -- 00.README.FIRST[_<version>]
and 00RELEASE.SUMMARY_<version> -- to the distribution.
What's new in Version 4
=======================
The main goal of version 4 was to eliminate the confusing common/
fragment source file technique. Changing the version number also
provided an opportunity to restart the numbering, which at 3.88
had risen to a large value.
The sources that appeared in the dialects/common subdirectory of
version 3 in fragment files have been incorporated into the version
4 liblsof.a library as *.c files. This results in significant
changes to many source files, scripts, and Makefiles of all dialect
versions. It allows elimination of some source files -- ddev.c,
dfile.c, dmnt.c -- for dialects now obtaining functions from
liblsof.a that formerly came from making dialect source files by
combining fragment files.
The version 4 liblsof.a sources are stored in the lib/ subdirectory
of the main lsof directory. The liblsof.a functions are activated
and conditioned in their source files by values #define'd in the
dialect dlsof.h and machine.h header files.
Dialects that provide a private version of a library function refrain
from #define'ing the symbol that would activate the library function
code.
Version 4 Release Notes
=======================
4.0 February 24, 1997
+====================================+
| This is the first lsof 4 revision. |
+====================================+
Reorganized sources: eliminated code fragment files
and created a library in their place. Modified or
deleted many dialect source and header files.
Changed documentation accordingly.
Added a warning to sgi/Makefile and 00FAQ that advises
against using the IRIX C compiler -n32 option when
compiling lsof. Thanks go to Peter Ilieve
<peter@memex.co.uk> for bringing this to my attention.
Dropped IRIX 5.2 in mid-stream, because my 5.2 test
system was upgraded to 5.3.
4.01 March 3, 1997
Added TFS support for Pyramid dialects.
Added test to Configure and to the IRIX dnode.c
for the different cnode struct that appears in
<cachefs/cachefs_fs.h> on the 6.2 IMPACT distribution.
Heddy Boubaker <boubaker@amfou.cenatls.cena.dgac.fr>
alerted me to the cnode change and helped test this
lsof adjustment.
Shut down the lsof child process before doing a -r
sleep(). A comment from Dan Mercer <dam@mmm.com>
prompted this.
4.02 March 21, 1997
Based on a report from Pasi Kaara <Pasi.Kaara@atk.tpo.fi>,
disabled HP-UX CCIT support in lsof for HP-UX
versions 10 and above. Pasi's report also led to
changes in the HP-UX machine.h to support use of
gcc to compile lsof for HP-UX 10.20 and warnings
against using `cc -Aa` or `gcc -ansi` to compile
lsof under HP-UX 10.x.
With help from Richard Allen <ra@hp.is> taught
HP-UX 10.x lsof to name file systems better by
using the virtual file system device number. Elias
Halldor Agustsson <elias@rhi.hi.is> provided a test
system.
Changed NEXTSTEP and UNIXWARE Makefiles to use
safer quoting when generating version.h. The change
was suggested by Bob Farmer <ucs_brf@unx1.shsu.edu>.
Added SHELL=/bin/sh string to all Makefiles.
Added support for Linux 2.1.28 on a test system,
kindly provided by Jonathan Sergent <sergent@purdue.edu>.
Configure tests the Linux 2.1.x's C library lseek()
function for proper handling of kernel offsets.
If lseek() appears suspect, Configure activates
the use of a private lseek() function. Changed
the private nlist() function to nlist_private()
and taught it to use the query_module() syscall in
place of the deprecated get_kernel_syms() one.
Added rudimentary AX.25 support for Pierfrancesco
Caci <ik5pvx@infogroup.it> who helped test it.
Updated the old get_kernel_syms() code to recognize
and skip module name entries.
Prompted by Marty Leisner <leisner@sdsp.mc.xerox.com>,
eased the requirement that service name lookup for
the -i option be accompanied by a protocol name. The
name is not needed if both TCP and UDP names yield the
same port number.
Added xusers.awk script from Dan Mercer <damercer@mmm.com>
to the distribution scripts/ subdirectory.
Changed Configure script to use LSOF_VERS for all
UNIX dialect version numbers and to pass LSOF_VERS
to the dialect Mksrc functions. Also added the
ability for a dialect stanza to declare a different
dialect Makefile source. Modified dialect Mksrc
files -- e.g., linux and sun -- accordingly.
Added support for BSD/OS 3.0 with help from Jim
Reid <jim@mpn.cp.philips.com>. Terry Kennedy
<TERRY@spcvxa.spc.edu> kindly provided a test
system. During the port corrected a bug that
prevented proper handling of revoked files.
4.03 April 7, 1997
At the suggestion of Dan Mercer <damercer@mmm.com>,
made HP-UX building of lsof aware of differences
between the HP-UX bundled and unbundled C compilers.
Added the ability for the lsof builder to define the
default warning message issuance state. By default the
issuance of warning messages is disabled; defining
WARNINGSTATE in machine.h disables it. The Customize
script was updated to handle WARNINGSTATE. Dan Mercer
suggested this.
Eliminated compiler complaint about improperly cast
get_Nl_value() argument in ncache_load() in lib/rnch.c.
Corrected zeromem() argument error in SCO dproc.c.
Sped up parent directory cache lookup slightly.
Updated for PTX 4.4, including additional VxFS (EFS)
file system support.
4.04 April 17, 1997
At the suggestion of Bela Lubkin <belal@sco.COM>
changed device cache handling to be more tolerant
of a device cache file whose [cm]times are older
than the ones on /dev or /devices. The change
required adding information to Solaris device cache
file clone lines, so the first time lsof 4.04 is
run under Solaris it will complain about a bad
cached clone device in a previous device cache
file, then regenerate it.
Added boot file path detection for SCO OSR 5 and
above, based on information supplied by Bela.
Fixed two bugs in DEC OSF/1 lsof -- an error in
reporting locks and a missing continue statement
in readdev() after a failure to open a directory.
Jan Ole Suhr <josuhr@informatik.tu-clausthal.de>
reported the second bug and supplied a fix.
Fixed XFS problems with IRIX 6.2 by abandoning the
idea that SGI will distribute XFS header files and
defining an lsof-private xfs_inode structure. John
Paul Morrison <John.Paul.Morrison@MultiActive.com>
helped develop and test the 5.3 definition. John
R. Vanderpool <fish@daacdev1.gsfc.nasa.gov> helped
develop and test the 6.2 definition.
Remove obsolete comments about common/*.frag files.
Updated Linux lsof for Linux version 2.1.35.
4.04 April 18, 1997
Supplement Regenerated the 4.04 distribution to correct a non-
device-cache #define misplacement in the Solaris and
SunOS dlsof.h. Alexandre Oliva <oliva@dcc.unicamp.br>
reported the problem.
4.05 April 24, 1997
Corrected an error in 00DCACHE.
Made sure SCO /etc/ps/booted.systems is closed.
Based on an observation by Bela Lubkin <belal@sco.COM>
that the lsof child had needless file descriptors
open, closed all but the open pipes between the
lsof parent and child.
Decommissioned CDC EP/IX support; I no longer have a
test system.
Based on a suggestion from Patrick Connor
<connor@phreak.csd.sgi.com>, added -xansi to CFLAGS
for IRIX 5.3 and 6.[234].
Also at Patrick's suggestion changed Configure to
propagate exact SunOS 4.1.x version to the main
and library Makefiles. This allowed the sunos413
and sunos413cc Configure abbreviations to be
shortened to sunos and sunoscc.
Updated obsolete argument uses (-H changed to -n)
in count_pf.perl* and watch_a_file.perl scripts.
Adjusted Solaris 2.6 lsof for Beta_Update with tips
from Casper Dik <casper@holland.Sun.COM>.
Fixed a Solaris 2.4 TCP address reporting bug.
4.06 April 30, 1997
Added a step to the Makefile clean rules that does
a make clean in the lib subdirectory; suggested by
Casper Dik <casper@holland.Sun.COM>. (Configure's
-clean argument already did this.)
Fixed an incorrect awk argument in the sunos*)
Configure stanza, reported by Alexandre Oliva
<oliva@dcc.unicamp.br>.
Added CD9660 (aka ISO) file system support to
FreeBSD, NetBSD, and OpenBSD with mods and help
from Kenneth Stailey <kstailey@disclosure.com>.
(BSDI already had CD9660 support.) While at it,
added file descriptor system support to BSDI and
FreeBSD.
Added /kern file system support to OpenBSD. The
support wasn't extended to BSDI, FreeBSD, or NetBSD,
because it requires Kenneth Stailey's changes to
/sys/miscfs/kernfs/kernfs.h.
Updated IRIX 6.3 support after getting access to
a test system, provided by John Paul Morrison
<John.Paul.Morrison@MultiActive.com>. Improved
the handling of IRIX 5.1 and greater FIFOs.
4.07 May 12, 1997
Based on AIX problem reports from David Capshaw
<David.Capshaw@SEMATECH.Org>, changed the aix*
Configure script stanza to avoid -bnolibpath for
gcc (which the GNU loader doesn't grok) and AIX
below 4.1.4 (where -bnolibpath hasn't been tested
or is known to be unimplemented), and to refuse to
use gcc for compiling lsof in AIX versions below
4.1 (because of possible structure alignment
problems). Updated 00FAQ appropriately.
Added OpenBSD support for EXT2FS. This support
has yet to be tested.
Tested lsof under OpenBSD 2.1.
Activated /kern file system support for NetBSD when
Configure senses that /sys/miscfs/kernfs/kernfs.h
defines the kern_target structure. This support
has not been tested under NetBSD, although it has
been tested under OpenBSD.
Made some simple changes to the BSDI machine.h,
suggested by Jeffrey C. Honig <jch@bsdi.com>.
Improved handling of alternate dialect Configure
abbreviations -- aix and aixgcc, hpux and hpuxgcc,
solaris and solariscc, and sunos and sunoscc.
4.08 May 23, 1997
Cleaned up dialect Makefile's, staring with a suggestion
from Christopher Schanzle <chris@cam.nist.gov>.
Improved Configure's -clean processing.
Corrected bugs in Solaris lock reporting.
Changed NetBSD Configure stanza to put -I/usr/include
before -I/sys.
4.09 June 1, 1997
Adjusted for latest FreeBSD 3.0 release. This
required adding a new kernel name cache module for
reading BSD-form hashed kernel name cache entries,
rnmh.c, to the lsof library, and adding a #define
to each machine.h to select it.
Activated rnmh.c for BSDI 2.1, BSDI 3.0, NetBSD
1.2, and OpenBSD 2.1.
4.10 June 8, 1997
Adjusted for Linux 2.1.x (x > 35) kernels with
hashed task structure pointers. Marty Leisner
<leisner@sdsp.mc.xerox.com> and Jonathan Sergent
<sergent@io.com> tested the adjustment.
Replaced readdev() stat() calls with lstat() to
reduce device table and cache entries with the same
device number and inode values. Added code to
remove all remaining duplicates. This fixes a
Linux problem reported by Jonathan Sergent and
makes device node name output predictable.
Corrected a bug in UnixWare stream file handling
that prevented searching for the stream file by
its associated character device name.
Added Pyramid code to determine Reliant UNIX clone
major device number differently from that of DC/OSx.
4.11 June 12, 1997
Changed Configure to sense that the PTX inp_[fl]addr
members of the inpcb structure of <netinet/in_pcb.h>
have a struct type and set HASINADDRSTR for use in
PTX dnode.c and dsock.c tests.
Changed PTX version 4.1.4 tests to use 4.1.3 instead.
Carson Wilson <carson@mcs.com> reported the need
to do this and tested the change.
Fixed a block device table indexing bug in lib/rdev.c,
reported by Carson Wilson. The same bug was squashed
in pyramid/ddev.c.
Added code to the Pyramid Reliant UNIX kread()
function to compensate for an address boundary
error in the kernel's /dev/kmem driver.
Verified that lsof compiles and works under AIX
4.2.1. Added an AIX test for the presence of NFS
header files, defined HAS_NFS and adjusted AIX
dialect sources accordingly.
Based on a suggestion from Gaylord Holder
<holder@phy.ucsf.EDU>, added DEC OSF/1 code to
auto-detect the booted file, whence kernel symbol
addresses are obtained.
4.12 June 24, 1997
Corrected a device number sign extension problem
in the reading and writing of device cache file.
The problem was reported by Bela Lubkin <belal@sco.com>
and he suggested a fix.
Fixed an SCO stream device lookup problem. The
report and solution came from Bela Lubkin
Enhanced the Configure script to enable cross-
configuration of lsof, based on suggestions from
Marty Leisner <leisner@sdsp.mc.xerox.com>. A new
documentation file, 00XCONFIG, describes the process.
Made Pyramid OBJFS support conditional on the
presence of supporting header files. Corrected
the Pyramid MkKernOpts script so it generates the
necessary -D's for the Nile/Jolt architecture.
Richard Coley <rcoley@pyra.co.uk> helped.
Added another IRIX xfs_inode variant for 6.2, 32
bits, no XFS rollup patch.
Tested under UnixWare 2.1.2.
4.13 July 9, 1997
Taught Pyramid lsof to grok ttyfs vnodes with help
from Richard Coley <rcoley@pyra.co.uk>. Fixed some
minor bugs in Pyramid FIFO reporting. Eliminated
use of the Pyramid UCB compatibility library at
Richard's suggestion.
Eliminated reporting of "strange" inode numbers
for SCO OSR 3.2v5.0.x HPPS files with help from
Bela Lubkin <belal@sco.com>
Modified port to service name lookup to use a small
number of getservbyport() calls before reading the
entire map with getservent(). Changed port reporting
to represent a zero as `*' to be consistent with
other prt number reporting tools like netstat.
Casper Dik <casper@holland.Sun.COM> suggested these
changes -- the getserv*() one to improve performance
for large NIS service name maps.
Changed all readdev() functions to make the absence
of block devices a warning instead of a fatal error
after Brian Redman <ber@ms.com> reported his IRIX
6.4 system had no block devices. (It really did
have block devices, but readdev()'s lstat() use
caused it to miss them in a directory symbolically
linked from /dev/dsk->/hw/disk.) Fixed Brian's
real problem by changing the IRIX readdev() to use
stat() on /dev nodes if a Configure test shows /hw
is readable. Extended the potential to do the same
to all readdev() functions.
For consistency and convenience changed some
Configure abbreviations and dialect subdirectory
names: "decosf" abbreviation and "osf" dialect
subdirectory name to "du"; "netbsd" dialect
subdirectory name to "n+obsd"; "next3" abbreviation
and "next" dialect subdirectory name to "ns"; "sco"
abbreviation and dialect subdirectory name to "osr";
"sgi" dialect subdirectory name to "irix"; and
"unixware" abbreviation and dialect subdirectory
name to "uw".
Added #if/#endif clauses to the AIX rmdupdev()
function to avoid clone processing for AIX versions
less than 4.1.4. The problem was reported by Toralf
Foerster <toralf.foerster@io-warnemuende.de>, who
supplied corrective code.
Added support for new style NetBSD inode with i_ffs
and i_e2fs union members.
Improved Configure and 00FAQ information on Digital
UNIX configuration subdirectory with suggestions
from Brad Krebs <brad@EECS.Berkeley.EDU>.
4.14 July 22, 1997
Reorganized the Solaris handling of the inode
structure header file, ufs_inode.h, to eliminate
VxFS structure definition conflicts for Solaris
2.4, based on information from Greg Earle
<earle@netbsd4me.jpl.nasa.gov>.
Cleaned up some typos and confusion in Configure's
help output, based on comments from Bela Lubkin
<belal@sco.com>
Added a 00DIALECTS file, containing UNIX dialect
version numbers, that can be used by Configure and
the man page.
4.15 August 15, 1997
Aligned `Configure -help` output better. Removed
Configure's 2.6 Beta test adjustments.
Added improved Solaris VxFS configuration and
handling, based on information from Greg Earle
<earle@netbsd4me.jpl.nasa.gov>.
Added socket state -- TCO or TPI -- for socket
files at the suggestion of Ian Fitchet
<I.D.Fitchet@ftel.co.uk>.
4.16 September 25, 1997
Added reporting of TCP/TPI queue lengths and window
sizes ala netstat to NAME column. Added -T option
to select or de-select TCP/TPI info reporting.
(Window sizes are only reported for Solaris.)
Fixed anomalies along the way in SIZE/OFF processing
for some dialects.
Fixed service name argument processor to allow
minus signs as part of the name. Consequently this
disallows names with embedded minus signs from
being specified as the start of a range.
Added 00FAQ entries explaining why lsof won't find
a file being edited with vi, why window sizes aren't
reported for all dialects, and what the "no more
information" message means.
Forced Pyramid CC to be /usr/ccs/bin/cc to avoid
accidental use of the BSD variant in /usr/ucb/cc.
Added support for Linux glibc2, including a Configure
test; cross-Configure support (00XCONFIG); and much
unfortunate and risky sleight-of-hand in lsof Linux
dialect header and source files, forced upon lsof
by incompatibilities between Linux kernel and glibc2
header files.
Included in scripts/identd.perl5 a Perl 5 implementation
of an identd server, using lsof, provided by Kapil
Chowksey <kchowksey@hss.hns.com>.
Updated IRIX 6.4 xfs_inode guess.
4.17 October 14, 1997
Added -V option for verbose search result reporting.
Verbose reports are prepared for failure to locate
file names, command names, Internet addresses or
files, login names, NFS files, PIDs, PGIDs, and UIDs.
Augmented Linux NFS file test to cope with kernels
whose NFS code is in a loadable module. Need for
the test was pointed out by Jonathan Sergent
<sergent@csociety.ecn.purdue.edu>. The change
required that Linux have private dmnt.c source,
Completed a Linux 2.1.57 port on a system provided
by Jonathan Sergent.
4.18 October 25, 1997
Eliminated memory leaks in alloc_lfile(), lkup_port(),
and NEXTSTEP's process_text() function.
Added recognition of OpenBSD 2.2 in Configure,
supplied by Kenneth Stailey <kstailey@disclosure.com>.
Consolidated print_file() functions to use the one
in lib/prtf.c. Made it configurable and changed
it to size print columns dynamically.
!!! WARNING !!!
WITH DYNAMICALLY SIZED PRINT COLUMNS LSOF 4.18
PRODUCES OUTPUT SIGNIFICANTLY DIFFERENT FROM THAT
OF PREVIOUS REVISIONS. LINES ARE GENERALLY SHORTER
AND THERE IS GENERALLY LESS BLANK SPACE BETWEEN
COLUMNS AND THE ITEMS IN THEM. THERE ARE NO LONGER
ANY SPACES BETWEEN DEVICE NUMBER ELEMENTS, ONLY
COMMAS.
!!! WARNING !!!
Added special types and print specification modifiers
for file size and offset to handle UNIX dialects
with 64 bit sizes and offsets. Paul Eggert
<eggert@twinsun.com> reported the need for this
addition.
With Paul Eggert's help picked lint from the lsof
library, the main level lsof sources, and the Sun
dialect sources.
Added documentation, including the file 00LSOF-L,
about the lsof-l LISTSERV.
Added support for Reliant UNIX on the RM600. Bob
Passarella <rmpassar@pyramid.com> supplied the
changes. Kevin Smith <kevin@pyramid.com> helped
arrange test systems. While incorporating Bob's
changes, modified lib/rnch.c to handle kernel ncache
structs whose name is accessed via a char *, rather
than in a char array.
Changed #include order of <sys/socketvar.h> for
Solaris 2.x. W. Richard Stevens <rstevens@kohala.com>
pointed out the need to do this.
4.19 October 30, 1997
Changed Pyramid Reliant RM600 proc scan to skip
SSYS (p_flag) processes, since they don't seem to
have a readable u_cdir vnode.
Enabled Pyramid Reliant UNIX kread() work-around
for DC/OSx, too, since its read(/dev/kmem) kernel
driver seems to share the page boundary bug this
work-around circumvents.
Changed SzOffFtm_d and SzOffFtm_dv (new formats at
4.18 to print size and offset) from signed to
unsigned. Setting them signed at 4.18 was an
oversight.
Plugged a memory leak that caused the loss of 130
bytes per repeat-mode pass. Fixed it with a simple
work-around in main(). Lionel Cons <Lionel.Cons@cern.ch>
reported the leak.
4.20 November 11, 1997
Tested under BSDI 3.1.
Added support for Reliant UNIX Mesh IPC files with
help from Billy Ho <bho@pyramid.com>.
Added support to Digital UNIX lsof that uses the
libmsfs tag_to_path() function (when it exists) to
look up AdvFS path names. The idea and sample code
came from Dean Brock <brock@cs.unca.edu>. Converted
Dean's code into more general purpose support for
private name cache lookups via the HASPRIVNMCACHE
#define in the dialect machine.h file and code
conditional on it in the printname() function.
Taught Digital UNIX lsof to recognize NFS3 file
systems. Corrected Digital UNIX lsof DEVICE column
alignment.
4.21 December 1, 1997
Squashed bug, introduced at revision 4.18, that
resulted in double reporting of each selected PID
when terse mode (-t) was specified.
Corrected minor bug, also introduced at 4.18, that
might cause an extra print_proc() pass when one
PID has been specified.
Added -R to lsof options in scripts/idrlogin.perl*.
The option should have been there -- it was supposed
to be mandatory for PGID reporting -- but a bug,
corrected in revision 4.18, previously made -R
unnecessary.
Enabled configuring for BSDI BSD/OS 4.0 per a
suggestion from Jeff Honig <jch@bsdi.com>.
Enabled replacement of scoff_t with off64_t (scoff_t
is used to type r_size and r_localsize in the rnode
struct) for IRIX 5.3 systems that have the NFS
kernel rollup patch (1477). This compensates for
SGI's failure to distribute an updated <sys/fs/rnode.h>
with their patch.
Validated under Linux 2.0.3[12], Linux 2.1.64, and
NetBSD 1.3.
Added FreeBSD root directory reporting, courtesy
of Dan Nelson <dnelson@emsphone.com>.
4.22 December 15, 1997
Made adjustments for Linux 2.1.7[02].
Improved NAME information for Linux UNIX domain
sockets.
Added option +|-M to control the reporting of
portmapper registration information in square
brackets after the TCP or UDP port or service name.
Kenneth Stailey <kstailey@disclosure.com> suggested
the feature and provided sample code from OpenBSD.
Reporting is disabled by default in the distribution
and may be enabled with +M; if lsof is compiled
with HASPMAPENABLED (e.g., from machine.h), reporting
will be enabled by default and can be disabled with
-M.
Changed the -w option to +|-w to match the syntax
of the +|-M option and to eliminate any options
that flip meaning when a symbol is defined at
compile time. For both +|-M and +|-w, specifying
`-' when the default state is disabled or specifying
`+' when the default state is enabled causes no
problems.
!!!WARNING The -w option has changed in lsof 4.22. WARNING!!!
Made the +|- prefix legal for most options, but
didn't document it in the man page or help panel.
Most options that disable something -- e.g., -b,
-C, -n, -P -- now disable when the prefix is `-'
and enable when it is `+'. Since the states these
options disable are enabled by default, I chose to
avoid documentation complexity and confusion by
not mentioning that they can be used with the `+'
prefix.
Condensed the help panel.
Made sure Digital UNIX Configure stanza puts normal
include path (e.g., /usr/include) before system
include paths.
Added IPX socket information reporting to Linux
with help from Jonathan Sergent <sergent@purdue.edu>.
4.23 January 16, 1998
Fixed conflict arising from the quondam replacement
of the Sun Solaris <netdb.h> with a BIND/BSD version.
With help from Jonathan Sergent <sergent@purdue.edu>
developed a /proc file system based Linux lsof.
It needs some Linux 2.1.x release to work -- I'm
not sure which, but I tested under 2.1.72, 2.1.76,
and 2.1.79. The Configure script selects special
sources for this lsof, so the full lsof distribution
now contains both /dev/kmem and /proc based sources
for Linux lsof. An optional kernel mod, written
by Jonathan, enhances the /proc-based lsof ability
to recognize IPX socket files. Reorganized and
augmented the Linux sections in 00FAQ to explain
the two types of Linux lsof.
Defined DOSTAT_FUNCTION for dostat() in misc.c to
select the function, stat() or lstat(), it will use.
DOSTAT_FUNCTION is normally undefined, defaults to
lstat(), and is only defined for the /proc-based
Linux lsof in its dlsof.h.
Made conditional on the presence of IRIX 6.4 XFS
rollup patch #6 an XFS node change introduced in
revision 4.16. Identified the patch with help
from John R. Vanderpool <fish@daacdev1.gsfc.nasa.gov>.
Added NFS node compensation for NetBSD 1.3. The
code and suggestion for it was supplied by Jean-Luc
Richier <richier@imag.fr>.
Added diagnostic messages to the /dev/kmem-based
Linux Mksrc script to report errors during the
construction of the kernel name cache header file,
kncache.h. Added 00FAQ information on kncache.h.
Added a new Linux test host, running 2.0.33 and
GlibC, provided by Steve Logue <stevel@mail.cdsnet.net>.
Ported to PTX 4.1.3 and 4.4.2. Adjusted lib/rnch.c
for 4.4.2 to allow customization f additional ncache
struct element names.
4.24 January 28, 1998
Changed /proc-based Linux lsof offset test to use "/"
instead of "/etc/passwd".
To assist Jim Mintha <jim@geog.ubc.ca> with the
packaging of lsof for Debian Linux, added a
DEBIAN_LINUX_LSOF #define to trigger the activation
of special system map file location code in the
/dev/kmem-based dproc.c.
Applied modification to dialects/bsdi/dlsof.h from
Ingimar Robertson <iar@skyrr.is>, enabling lsof to
compile for BSDI BSD/OS 2.0.
Corrected a documentation error in 00DCACHE, pointed
out by Thomas Anders <anders@hmi.de>. The error was
created when the -V option was added at lsof 4.17.
Made IRIX 5.3 through 6.3 lsof aware of IRIX SCSI
tape devices (e.g., /dev/tape). Dave Olson of SGI
and Randolph J. Herber of FNAL provided valuable
advice, and Igor Schein <ischein@air-boston.com>
helped test.
Added a machine.h symbol (NEVER_HASDCACHE) that
prevents Customize from offering to change HASDCACHE.
The symbol may appear anywhere in machine.h --
e.g., in a comment. Included the symbol in a
comment of the HASDCACHE section of the /proc-based
Linux lsof machine.h, and accompanied it with
warnings against #define'ing HASDCACHE. Did the
same thing for WARNDEVACCESS (NEVER_WARNDEVACCESS
is the suppressant.)
4.25 February 7, 1998
Corrected an IRIX mis-cast of file offset (position).
Igor Schein <ischein@air-boston.com> reported the
problem. This was offered as a patch to 4.24.
Picked some lint Igor pointed out.
At Igor's suggestion added an optional decimal
digit size argument to the -o option. This argument
specifies how many file offset decimal digits can
follow "0t" before lsof switches to a "0x..." form.
The argument size specification doesn't count the
two characters of the "0t". A size of 0 means
unlimited. The default is OFFDECDIG (8), preserving
compatibility with existing lsof output; it can be
changed by the lsof builder. When size is specified
with -o it does not force offset display; -o without
a size still must be used to do that.
Added an IRIX 6.2, 32 bit system, XFS node patch,
courtesy of Ulrich Bernhard <rzubu@rzu.unizh.ch>.
For my own convenience enabled Configure to use
/usr/local/bin/gcc for NEXTSTEP. This allows
circumvention of a gcc 2.8.0 ranlib problem on
my test 3.1 `040 cube.
Added flags recommended by the RISC/os and Ultrix
compilers for the updated (and longer) main.c.
Updated FreeBSD cd9660_node.h Configure test.
4.26 February 17, 1998
Added shared process group processing for IRIX 5.3,
and IRIX 6.1 and above, based on investigation of
a bug report from Igor Schein <ischein@air-boston.com>.
Igor helped test this addition.
Improved handling of file system name arguments.
It's now done in a manner similar to fuser. The
-f argument forces path names to be considered as
simple files, rather than as file system names.
The +f flag forces them to be considered as file
system names. Normally path arguments are considered
file system names when they match a mounted-on
directory in the system's mount table, or when they
match a mounted file system's block device. Igor
Schein helped test this change.
Igor also suggests that the proper compilation of
the IRIX 6.4 proc structure after patch 2536 has
been installed may need -DPIOMEMOPS. So lsof's
MkKernOpts script was updated to propagate that
option from CCOPTS in /var/sysgen/system/irix.sm,
even though patch 2536 doesn't add -DPIOMEMOPS to
it. Added a 00FAQ item on this patch.
Added a fatal warning message about names forced
to be file system names (with +f) that have no
match in the mount table.
Improved the -V message for files and file systems
for which no open files were found. Added reporting
of /proc file and file system search failures.
Did some code reorganization to combine the multiple
ck_file_arg() functions into one. Moved the new
function from the library to the top level and put
it in arg.c; moved the usage function from arg.c
to a new top-level source file, usage.c, to balance
top-level source file size. The new usage.c depends
on version.h; arg.c no longer does.
Added flag recommended by the DU compiler for the
updated (and longer) main.c.
4.27 March 6, 1998
At the request of Igor Schein <ischein@air-boston.com>
added a conditional repeat mode option, using the
`+' prefix to the `r' option. +r operates as does
-r with the exception that it exits the first time
no open files have been listed during a cycle.
The exit code will be zero when any open files have
been listed; one, if none were ever listed.
Ported lsof to HP-UX 11.0 with the help of Richard
Allen. This port hasn't been tested on a 64 bit
kernel; I'm sure it won't work there without more
mods. It may not work on PA 2 architectures; I've
only tested it under PA 1 and a separate, busy
tester reported PA 2 problems that I've been unable
to investigate.
In anticipation of getting access to a 64 bit HP-UX
kernel and the pending start of the Solaris 2.7
Beta test (It will have 64 bit kernel addressing.),
started adding support for 64 bit kernel pointers.
This includes: ubiquitous use of the KA_T cast
for kernel pointers; a format to print them,
KA_T_FMT_X; a function to print them, print_kptr();
and modifications to most kernel-related functions
-- e.g., process_file(), process_node(),
process_socket(), readvfs() -- to process kernel
addresses as KA_T types.
Fixed minor bug in handling path name arguments
that end with a `/'.
Removed support for RISC/os; its test system is no
longer available.
Made modifications to insure that lsof output
doesn't contain non-printable characters. All such
characters are now printed in the printf form
"\x%02x". Several new common functions were
installed in misc.c to support "safe" printing.
This second major modification in 4.27 to common
and dialect code could have introduced bugs not
yet detected.
4.28 March 10, 1998
Refined unprintable format to use \b, \f, \r, \n,
\t, and ^* (for CTRL) forms. Corrected omission
of safestrprt() use for field output command name.
These changes were offered as patches to 4.27.
Made space an unprintable character (\x20) in the
COMMAND column; printable elsewhere, including the
NAME column, field output, and error messages.
Made sure FD column is parseable as a single entity
-- i.e., has no embedded space. Thus, if the access
mode is unknown but there is a known lock mode, (a
very rare case) the access mode will be printed as
`-'.
Picked lint with gcc 2.8.0 under Solaris 2.6.
With the help of Dave Olson of SGI identified a
proc struct element that should have been added to
<sys/proc.h> by IRIX 6.4 patch 2536. Added a
work-around for it to the lsof Configure script.
Igor Schein <ischein@air-boston.com> identified
that the patch caused a proc structure length
complaint from lsof. Removed an obsolete 00FAQ
item on the patch, installed at lsof 4.26, explaining
that no solution was yet available.
Added a 00FAQ item on how BIND installs its own
header files, including <netdb.h>, which may cause
the rpcent struct definition to vanish. Solaris
has an automatic lsof work-around, but that hasn't
been (and probably can't be) propagated to all
dialects supported by lsof. The 00FAQ item recommends
re-installation of the vendor header files that
BIND has replaced. (Others include <rpcent.h>,
<sys/bitypes.h>, and <sys/ctypes.h>.)
Made AIX AFS fixes.
4.29 March 26, 1998
Corrected bug in Internet address matching. The
matching formerly stopped if the foreign address
matched, thus failing to check the local address
for a match. That led to a possible false "Internet
address not located" warning (i.e., in response to
-V) about the local address, when both foreign and
local addresses were specified with -i. This
correction was offered as a patch to 4.28.
Changed readmnt() usage in an attempt to defer
mount readlink() and stat() delays until they are
necessary.
Corrected two bugs in the Digital UNIX readdev()
function. Made the correction available as a patch
to 4.28 and regenerated the 4.28 DU binaries.
Added a missing argument to a print-kptr() call in
the HP-UX dsock.c. The missing argument causes a
fatal gcc error. The problem was reported by Eyal
Shaynis <eyal.shaynis@telrad.co.il>. The fix was
offered as a 4.28 patch.
Adjusted for Digital UNIX 4.0D; the spec_node
structure is now defined in <sys/specdev.h>. Kris
Chandrasekhar <Kris.Chandrasekhar@digital.com>
identified the need for the adjustment.
Incorporated a bug fix from Brian McAllister
<mcallister@mit.edu> to the DU readmnt() function.
This fix was offered as a patch to 4.28.
Added "safe" printing to a SunOS clone device error
message.
Corrected bug in tabling of Linux /proc-based lock
info.
Corrected bug in handling of SunOS TLI streams.
Dan Farmer <zen@trouble.org> reported the problem.
Added a Solaris 2.6 work-around to keep the BIND
<sys/bitypes.h> from colliding with the Solaris
<sys/int_types.h>.
Strengthened the Configure test for /proc-based
Linux lsof, based on a report from Marty Leisner
<leisner@sdsp.mc.xerox.com>.
Tested on OpenBSD 2.3.
Made AIX changes that allow use with 3.2.5. The
changes were suggested and tested by Brett Hogden
<hogden@rge.com>.
Added Solaris 2.6 AFS support. Disabled reporting
of some node numbers for Solaris 2.5 and above open
AFS files. The node number computation algorithms
used for SunOS 4.1.x and Solaris less than 2.5 no
longer always work under Solaris 2.5 and above.
4.30 April 9, 1998
Corrected a pid structure member naming error for
UnixWare < 2.1.2. The problem was reported by
Richard van Meurs <vanmeurs.anva@atriserv.nl>. He
supplied the correction. This was offered as a
patch to 4.29.
Had a report from Igor Schein <ischein@air-boston.com>
that IRIX 6.4 patch 2839 is another SGI kernel
patch, along with 2536, that changes the size of
the proc structure in the kernel without changing
the proc structure in <sys/proc.h>. Upon further
investigation found that the effect of these patches
on the proc structure is not consistent. Therefore,
dropped the Configure patch test for IRIX 6.4 and
made the code in irix/dproc.c slightly more tolerant
of proc structure size differences for IRIX 6.4.
Igor help test the change.
Corrected Solaris >= 2.5 AFS inode number generation.
Craig Everhart <Craig_Everhart@transarc.com> helped
find the cause of the problem. This was offered as
a patch to 4.29.
Refined the Linux /dev/kmem-based glibc evasion
for the timeval structure to make it work with
glibc version 2.0.7. This required defining a new
global symbol, TIMEVAL_LSOF, default timeval, that
the /dev/kmem-based Linux lsof can set to its
private glibc timeval name, distinct from the kernel
timeval name.
Added support for Alpha to the /dev/kmem-based
Linux lsof. Alexandre Oliva <oliva@dcc.unicamp.br>
provided a test system. Added an item to 00FAQ
about lsof, the Alpha processor, and Linux.
Added a 00FAQ item about lsof year 2000 compliance.
Basically it says lsof is probably compliant,
because its only date or time computations are done
with time_t values, but I haven't done any specific
Y2K validation. I don't have plans to do any.
Added support for UnixWare 7. Chris Daniels
<chrisd@dlpco.com> provided a test system and Don
Draper <dond@sco.COM> provided technical information.
Added BFS and SFS file system support to lsof for
UW 2.1.[12] and 7.
Updated Solaris VxFS support for VxFS 3.2.1. Greg
Earle <earle@netbsd4me.jpl.nasa.gov> reported the
need for the update. Greg and Roger Klorese
<rogerk@veritas.com> provided technical information.
Scott McClung <mcclung@primenet.com> tested.
Changed IRIX XFS patch detection in anticipation of
learning there are multiple XFS patches for IRIX 6.4
that require different versions of the lsof-invented
xfs_inode structure.
4.31 April 21, 1998
Added a VxFS #if/#endif wrap to a section of the
HP-UX dnode.c that wasn't properly protected. The
problem was reported by Peter Klosky <PKlosky@bdm.com>.
This was offered as a patch to 4.30.
Added support for Solaris 2.7 (first Beta release).
Mike Sullivan <Mike.Sullivan@Eng.Sun.COM> provided
technical advice and helped test. Charles Stephens
<cfs@jurassic.eng.Sun.COM> also helped test.
Fixed bug in /proc-based Linux that caused it to
access /proc/mounts excessively. Marty Leisner
<leisner@sdsp.mc.xerox.com> provided a syscall
trace that identified the bug. The fix was offered
as a patch to 4.30.
Adjusted the IRIX 6.4 private structure definition
for the XFS node to accommodate patch 2970. Igor
Schein <ischein@air-boston.com> identified the
patch and the required adjustment.
4.32 May 11, 1998
Corrected Solaris 2.7 code for reporting PCFS
(floppy disk) node numbers. Casper Dik
<casper@holland.sun.com> supplied the fix. The
fix was offered as a patch to 4.31.
Corrected a bug in conditional repeat mode handling
pointed out by Igor Schein <ischein@air-boston.com>.
This was offered as a patch to 4.31.
Improved reporting of AIX open(/dev/memory device)
errors.
Corrected a Solaris < 2.5 KA_T declaration error,
pointed out by Robert Kiessling <robert@easynet.de>.
Changed KA_T from a #define to a typedef for all
dialects to prevent future problems of this kind.
Changed the sample Perl 5 script big_brother.perl5
to report a four digit year from localtime().
Added support for AIX 4.3[.1]. Bill Pemberton
<wfp5p@tigger.itc.virginia.edu> provided a test
system. Andrew Kephart <akephart@austin.ibm.com>
and Tom Weaver <tvweaver@austin.ibm.com> provided
technical assistance. Niklas Edmundsson
<nikke@ing.umu.se> did 4.3.1 testing.
Added -qmaxmem option to CFLAGs for an AIX compilation
with an xlc version 4.x compiler.
Adjusted Linux socket handling for changes in the
AX25 members of the sock struct. Richard Green
<rtg@tir.com> pointed out the problem. Tested
/dev/kmem-based lsof under Linux 2.0.34.
4.33 May 22, 1998
Added generic IPv6 support to common lsof sources
and specific IPv6 support to AIX sources. Andrew
Kephart <akephart@austin.ibm.com> supplied the
additions and helped with testing. Bill Pemberton
<wfp5p@tigger.itc.virginia.edu> provided a test
system. The modification affected sources for
every dialect, whether it supports IPv6 or not, by
changing the interfaces to the common Internet
address function ent_inaddr().
Added support for the NetBSD UVM virtual memory
system. Paul Kranenburg <pk@cs.few.eur.nl> supplied
technical details.
Bracketed HP-UX 11 use of <sys/spinlock.h> with
#if/#endif _KERNEL.
Corrected printing of PCB address in DEVICE column
for IRIX.
4.34 June 26, 1998
Updated 00FAQ to discuss TCP and UDP ports private
to the AIX kernel and 00README to describe how ACLs
can be used to give lsof permission to read the
kernel memory devices. Add information to 00FAQ
and 00README about other OpenBSD architectures
where lsof is reported to compile and run. Added
section to 00FAQ discussing how an incorrect loader
path environment variable value can prevent lsof
from loading correctly.
Improved Solaris namefs and doorfs support so that
it is now possible to search for an open VDOOR file
by the path name of its fattached file system
object. Igor Schein <igor@txc.com> requested the
ability to do such a search. Even with the change,
lsof can't always identify path names for open
VDOOR files.
Also at Igor's request, improved reporting of
information on open Solaris VCHR files that share
a common vnode, and Solaris UNIX domain socket
files.
Corrected print_kptr() argument error in PTX dnode.c,
reported by Mark Price <mprice@sequent.com>.
Compensated for ncache element naming differences,
introduced at PTX 4.4.2; Kurtis D. Rader
<krader@sequent.com> reported the problem.
Changed output column title from INODE to NODE to
better reflect the column's contents of node IDs
for more than just inodes.
Improved Configuration and processing for Solaris
AFS. Corrected AIX AFS 3.4 afs_rwlock_t simulation.
Corrected a cast problem with two AIX knlist()
calls, thus quieting an AIX 4.2.1 compiler argument
type warning. Jon Champlin <champlin@us.ibm.com>
reported the problem.
Added support to most dialect versions (exception:
/proc-based Linux) to warn when the identity of
the kernel where lsof was compiled doesn't match
the running identity. The warning can be suppressed
with -w. Note: determining AIX state requires
calling oslevel, a potentially slow operation.
Jon Champlin <champlin@us.ibm.com> suggested this
addition.
!!!! WARNING !!!! !!!! WARNING !!!! !!!! WARNING !!!!
Those using the lsof cross-configuration capability
(see 00XCONFIG), should be aware that the kernel
identity test feature introduces two new basic
cross configuration environment variables, LSOF_ARCH
and LSOF_VSTR.
!!!! WARNING !!!! !!!! WARNING !!!! !!!! WARNING !!!!
Identified a situation where a Solaris UNIX domain
socket name is known and can be searched for by
name; added the necessary code.
4.35 July 17, 1998
Made the kernel identity check an option with the
HASKERNIDCK #define in machine.h. Enabled altering
of HASKERNIDCK with the Customize script. Added
a clause to the help output that indicates the
build-time HASKERNIDCK status.
Added more information to the NAME column for
Solaris UNIX domain sockets. Made them searchable
by their clone device path name. Igor Schein
<igor@txc.com> requested this.
Completed the HP-UX 11 port with support for its
optional 64 bit kernel. Rich Rauenzahn
<rrauenza@cup.hp.com> provided a test system.
Corrected errors with HP-UX 11 lock reporting and
private kernel structure and type definitions.
Added support for HP-UX NFS3 files.
Limited mount table warnings -- e.g., when -b is
used -- to one set per mount point.
Fixed some mount table scanning and usage bugs,
including one in Solaris, reported by Kjetil Torgrim
Homme <kjetilho@ifi.uio.no>.
4.36 August 4, 1998
Made corrections and additions to IPv6 support and
to AF_ROUTE socket handling, supplied by Jean-Luc
Richier <Jean-Luc.Richier@imag.fr>. Jean-Luc's
additions provide IPv6 support for the Inria IPv6
implementations on FreeBSD and NetBSD.
Fixed two Solaris 2.5, 2.5.1, 2.6 and 2.7 TCP and
UDP host name or IP address reporting bugs, reported
by James Mathiesen <James-Mathiesen@deshaw.com>.
This fix was offered as a patch to 4.35.
Updated the Customize script to cause ENTER to use
all defaults. Amir J. Katz <amir@ndsoft.com>
suggested this and helped test the changes.
Updated Solaris ICMP and IP stream handling, based
on a report from Igor Schein <igor@txc.com>.
Fixed a bug in the Digital UNIX mount table handling,
reported by Bob Ward <bward@thehartford.com>.
While working on the bug, found and updated some
obsolete AdvFS code. This fix was offered as a
patch to 4.35.
4.37 September 15, 1998
Deactivated SGI IRIX support and archived revision
4.36 sources and binaries in pub/tools/unix/lsof/OLD.
Improved performance of FD searching. This was
offered as a patch to 4.36.
Amir J. Katz <amir@ndsoft.com> pointed out that
ranlib isn't needed for AIX or Solaris. Made
appropriate Configure script changes.
Fixed a file offset reporting bug for HP-UX VCHR
and VBLK device nodes located on a VxFS root. Doug
Siebert <douglas-siebert@iowa.edu> reported the
bug. The fix was offered as a patch to 4.36.
Resolved an HP-UX root device name reporting bug,
partly caused by an out-dated local copy of the
<sys/mount.h> mount structure, by generating a
local header file with the structure that can be
compiled without needing _KERNEL defined. Doug
Siebert also reported this bug.
Changed some dialect source code -- Digital UNIX,
Solaris, SunOS, and UnixWare -- to make more
consistent with ps the user ID lsof reports in the
USER column. Added a 00FAQ entry about it. Igor
Schein <igor@txc.com> reported the Solaris and
SunOS lsof inconsistencies with what ps(1) reports.
Ported lsof to Pyramid ReliantUNIX 5.44.
Added brackets as comments to case, do, done, else,
endif, esac, if, and while statements in Configure
to assist in navigating its clauses.
Added more Linux 2.0.x glibc work-arounds.
Added support for UnixWare 7.0.1.
Ralph Forsythe <ralph@contact-paging.com> provided
a new FreeBSD test system.
4.38 November 25, 1998
Added support for recent FreeBSD 3.0 distributions.
A 3.0 test system was provided by David O'Brien
<obrien@NUXI.com>. This was offered as a patch
to 4.37.
Updated the scripts/idrlogin.perl* files to look
for sshd processes in addition to rlogind and
telnetd ones.
Added support for DU 5.0 Beta. Berkley Shands
<berkley@cs.wustl.edu> provided a test system.
Added support for OpenBSD 2.4 with changes supplied
by Kenneth Stailey <kstailey@disclosure.com>.
Changed the Solaris 2.7 tests and documentation to
Solaris 7.
Made some changes to the header files for NEXTSTEP
3.3 and added support for OPENSTEP 4.x with help
from Michael A. Hovan III <mhovan@BLaCKSMITH.com>
and Carl Lindberg <Carl_Lindberg@BLaCKSMITH.com>.
The combined dialect subdirectory is named n+os.
One of Carl's changes propagates RC_CFLAGS to the
library Makefile. Timothy J. Luoma <luomat@peak.org>
helped test under NEXTSTEP 3.3 and OPENSTEP 4.2.
Made UW 7.x version sensitive to the presence of
ptf7038. Added peer PCB address to Unix domain
socket Name column, even when a path name has been
located. Information for these changes was supplied
by Francis Le Bourse <flebourse@intelcom.fr>. Lee
Penn <lee@dlpco.com> provided a test system.
Tested lsof under OSR 5.0.5 on a test system also
provided by Lee Penn.
Made path name argument processing more tolerant
of errors per a suggestion from Julian Gordon
<julian@cadence.com>.
Acquired a new UnixWare 2.x test system, generously
provided by Computer Classroom, Inc. -- Matthew
Thurmaier <matt@compclass.com>, Ken Laing
<ken@compclass.com>, and Andrew Merril
<andrew@compclass.com>. Updated Configure to accept
a UnixWare version of 2.1.3.
Updated kmem-based lsof for Linux 2.0.36.
Updated NetBSD sources for a change in a UVM virtual
mapping header file.
Corrected a cache allocation bug in Sun format
kernel name cache handling. The bug only shows up
when the kernel name cache is inaccessible.
4.39 December 29, 1998
Corrected problems with large device number handling
for 64 bit Solaris 7. The problems were reported
by Steve Bellenot <bellenot@math.fsu.edu>. Steve
helped test the fixes. The fixes were offered as
two patches to lsof 4.38.
Improved FreeBSD Configure operations for header
files that must be obtained from the kernel source
tree, based on a suggestion from David O'Brien
<obrien@NUXI.com>.
For Bela Lubkin <filbo@deepthought.armory.com> made
optional with +f[cfn] the display of file structure
address, shared use count, and node structure
address. /proc-based Linux doesn't implement this
feature, because it doesn't read kernel structures
from kernel memory. Modified the PTX -X option to
take advantage of the new file structure display
option. Added shared.perl5 to the scripts/
subdirectory to provide an example of how +f[fn]
might be used to track shared file descriptors and
files.
Added more /dev/kmem-based Linux glibc evasions,
provided by Jeff Johnson <jbj@redhat.com> and Maciej
Lesniewski <nimir@kis.p.lodz.pl>. Jeff helped test
them on various Linux architectures.
Tested on AIX 4.3.2; no changes were required.
Doug Crabill <dgc@purdue.edu> provided a test
system.
Fixed -c option to detect missing command name when
following option begins with `+'.
4.40 January 25, 1999
Added support for using the CDS compiler for Reliant
Unix 5.44 and above. Made Reliant Unix MIPC support
optional, dependent on the presence of <sys/mipc.h>.
Based on a report from Michael Schmitz <MSchmitz@lbl.gov>
that /dev/kmem-based lsof misbehaves on a Linux
2.0.x m68k kernel without module support, made the
absence of query_module() or get_kernel_syms()
Linux kernel support a fatal error. Updated relevant
sections of 00FAQ to reflect the change.
Added the ability to force the Linux Configure
stanza to use the /proc or /dev/kmem source base
via a LINUX_BASE environment variable specification.
This is a cross-configuration assist.
Added "+D <dir>" and "+d <dir>" options for directory
searching. +D searches the entire tree, starting
at <dir>, including <dir>, its contents, and its
subdirectory branches; +d searches only <dir> and
its contents, but not its subdirectory branches.
Improved lsof's searching of the specified name
list to compensate for anticipated long lists from
+d and +D.
Made an egrep in the Solaris Configure stanza usable
by the standard and XPG4 egrep's. Kenneth Stailey
<kstailey@disclosure.com> pointed out the improvement.
Fixed bugs in /dev/kmem-based Linux and UnixWare
Unix domain socket name searching.
Changed a Linux Alpha #include to be conditional
on the presence of its named header file, so that
lsof will compile on Red Hat 5.1 and 5.2 (Linux
kernel 2.0.35) where the header file is absent.
The problem was reported by Alexandre Oliva
<oliva@dcc.unicamp.br>.
Fixed an AIX 4.3+ bug in procinfo struct space
allocation, reported by Jeff Stewart <jws@purdue.edu>.
This was offered as a patch to 4.39.
Added an lstatsafely() function to offer the same
isolation for lstat() calls that statsafely() offers
for stat() calls. This made DOSTAT_FUNCTION no
longer necessary, so deleted it.
With help from Laurent P. Montaron <lpm@sequent.com>
ported lsof to PTX 4.4.4. Laurent did a monumental
job of identifying TCP/IP changes by their TCP
version, rather than by their PTX (With mix 'n
match PTX and TCP/IP versions, the PTX version
often has no bearing on the TCP/IP version.), and
changed the Configure script and pre-processor
#if/#else/#endif blocks to match. He also updated
Unix domain socket handling for PTX TCP/IP versions
4.5 and above.
Updated CLIENT handle acquisition of fill_portmap()
in print.c to use the more modern RPC function
clnt_create() in place of clnttcp_create() where
possible. PTX 4.4.4 requires clnt_create().
4.41 February 27, 1999
Added FreeBSD 3.1 and and 4.0 support with help
from Sheldon Hearn <axl@iafrica.com>, David O'Brien
<obrien@NUXI.com>, and John Polstra <jdp@polstra.com>.
Corrected bungled AIX 4.3+ patch that went into
lsof 4.40.
Reorganized the Configure script to improve Makefile
construction. A specific impetus for this was to
allow FreeBSD system-wide make flags to be propagated
to the lsof Makefiles, but other goals were to make
sure that the DEBUG= make entry can over-ride
standard CFLAGS values, and to better manage the
identification of compilers and their versions.
Two compiler-related values may now be supplied in
environment variables: 1) the compiler path in
LSOF_CC; and 2) the compiler version in LSOF_CCV.
00XCONFIG documents them.
Added support for Pyramid Reliant Unix bsdsfs,
msockfs, and sockfs file systems.
Added an optional LSOF_CINFO string to Configure,
producing a CINFO string in selected Makefiles,
producing a #define LSOF_CINFO in selected version.h
header files. The purpose of this is to allow
Configure the option to propagate information to
the lsof -v output. It is now used for Linux to
identify the code base, and for HP-UX 10.30 and
11.0 and Solaris 7 to identify the kernel bit size.
Added system information to NEXTSTEP and OPENSTEP
-v output, from the second line of hostinfo's
output.
Fixed a login name buffer overflow problem in the
processing of -u option values. This was offered
as a patch to 4.40. !!!THIS IS A SERIOUS STACK
OVERFLOW BUG; A LINUX EXPLOIT EXISTS FOR IT THAT
OPENS A BASH SHELL WITH LSOF'S AUTHORITY -- E.G,
SETGID(KMEM) POWER!!!
Improved the Solaris mount table filter so the
volume manager's fake mount point, "/vol", is
ignored and doesn't supplant "/" in NAME column
path assemblies. Igor Schein <igor@txc.com> reported
this bug and provided important help in finding
it. This was offered as a patch to 4.40.
Changed the Linux /dev/kmem-based lock ownership
test to answer a problem reported by Tom Christiansen
<tchrist@jhereg.perl.com>. This was offered as a
patch to 4.40.
Installed an HP-UX 11 patch, suggested by Kevin
Vajk <kvajk@cup.hp.com>, that adjusts a private
lsof kernel header file, derived via Q4, to correspond
to an HP-UX patch bundle.
Made NetBSD 1.3I sockproto structure adjustment.
4.42 March 30, 1999
Fixed a typo in the HP-UX dfile.c that caused +fF
and +fN output controls to swap effect.
Enabled for OpenBSD 2.5 per notice from Kenneth
Stailey <kstailey@kstailey.tzo.com>
Made more VM accommodations for FreeBSD 4.0.
Improved file system search reporting to include
path name components when they're available, instead
of mindlessly reporting the file system name in
the NAME column. Guy Dallaire <gdallair@geocities.com>
brought the need for this change to my attention.
Updated Solaris 2.6 VxFS for Veritas Oracle Database
Edition 2.0, VxFS version 3.3, and VxVm version
2.5.4, based on a report from Chris Kordish
<chris.kordish@East.Sun.COM>. Chris kindly provided
a test system.
Improved HP-UX ipc_s patch detection in Configure,
response in .../dialects/hpux/hpux11/ipc_s.h, and
documentation in 00FAQ, Kevin Vajk <kvajk@cup.hp.com>
helped test.
Added to Customize the option to suppress HASKERNIDCK
selection for specified dialects. Suppressed it
for /proc-based Linux lsof, and removed its test
and code from there. Tin Le <tin@netimages.com>
alerted me to the need for this update.
Ported to official Digital UNIX 5.0 release.
Changed DU lsof to use the knlist(3) function when
no kernel file has been specified with -k. This
change was suggested by Erich Wimmer
<Erich.Wimmer@digital.com>.
Updated Configure for latest NetBSD (1.3I?) with
UVM support the default.
4.43 May 11, 1999
Corrected a typo in the Solaris gcc discussion in
00FAQ. Made changes to the Solaris 2.5[.1] private
tcp_s structure. Both changes were done in response
to reports from Igor Schein <igor@txc.com>, who
tested the Solaris 2.5 change.
Made more IPv6 adjustments to lsof for Tru64 UNIX
(Digital UNIX) 5.0, based on information obtained
from Compaq by Berkley Shands <berkley@cs.wustl.edu>.
Corrected HP-UX error message about HP-UX 11 q4 usage.
Amir Katz <amir@ndsoft.com> reported the correction.
Fixed a GlibC 2.1 conflict in /proc-based Linux lsof.
Fixed a man page typo reported by Vlad Harchev
<hvv@hippo.ru>.
Changed some Solaris 2.7 references to Solaris 7
in Configure and 00XPORTING.
Added a Solaris example to the echo statements that
are the install rule in the SunOS/Solaris Makefile.
Added a field to the file structure output --
FILE-FLAG (file structure open flags, f_flag[s],
and process file flags, typically u_pofile)) --
enabled with +f[gG]. Its field output character
is 'G'.
Figured out another piece of the HP-UX 11 patched
ipc_s structure puzzle with the help of Keith Kalet
<KEITH_KALET@HP-USA-om41.om.hp.com>.
Fixed a PTX real vnode to real inode interpretation
bug.
Added link count to lsof output. Eric Dumazet
<dumazet@risgw.ris.fr> requested and helped test
it. The new +L option enables and filters it.
Its field output character is `k'.
Updated Configure script to recognize NetBSD 1.4.
Updated AFSConfig to handle default answers to
questions.
Incorporated patch from Jonathan Sergent <sergent@io.com>
that enables /proc-based Linux lsof to run on both
32 and 64 bit kernels.
Updated Configure script with a patch from David
O'Brien <obrien@NUXI.com> that recognizes FreeBSD 3.2.
4.44 June 24, 1999
Corrected use of nlink member of hsnode for SunOS
4.1.x High Sierra File System files. John Dzubera
<zube@tlaloc.stat.colostate.edu> reported the
problem and helped test the fix. Also fixed a
SunOS segmentation fault bug. These fixes were
offered as a patch to 4.43.
Improved handling of /proc-based Linux UNIX PCB
address.
Fixed a NEXTSTEP and OPENSTEP bug that made repeat
option (-r) processing malfunction. This fix was
offered as a patch to 4.43.
Fixed Configure so it doesn't use -O in the Cflags
for the bundled HP-UX C compiler. Jim Ankenbrandt
<jankenbrandt@penton.com> reported the problem.
Corrected output ordering of parent PID and process
group ID when both -R and -g are specified.
Enhanced the pdev.c and pdvn.c library modules for
wider use. These dialect versions use the new
library modules: DEC OSF/1, Digital UNIX, and Tru64
UNIX; Pyramid DC/OSx and Reliant UNIX; SCO OSR and
UnixWare; and Sequent PTX.
Added basic clone device support to /dev/kmem-based
HP-UX lsof for HP-UX 10.30 and higher.
Added raw socket support to /proc-based Linux lsof.
Changed NODE-ADDR column title to NODE-ID in
anticipation of using more general identification
information in the column.
Ported to UnixWare 7.1, using a test system kindly
provided by Matt Thurmaier <matt@compclass.com>
and Don Draper <dond@sco.com>.
Updated for NetBSD 1.4C VM changes, and a new
current and root working directory structure.
Made minor adjustment for latest Tru64 UNIX 5.0
Beta release.
4.45 July 30, 1999
Fixed quoting problem in DEC OSF/1, Digital Unix,
and Tru64 UNIX Makefile's install rule. The problem
was reported by Berkley Shands <berkley@cs.wustl.edu>.
Fixed bug in Tru64 UNIX 4 lsof that caused FDs to
be skipped. These fixes were offered in a patch
to 4.44.
Fixed a repeat-mode /proc-based Linux lsof bug,
reported by Sami Farin <sfarin@ratol.fi>. This
was offered as a patch to 4.44.
Picked lint, some reported by Sami Farin.
Corrected a 00DCACHE documentation error in a sample
shell script. The problem was reported by Chad R.
Larson <chad@larsons.org>. Changed commented-out
entries in machine.h files so they require more
thought and work when the comments are removed,
based on a remark by Chad.
Compensated for the practice of Solaris 7 and above
to record the dev= value in /etc/mnttab in 32 bit
mode, even on 64 bit systems. This was offered as
a patch to 4.44.
Added a C library test for /proc-based Linux lsof,
so that the #include files can be adjusted for a
non-GlibC environment. The need for this was
reported by Andrew Hill <andrewh@tirin.openworld.co.uk>.
This was offered as a patch to 4.44.
Added support for Auspex LFS 1.8.1 and 1.9.2 to
SunOS 4.1.4 lsof. The support was requested by
Quentin Fennessy <quentin@dvorak.amd.com>, who
provided information and did testing.
Enabled IPv6 support code for NetBSD and OpenBSD,
conditional on Configure script tests. Wolfgang
Rupprecht <wolfgang@wsrcc.com> supplied the NetBSD
code and tested it. The OpenBSD code I constructed
has been compiled but not tested.
Updated the identd Perl 5 script, based on a report
from Wendy Lin <af5@taiyang.cc.purdue.edu> that
the space in its response line in front of the user
name violates RFC 1413.
Added IPv6 support to /proc-based Linux lsof.
Jonathan Sergent <sergent@ETLA.NET> and Andrew
Thomas Sydelko <sydelko@ecn.purdue.edu> kindly
provided a test system.
Updated man page description of AIX multiplexed
files to indicate that they might be /dev/ptc or
/dev/pts, depending on the AIX version. The
correction was suggested by Onno van der Linden
<onno@simplex.nl>.
Sylvain Robitaille <syl@alcor.concordia.ca> reports
lsof passes his Y2K tests.
4.46 October 23, 1999
Corrected /proc-based Linux lsof to detect that an
IPv6 address is a mapped IPv4 address. The problem
was reported and analyzed by Arkadiusz Miskiewicz
<misiek@misiek.eu.org>, who also tested the fix.
Added a libc5 library /dev/kmem-based Linux lsof
circumvention, supplied by Jason Lingohr
<lingman@lucid.net.au>.
Corrected a bug in -t (terse) AIX output, reported
by Wendy Lin <af5@taiyang.cc.purdue.edu>. I
introduced the bug at revision 4.43 when adding
FILE_FLAG reporting. This was offered as a patch
to 4.45.
Added a work-around for a problem in the OpenBSD
2.3 <sys/pipe.h> header file. Volker Borchert
<bt@teknon.de> provided and tested it.
Improved description of cross-building lsof for a
64 bit Solaris 7 system on a 32 bit system with
suggestions from Phillip Edwards
<Philip.Edwards@sn.wpafb.af.mil>.
Fixed a gawk POSIX-mode pattern error in the Linux
/dev/kmem-based Mksrc script, based on a tip from
Ambrose C. Li <acli@mingpaoxpress.com>.
Fixed a bug in the Tru64 UNIX IPv6 handling, courtesy
of a report from Casper Dik <casper@holland.sun.com>.
Enabled support for OpenBSD 2.6.
Enabled support for BSDI BSD/OS 4.1, based on a
report from Jeffrey C Honig <jch@bsdi.com> that
only a Configure script change is necessary.
Enabled Configure script to use gcc for building
lsof for a 64 bit Solaris 7 and 8 kernels, if the
gcc version is 2.95 or above.
Improved -i option handling for systems with IPv6
support so that it will search for a host name in
both IPv4 and IPv6 families, when that is possible.
As a companion modification, changed -V processing
to report a single error when a multiple host name
match is requested. Casper Dik <casper@holland.Sun.COM>
helped test.
Fixed a DEC OSF/1, Digital UNIX, Tru64 UNIX repeat
mode bug, reported by Mayer Ilovitz <mayer@cooper.edu>.
Mayer helped test the fix. The fix was offered as a
patch to 4.45.
Changed Solaris socket file recognition scheme, so it
is (nearly) the same through Solaris 8, where the
previous clone device scheme no longer works.
With significant assistance from Casper Dik, added
support for Solaris 8 Beta and Beta refresh. The
IPv6 support in Solaris 8 is still in some flux,
so there are temporary compensations for the
differences between Beta IPv6 support and Beta
refresh IPv6 support. Casper and I hope those
differences disappear by FCS.
Improved the delivery of information on Solaris
2.5.1, 2.6, 7, and 8 door files.
Fixed a repeat mode bug that surfaces when /etc/passwd
changes between cycles. The bug report and diagnostic
help were supplied by Igor Schein <igor@txc.com>.
The fix was offered as a patch to 4.45.
Added support for INRIA IPv6 to NetBSD. Jean-Luc
Richier <Jean-Luc.Richier@imag.fr> provided patches
and a test system on which to verify them.
Added support for AIX 4.3.3. Jeff W. Stewart
<jws@anaconda.cc.purdue.edu> provided a test system.
Made adjustments for FreeBSD 4.0-current.
Improved reporting of information for AIX sockets that
lack protocol control blocks.
4.47 November 29, 1999
Based on a query from Jean-Pierre Radley <jpr@jpr.com>,
changed the lsof top-level Makefile to propagate
CFGF to the library Makefile. (DEBUG was already
being propagated.) Added osrgcc and scogcc Configure
abbreviations (to use gcc) for Jean-Pierre.
In response to a query from Igor Schein <igor@txc.com>,
improved the Configure script test for Solaris 7
and 8 that decides if the compiler can produce 64
bit executables.
Made an ugly hack, based on making a private rnode
structure definition from q4 output, to compensate
for HP-UX 10.20 and lower recent NFS3 patches. HP
didn't supply an updated <nfs/rnode.h> with the
patches. The problem was reported by Will Partain
<partain@mekb2.sps.mot.com>. Elias Halldor Agustsson
<elias@hi.is> helped identify the patches as
PHNE_18173, PHNE_19426, PHNE_19937, and PHNE_20091,
and provided a test system.
Switched BSDI test system from 2.1 and 3.1 to 4.0.1,
courtesy of Terry Kennedy <terry@tmk.com>.
Added some more dev_t hacks for Alpha FreeBSD 4.0.
Added support for IPv6 on BSD 4.x. The support hasn't
yet been tested, just compiled.
Added support for the mnt file system (mntfs or
/etc/mnttab) on Solaris 8. Tested on Solaris 8
BETA-Refresh.
Made selection of optional fields (e.g., PPID with
-FR) in a field output specification select the
optional field, too, so that the option selector
for the field (e.g., -R) isn't also required. This
change was made in response to an inquiry from John
DuBois <spcecdt@armory.com>. This may require some
revision to scripts that parse all field output;
two scripts in the lsof distribution's scripts/
subdirectory had to be updated.
Corrected handling of Linux IPv4 addresses mapped
in IPv6 addresses.
Tested under OpenBSD 2.6.
4.48 January 14, 2000
Modified -i argument processing of colon-separated
IPv6 addresses to recognize an IPv4 address mapped
in an IPv6 address and handle it as an IPv4 address.
This was offered as a patch to 4.47.
Added a defined symbol (NOWARNBLKDEV) to control
(inhibit) the issuance of a warning when no block
devices are found. This was done anticipating its
need in FreeBSD 4.x, but that dialect version no
longer has any block devices, so HASBLKDEV was
disabled for it instead. NOWARNBLKDEV was left in
place for possible use in the future.
Enabled KAME IPv6 Configure support for FreeBSD
when <netinet6/in6.h> is found.
Disabled use of gcc to compile lsof for 64 bit
HP-UX 11.
Updated Configure to recognized FreeBSD 3.4.
Based on suggestions from Bernt Christandl
<beb@MPA-Garching.MPG.DE> improved AFS configuration
for AIX and Solaris, and updated AIX AFS 3.5 support.
Johannes Tax <tax@bluedog.oit.unc.edu>, Hung T.
Pham <hung_pham@unc.edu>, and Curt Freeland
<curt@grumpy.cse.nd.edu> provided test systems.
Updated lsof's private rnode definition for AIX
4.3.3, since IBM still doesn't ship the
<oncplus/nfs/rnode.h> header file and the rnode
structure definition in <nfs/rnode.h> doesn't match
what the kernel uses. This was offered as a patch
to 4.47.
Weakened the test in the Linux /proc-based lsof of
the field count of data lines in /proc/net/{tcp,udp}.
It appears that recent 2.3.x Linux kernels have
added untitled fields to these files. The bug
report came from Gabor Liptak <gaborliptak@usa.net>.
Adjusted for a FreeBSD 4.0 change in the definition
of [_]KERNEL. David O'Brien <obrien@NUXI.com> reported
the problem and provided a test system.
Removed the HASPPID bracket from Fppid (the -R
option state variable) so that the field select
table will compile even when HASPPID is not defined.
This problem was introduced at revision 4.47 with
code that causes some field output characters to
set option states. The problem was reported by
David Bacon <bacon@birch.eecs.lehigh.edu>.
4.49 April 3, 2000
Made clearer in man page that "Lxx" FDs are AIX
loader table references. Also updated the 00FAQ
discussion of the Stale Segment ID bug to include
AIX 4.3.x.
Modified support for NetBSD 1.4Q to include the
<sys/buf.h> header file to cope with an MFS change.
Added support for OpenBSD UVM virtual memory.
Added support for AIX systems with > 2GB of memory.
Chris Sylvain <csylvain@itg.ummc.umaryland.edu>
reported the problem and provided the solution.
Chris also supplied some minor code cleanup. This
was offered as a patch to 4.48.
Based on new information from Igor Schein <igor@txc.com>
made additional compensation in Configure script
for 64 bit Solaris 7 and 8 gcc.
Added some 00FAQ info on the effect ordering of
the +fg and -FG options has on output format.
Improved NetBSD IPv6 configuration, based on a
suggestion from Thomas Klausner
<wiz@danbala.ifoer.tuwien.ac.at>. Added code to
convert IPv4-mapped-in-IPv6 addresses to IPv4
addresses.
Updated the information in 00FAQ and the HP-UX 11
binary directory README files on the HP-UX 11 ipis_s
patch with new information supplied by Eric McWhorter
<emcwhorter@xsis.xerox.com>.
Added documentation on changes to HASFSTYPE and
HASNCACHE, and the new HASPRIVPRIPP.
Adjusted Configure for FreeBSD 5.0. Made additional,
necessary changes to Configure and the BSDI sources
to eliminate load errors.
Added KAME IPv6 support to FreeBSD at the request
of Ollivier Robert <roberto@eurocontrol.fr>, who
provided a test system.
Corrected the script that generates the CHECKSUMS
files for binaries to correctly name the detached
PGP certificate. The documentation bug was reported
by Michael Hennecke <hennecke@rz.uni-karlsruhe.de>.
4.50 June 29, 2000
Added a NetBSD alpha test host, courtesy of Ray
Phillips <r.phillips@mailbox.uq.edu.au>. An lsof
4.49 binary, built on Ray's 1.4.1 system was made
available prior to the 3.50 release.
Upgraded the system map file tests in /dev/kmem-based
Linux lsof, making the use of DEBIAN_LINUX_LSOF
unnecessary. Tested the changes on a system made
available by Vincent Kujala <kujala@geog.ubc.ca>
and Jim Mintha <jim@ic.uva.nl>.
Forced AIX to use the large-file-enabled versions
of lstat (lstat64) and stat (stat64) if <sys/stat.h>
contains stat64. This should allow lsof to stat()
AIX files > 2GB even when the builder has not
defined the "large file enabled programming
environment." Configure tests <sys/stat.h> and
puts -DHASSTAT64 in the Makefile's CFLAGS to make
this happen. Fernando A.B. Whitaker
<whitaker@cenapad.unicamp.br> reported the problem.
This was offered as a patch to 4.48.
Enabled Configure script to handle OpenBSD 2.7.
Angelos D. Keromytis <angelos@dsl.cis.upenn.edu>
reported the availability of OpenBSD 2.7 and supplied
the Configure script patch.
Improved handling of DOOR and fattach()'d files in
Solaris.
Changed message about missing kernel symbol file
from "not yet determined" to "none found".
Updated FreeBSD, NetBSD, NEXTSTEP, OpenBSD, and
OPENSTEP support to report "no PCB" and the values
of the SO_CANTSENDMORE and SO_CANTRCVMORE state
flags when a socket structure has no inpcb pointer.
This modification was made to AIX lsof at revision
4.46. Added an entry to 00FAQ about sockets that
have no inpcb pointer.
Upgraded support for FreeBSD 5.0-CURRENT. Ben
Smithurst <ben@scientia.demon.co.uk> supplied
patches and did testing. David O'Brien <obrien@NUXI.com>
supplied a test system. The update included dropping
the Fctty part of file descriptor file system
support, conditional on a Configure script test.
I propagated those changes to BSDI, NetBSD, and
OpenBSD in anticipation of their having the
modification in the future. David also arranged
with Michael Haro <mharo@area51.fremont.ca.us> for
a FreeBSD 3.4 test system.
In response to an lsof 3.72 bug report from Jim Mewes
<jim@corp.phone.com>, added more kernel address
filtering to the lsof function, kread(), that reads
Solaris kernel data.
In response to a report from Marc Duponcheel
<marc@offline.be>, added tests to the /proc-based
Linux lsof to ignore file systems of types "autofs"
and "pipfs".
Based on a report and information supplied by Casper
Dik <casper@holland.Sun.COM>, updated the ncache_load()
function in lib/rnch.c with new code that deals
with a post Solaris 8 change in kernel name cache
(DNLC) handling. Casper tested the update, which
should be invisible to Solaris versions without
the new DNLC code.
Added support for Solaris VxFS QIO files, based on
a report from Kieran Broadfoot <kieran.broadfoot@gs.com>.
Kieran help test the support.
Added support for PTX 4.4.6 and 4.5[.1] with help
from the usual cast of good people at Sequent.
Added support for 64 bit file sizes and offsets on
BSDI, FreeBSD, NetBSD, and OpenBSD, based on a
report from Dan Nelson <dnelson@emsphone.com>.
Dan supplied a patch and did FreeBSD testing.
Added Configure script recognition of NetBSD 1.5,
based on a report from Andrew Brown <atatat@atatdot.net>.
Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at> updated
the NetBSD port package to use a pre-release of this
addition.
At the last minute saw a notice via deja.com's
UseNet search service that FreeBSD 3.5 had been
released and lsof didn't grok it. Added recognition
of 3.5 to lsof's Configure script, but didn't have
the opportunity to test lsof on 3.5.
4.51 August 21, 2000
Added Configure script support for the upcoming
Solaris 9 release based on suggestions from Casper
Dik <Casper.Dik@holland.sun.com>.
Changed sample Perl scripts to assume that
/usr/local/bin/perl is Perl 5 and Perl 4 may be
found in /usr/local/bin/perl4.
Updated Configure to recognize FreeBSD 4.1 and made
a FreeBSD pre-release distribution available.
Bela Lubkin <belal@sco.COM> tested lsof on the
upcoming SCO OSR 5.0.6 release and reports that
lsof appears to work properly.
Updated the AIX compiler test in Configure to
recognize its version 5.
Updated AIX 4.3.3 support with automatic recognition
of the proper rnode structure, based on machine
bit width. Also added code to detect when processing
the -X option that lsof has been compiled with the
"other" AIX 4.3.3 user structure and to apply
compensations. When a compensation method works,
it's applied during subsequent -X processing; when
none works, further -X processing is disabled.
Added Tru64 UNIX 5.1 support. Updated Tru64 UNIX
library text file support to recognize new kernel
support for AdvFS library files. Berkley Shands
<berkley@cs.wustl.edu> and Klaus Saggerer USG
[saggerer@zk3.dec.com> helped put me in contact
with Chang Song <song@zk3.dec.com>, the developer
of 5.1's new kernel name cache and he helped me
develop new code in lsof to access it.
Corrected reporting of PTX fattach()'d address.
Changed Configure and dlsof.h for NetBSD and OpenBSD
to use /usr/include/uvm header files when available.
Andrew Brown <atatat@atatdot.net>, Thomas Klausner
<wiz@danbala.ifoer.tuwien.ac.at>, and Wolfgang
Rupprecht <wolfgang@wsrcc.com> pointed out the need
to do this for NetBSD. Andrew provided access to
a NetBSD 1.5 system for verifying the changes.
Installed snprintf() support, including a private
version in the lsof library for those UNIX dialects
without the function. Changed all sources to use
it instead of sprintf() and strcpy().
Fixed a memory leak in the readvfs() functions of
BSDI, DEC/OSF1, Digital UNIX, FreeBSD, NetBSD,
OpenBSD, and Tru64 UNIX.
Tested on Linux 2.4.
Modified the Pyramid MkKernOpts script to compensate
for `uname -s` configuration alternatives. Robert
Dahlem <Robert.Dahlem@ffm2.siemens.de> supplied
the modification.
Obtained access to an FCS Solaris 8 64 bit system
and built lsof on it, using Sun Workshop C 5.0 and
gcc 2.96 20000814 (experimental). Both compilers
produce a working lsof.
4.52 November 8, 2000
Completed work on an HP-UX 11.11 port that uses a
pstat(2) interface provided by HP. To distinguish
it from its predecessors for HP-UX, this lsof
version is called PSTAT-based and the predecessor
versions are now called /dev/kmem-based. I am
indebted to the far-sightedness and support of
these good people at HP for making PSTAT-based lsof
possible: Carl Davidson, Louis Huemiller, Rich
Rauenzahn, and Sailu Yallapragada. The PSTAT-based
sources are in lsof_4.52/dialects/hpux/pstat, the
/dev/kmem-based ones in lsof_4.52/dialects/hpux/kmem.
Ported to IBM Monterey for Merced|Itanium, aka AIX
5L. It configures via the Configure script's "aix"
abbreviation and has been tested on AIX 5L Beta 3.
Jay Beck, Steve Dibbell, Loc Le, Nasser Momtaheni,
and Malcom Zung of IBM provided generous support.
Since AIX 5L is still in Beta testing, this port
can't be considered complete.
Added Configure support for OpenBSD 2.8. David
Mazieres <dm@cs.nyu.edu> provided a test system.
Based on a report from Marc Christensen
<marc@mecworks.com> added sockfs to the mount scan
exemption list for /proc-based Linux lsof.
Added large file, CDFS, and DOSFS for UnixWare 7.x.
Added UnixWare device memory mapping support. All
UnixWare changes were supplied by Eric Dumazet
<edumazet@cosmosbay.com> Eric also supplied some
miscellaneous bug fixes.
Deferred name cache loading until printname() needs
to use the name cache.
Terminated Pyramid, SunOS 4.1.x, and Ultrix support,
because test systems are no longer available.
Final Pyramid and Ultrix source code distributions
for lsof revision 4.51 may be found on lsof.itap.purdue.edu
in pub/tools/unix/lsof/OLD/src. The no longer
supported SunOS 4.1.x source code is still distributed
with the Solaris source code.
Added code to set Solaris node address to real vnode
address, when applicable.
John Speno <speno@lopan.isc-net.upenn.edu> provided
information that enabled me to update the Tru64
AdvFS (MSFS) node definition for AdvFS version 5.
Added Tru64 5.x CFS support with help from Kris
Chandrasekhar <Kris.Chandrasekhar@compaq.com>,
Diane Lebel <lebel@zk3.dec.com>, and John Speno.
The support only provides information about cached
file attributes.
Installed a Configure patch for HP-UX 11 supplied by
Kenneth Stailey <kstailey@disclosure.com> that adds
another command to q4 input.
Tested on FreeBSD 4.2.
Will Day <willday@rom.oit.gatech.edu> and Frank
Winkler <frank.winkler@germany.sun.com> graciously
supplied Solaris 8 binaries.
Added Solaris 9 text file support, supplied by
Casper Dik <Casper.Dik@holland.sun.com>.
4.53 December 6, 2000
Added the AIX 5L j2_lock.h to the distribution with
a Configure script step to use it when it's missing
from /usr/include/j2.
Removed SunOS 4.1.x support.
Removed Linux 2.0.x /dev/kmem support.
Fixed VBLK and VCHR special device file reporting
to handle /dev information more accurately.
Added a Apple Darwin / Mac OS X 1.2 port, provided
by Allan Nathanson <ajn@apple.com>. Allan also
arranged for a test system so I can maintain this
port. An additional test system was provided by
Dale Talcott.
Dropped claims of support for all UnixWare versions
except 7.1.0, since that is the only version on
which I can test lsof. Even though lsof 4.53 is
deprecated for UnixWare 2.1.3, installed a patch
for it with testing done by A. Channing Clark
<clark.channing@heb.com>.
Dropped claims of support for all SCO OpenServer
versions except 5.0.5, since that is the only
version on which I can test lsof.
4.54 January 19, 2001
Added compensation for a change that made the
FreeBSD mount structure invisible. I can only test
back to 3.2 and the compensation works there, so
it's been #ifdef'd for 3.2 and above. David O'Brien
<obrien@FreeBSD.org> provided the necessary clue.
Based on a report from Valdis Kletnieks
<Valdis.Kletnieks@vt.edu>, changed all IPv6 support
to report a TYPE of IPv6 for sockets with IPv4
addresses mapped in IPv6 addresses. The previous
lsof behavior was to report their TYPE as IPv4.
Restored the Linux GlibC test to Configure, removed
at revision 4.53, based on a report from John Dzubera
<zube@cs.colostate.edu>, that RedHat Linux 6.0 still
needs the test.
Made setting of link count for Solaris more selective.
Limited Readlink() recursion to MAXSYMLINKS. The bug
was reported by Jan Dvorak <johnydog@go.cz>.
Dropped the *claim* that lsof runs on Solaris 2.5.1.
It may well do so, but I no longer have access to a
test system.
Fixed an #endif comment typo, reported by Igor Schein.
Fixed a typo in a cast for a Tru64 UNIX 5.1 function
and updated Configure for Tru64 UNIX 5.0 and 5.1 with
information from Jesse Perry <jesse.perry@compaq.com>.
Corrected non-fatal typos in the AdvFS support in
dnode.c for Tru64 UNIX.
Added msdos file system support for NetBSD and OpenBSD.
Andrew Brown <atatat@atatdot.net> requested and helped
test it.
4.55 February 15, 2001
Based on a report from Bernd Eckenfels <ecki@lina.inka.de>
added support in lsof for files in /proc/<PID>/maps
that have been deleted.
Changed PGRP output title to PGID, conforming to
the most common current abbreviation for Process
Group ID (PGID). While some systems continue to
use *pgrp for internal kernel variable names, most
systems that support the display of PGID via ps(1)
now title it PGID. The lsof -g and -Fg options
operations are unchanged in function; only titles
and descriptions have changed. Also changed internal
variable names from *PGRP and *pgrp to *PGID and
*pgid where possible.
Dropped the *claim* that lsof runs on HP-UX 9.x.
It may well do so, but I no longer have access to
a test system.
In response to a suggestion from Jeff Howie
<jeff.howie@federated.ca> added support for command
name selection by regular expression. A new form
of the -c option value is use to identify and
specify a regular expression.
Restore the *claim* that lsof works on UnixWare
7.0, since I re-acquired a test system.
4.56 May 3, 2001
Corrected some problems Amir Katz <Amir_Katz@bmc.com>
found with Insure++, one in lib/dvch.c, the rest
in Solaris sources. Amir's report also helped me
find an error in an snpf() call that caused (the
unsupported) Solaris 2.5.1 lsof to crash. Wally
Winzer, Jr. <wally.winzer@ChampUSA.COM> helped test.
Added support for UnixWare 7.1.1 and above in-kernel
UNIX sockets. John Hughes <john@Calva.COM> kindly
provided code and access to a test system. John
also provided a test system and advice for adding
UnixWare 7.1.1 NonStop Cluster and CFS support.
More help with that effort came from Kurt Gollhardt
(SCO), Barbara Howe (SCO), Bela Lubkin (SCO), and
Dewan Rashid <Dewan.Rashid@ir.com>.
Archived a set of compilation hints (patches) from
Bill Melvin <Bill.Melvin@esc.edu> that make it
possible to compile the old, unsupported lsof 3.08
sources on UnixWare 1.x without NFS or CDFS support.
Installed support supplied by Allan Nathanson
<ajn@apple.com> for the Darwin "Gold Master" release,
Mac OS X 10.0 (aka Darwin 1.3 in its public source
version). Added Allan's CVS repository suggestions
to the script that gets additional header files
from an open source repository.
Tested an HP-UX 11.11 kernel patch from Sailu
Yallapragada that enables reporting of TCP/IP
information for telnetd processes that use the
telnet multiplexor. I don't yet know the kernel
patch ID.
Made the Solaris inclusion of <inet/mi.h> conditional
on the Solaris version. (It's apparently not needed
at 2.6 and above.) Bill Watson <bill.watson@uk.sun.com>
brought this to my attention.
Added alternate Linux 2.4.x lock extent test, supplied
by Jim Mintha <jim@ic.uva.nl>.
Rearranged the lines and pre-processor tests in
regex.h, lib/regex.c, and lib/snpf.c so that unifdef
can be used to eliminate copyright and GPL statements
when the files aren't being used for a particular
dialect. (USE_LIB_* definitions in a dialect's
machine.h header file determine if one or more of
those three files are to be used.)
Added preliminary support for Solaris 8 with VxFS
3.4. This support will be refined as I get
information from Veritas about how they will
distribute the kernel header files lsof needs.
Those header files were omitted from the standard
VxFS 3.4 distribution. Technical assistance and
testing were provided by Calle Dybedahl <cdy@algonet.se>,
Gary Millen <gary.millen@veritas.com>, Rainer Orth
<ro@TechFak.Uni-Bielefeld.DE>, Peter C. Vernam
<pvernam@draper.com>, and Donna Yobs
<Donna.Yobs@veritas.com>
Tested on FreeBSD 4.3-STABLE.
Dropped the *claim* that lsof works on UNIX dialects
where I no longer have test systems: BSDI 2.1,
3.[01] and 4.0; DEC OSF/1, Digital UNIX and True
64 UNIX 2.0 and 3.2; FreeBSD 2.1.[67], 2.2[.x],
3.[012345] and 4.[01]; HP-UX 10.20; NetBSD 1.[234];
SCO OpenServer 5.0.5; and SCO UnixWare 7.0
Tested on Solaris 9 BETA, s81_36.
4.57 July 19, 2001
Help (-h) and version (-v) output now have URLs
for the newly created and timeliest lsof FAQ
(00FAQ in the lsof distribution) at:
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
and the man page for the current lsof distribution
at:
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
Based on a report from Steve Laubscher
<slaubs@woodward.com>, modified dlsof.h for PTX
4.6[.1] to avoid a temporary dnlc_t definition
needed at PTX 4.5.1.
Corrected test for old Linux kernels in Configure.
Henri Karrenbeld <ishtar@cal044202.student.utwente.nl>
brought the error to my attention. Limited Linux
claims to 2.1.72 and above in the documentation.
Improved HP-UX 11 Configure stanza and stream socket
handling.
Constructed a work-around for the HP-UX 11 optional
OnlineJFS package. The work-around sadly requires
lsof to have a private version of the vx_inode
structure, since the OnlineJFS package doesn't
update <sys/fs/vx_inode.h>. Troyan Krastev
<Troyan.Krastev@ricoh-usa.com> brought the bug to
my attention and Michael Bracewell
<michael@ra.TSS.PeachNet.EDU> provided a test system
where I developed the work-around.
Added locale support to lsof's isprint() test,
based on a suggestion from Dan Mercer <damercer@mmm.com>.
Lsof will use setlocale(), when that function and
its supporting <locale.h> header file are available.
Added OpenBSD 2.9 support.
Based on a report from Aaron Rhodes <arhodes@psionic.com>
and with testing help from Aaron, made the lsof
4.56 revision compile and work on OpenBSD 2.6.
While that OpenBSD version is no longer supported,
Aaron's report exposed a Configure script bug
affecting OpenBSD versions lsof does support.
Updated for FreeBSD 5.0-CURRENT. Szilveszter Adam
<sziszi@petra.hos.u-szeged.hu> help test. The lsof
FreeBSD ports packager, David O'Brien <obrien@FreeBSD.org>,
assisted.
Tested on AIX 5.1. Loc Le and Nasser Momtaheni of
IBM provided test systems.
4.58 September 13, 2001
Added options to safestrprt() and safestrprtn() to
surround the string with '"' and to suppress the
printing of an ending '\n'. Use of these functions
in device cache file error message reporting answers
a suggestion for better error reporting from John
Jackson <jrj@purdue.edu>.
Fixed a Solaris 2.6 and above problem related to
searching for "large" (O_LARGEFILE) files by name;
lsof was using the wrong version of [l]stat(2).
The bug was reported by Daniel Trinkle
<trinkle@cs.purdue.edu>.
Added AIX 4.1.4 and above XTI socket support.
Added OSR Xenix Shared Data and Semaphore file type
support with modifications supplied by Bela Lubkin.
Updated OPENSTEP support with modifications from Carl
E. Lindberg <lindberg@clindberg.org>. The changes
enable the correct reporting of executable and
library open files ("txt" type).
Limited claims of OpenServer support to the versions
where I currently test, 5.0.4 and 5.0.6. (Lsof
probably works on 5.0.5.)
Enabled processing of -C option for PSTAT-based HP-UX
lsof.
Enabled and tested on FreeBSD 4.4.
Corrected a file system test example in 00QUICKSTART,
based on a report from Jun Biao WANG <wangjunb@cn.ibm.com>.
Made available for re-distribution a user-contributed
port of lsof 4.51 to Reliant UNIX 5.45. Thomas
Mauterer <Thomas.Mauterer@philosys.de> contributed
the port.
4.59 October 20, 2001
With the closing of the Sequent Synergy Links Lab
by IBM, terminated lsof support for PTX. The last
tested PTX lsof revision, 4.58, is available on
lsof.itap.purdue.edu in .../lsof/OLD/src.
Adjusted for FreeBSD 5.0-CURRENT NFS header file
changes, based on a report from Jos Backus
<josb@cncdsl.com>.
Corrected a bug in the way Linux lsof identifies
the owner of a process. Lionel Cons <lionel.cons@cern.ch>
reported the problem and tested the fix. Added
code to avoid stat(2) calls on regular Linux files
whenever possible. Lionel reported the need to do
this (AFS files) and tested the new code.
Added new output field for raw device number in
hex. The field is identified with 'r'. This field
is NOT selected when -F or -F0 is specified so that
its appearance won't disturb existing scripts that
process field output.
Added support for OpenUNIX 8. A test system was
provided by Larry Rosenman <ler@lerctr.org>.
Matthew Thurmaier <matt@compclass.com> and many
people from Caldera provided technical assistance.
Added an additional UVM test to the NetBSD Configure
stanza. Andrew Brown <atatat@atatdot.net> supplied
the test; it recognizes NetBSD 1.5Y UVM changes to
the vnode structure recently committed by Chuck
Silvers.
Applied Configure and get-xnu-headers.sh script
changes suppled by Allan Nathanson <ajn@apple.com>
for Darwin 1.4.
Added for Bela Lubkin <belal@mammoth.ca.caldera.com>
OSR-specific environment variables to supply values
to the Configure script. The variables are described
in 00XCONFIG.
Added an IP version selector to the -i option
parameters.
4.60 November 9, 2001
Added special handling to and corrected bugs in
the matching of IPv4 in IPv6 addresses to -i6:<...>
selectors.
Made 00FAQ corrections and updates, based on
discussions with Igor Schein <igor@txc.com>.
Modified Configure script to detect a 64 bit capable
gcc compiler and permit it to be used to build 64
bit (PA-RISC 2) lsof for HP-UX 11.00. Tested with
HP's gcc package, which Rich Rauenzahn of HP kindly
installed on a test system at HP. Stefan Marquardt
<stefan.marquardt@hagebau.de> helped test.
Made lsof's method of killing its child process
more robust, based on a suggestion from Bela Lubkin
<belal@caldera.com>.
Modified all dialect Makefile segments to accept
select -v #define's from the environment -- a
builder's comment, host, logname, system information
and user name. This was done for Bela Lubkin, so
he can "tune" the -v output when he packages lsof
in the upcoming Caldera OSR 5.0.7 release.
Changed Perl scripts in scripts/ to put the lsof
path consistently in $LSOF. Also added a fix from
Bela Lubkin to scripts/big_brother.perl5 that allows
it to tolerate SCO OSR "ago" clauses in open UDP
file information. Strengthened emphasis in
scripts/00README that the scripts are examples that
shouldn't be expected to run on all UNIX dialects
without modification.
At Bela Lubkin's suggestion changed the device
cache file format examples in 00DCACHE and 00FAQ
to avoid "%U%". That's an SCCS escape sequence.
Added support for OpenBSD 3.0.
Added +DAportable to CFLAGS for 32 bit HP-UX 11.
Amir Katz <Amir_Katz@bmc.com> suggested the addition.
4.61 January 22, 2002
Updated field output example Perl scripts in the
scripts/ subdirectory to discover the lsof path,
starting at .. and proceeding through the PATH
environment variable's directories.
Added minor OSR Configure script fixes, provided
by Bela Lubkin <belal@caldera.com>.
In response to a report from Joshua Wright
<Joshua.Wright@jwu.edu> modified NetBSD and OpenBSD
Configure stanzas and sources so that lsof can be
built when there is no system source tree (e.g.,
/usr/src/sys).
In response to a report from Peter Valchev
<pvalchev@openbsd.org> improved the UVM test in
the OpenBSD Configure stanza.
Updated Configure script to recognize FreeBSD 4.5.
Updated for FreeBSD 5.0 procfs and pseudofs changes.
Updated HP-UX stanza to see if the compiler named
in the LSOF_CC environment variable is the bundled
compiler. If it is, "-O" is omitted from the
compiler flags.
Updated Digital UNIX 4.x and Tru64 UNIX error message
related to kernel name list failures. Added an FAQ
section about how a kloadsrv daemon failure can cause
knlist(3) to fail. The condition was reported by
Douglas B. Jones <douglas@gpc.peachnet.edu>
Based on a report from Mark W. Eichin <eichin@thok.org>
made Linux lsof capable of handling and reporting
file sizes greater than 32 bits.
Tested on Solaris 9 BETA-Refresh.
Corrected a bug in the matching of IPv4 addresses,
mapped in IPv6 addresses, to an IPv4 parameter to
an -i option.
Ported to 64 bit Power AIX 5.1 kernel with advice
from David Clissold <cliss@austin.ibm.com> and Marc
Stephenson <marc@austin.ibm.com>, and on a test
system provided by Loc Le <lple@us.ibm.com>.
4.62 March 7, 2002
Updated 00README to reflect the usefulness of gcc
for building AIX lsof. Documented a report from
Brian L. Gentry <BGentry@nationsrent.com> of success
on AIX 4.3.3. I documented my success on 32 bit
Power AIX 5.1 and my lack of success on ia64 AIX
5.1 and 64 bit Power AIX 5.1.
Improved UnixWare >=7.1.1 reporting of UNIX socket
NAME field information for NonStop Cluster systems
with a patch provided by John Hughes <john@Calva.COM>.
Offered John's improvement as a patch to lsof 4.61.
Corrected bugs in handling of open files on block
devices by OSR lsof. The bugs were reported by
Bela Lubkin <filbo@deepthought.armory.com>.
Fixed bug in writing >32 bit device numbers for
block devices to the device cache file.
Added support for reporting block special nodes
not in /dev (or /devices). That required "like
device special" be changed to "like block special"
and "like character special". (00FAQ was updated.)
Based on a report from Peter Valchev <pvalchev@openbsd.org>
improved the definition of the source for NetBSD
and OpenBSD kernel symbols (the nlist() source
file). NetBSD now defaults to getbootfile(3) if
it is available, /netbsd otherwise. OpenBSD now
defaults to /dev/ksyms if it is available, /bsd
otherwise.
Made possible compilation under BSD/OS (BSDI) 5.0
with changes to Configure, dialects/bsdi/dlsof,
dialects/bsdi/dproc.c and lib/rnmh.c. The changes
were suggested by Steven Hinkle <hinkle@bsdi.com>.
Note that these changes do not substantiate a claim
that lsof works on BSDI 5.0, because I haven't
tested it there.
Updated OpenUNIX private <sys/fs/memfs_mnode.h>,
based on a report from Larry Rosenman <ler@lerctr.org>
that it had been updated by Caldera patch OU800PK3.
Unfortunately the patch only corrects some of the
problems with the header file, so it is still
necessary to distribute a private patched version
of it with the lsof sources.
Applied a man page correction reported by Frederic
Delanoy <max_ok@yahoo.com>.
Corrected cast bugs related to using the HP-UX
bundled C compiler on HP-UX 11.11.
4.63 April 23, 2002
Added HPUX_BOOTFILE environment variable for use
by the Configure script in determining HP-UX kernel
configuration information -- e.g., the state of
the ipis_s structure in the HP-UX 11 kernel. The
change was suggested by Marc Bejarano <beej@alum.mit.edu>.
Marc also suggested some changes to the HP-UX
section in 00FAQ that discusses Configure's use of
q4 for HP-UX 11.
Fixed a bug in the Solaris lsof file system matching
code. It was not reporting that VCHR files in
/devices were in / when /devices was in /, too.
Corrected bugs in device number, file size, file
offset, and raw device number field output generation.
Added recognition of OpenBSD 3.1 to the Configure
script with a suggestion from Peter Valchev
<pvalchev@sightly.net>. Note that this change does
not constitute a claim that lsof works on OpenBSD
3.1, because I haven't tested it there.
Built an automated test suite. (See 00TEST and
the tests/ sub-directory of the lsof main directory).
Bela Lubkin requested it. Dale Talcott, John
Hughes, and Larry Rosenman helped me validate it
on their systems.
During the development of the test suite I discovered
the following lsof bugs or missing features, and
corrected or supplied them.
* Corrected the reporting of locks for:
o Digital UNIX 4.0d and Tru64 Unix 5.[01];
o HP-UX 10.30 and 11.00;
o OpenUNIX 8;
o UnixWare 7.1.1.
* Enabled HP-UX 10.30 and 11.00 to report open NFS
file link counts.
* Corrected the reporting of UNIX domain socket
names for Apple Darwin, FreeBSD 4.5 and above,
NetBSD 1.4.1 and above, and for OpenBSD 3.0 and
above.
* Enabled HP-UX 11.11 to stat(2) large files.
* Fixed handling of combination 32 and 64 bit
device numbers in AIX 64 bit architectures.
Updated the AIX 4.3.3 NFS rnode recognition code,
first installed at revision 4.51. It looks like
some IBM update has restored a single rnode structure
independent of the machine bit width.
Updated the NetBSD and OpenBSD sources so NetBSD
can process DTYPE_PIPE files, as OpenBSD was already
able to do.
Updated Darwin get-xnu-headers.sh script to reflect
information about a recent reorganization of the
Darwin CVS hierarchy, supplied by Allan Nathanson
<ajn@apple.com>.
Added defense against the standard I/O descriptor
attack.
4.64 June 26, 2002
Corrected some FreeBSD pre-processor directives.
David O'Brien <obrien@NUXI.com> pointed them out.
Updated lsof's main() function to: 1) close all
open file descriptors above 2 before starting; and
2) to set a non-interfering umask. Moved GET_MAX_FD
test from misc.c to proto.h, so that main() could
use it. Added multiple-include protection to
proto.h.
Moved FAQ's test suite Q's & A's to a more appropriate
section. Added a Q&A on HASSECURITY option and
its affect on searching for open files. (That was
already in the man page.)
Updated hpux/kmem/dnode.c for HP-UX < 11 compilation
with information from John Dzubera <Zube@CS.ColoState.EDU>.
While lsof doesn't support HP-UX < 11 any more, I
try to avoid disabling it there when possible, and
a locking fix for HP-UX >= 11 in lsof 4.63
inadvertently disabled compilation of lsof for
HP-UX < 11. Fixed long-standing bug in HP-UX 10.20
lock reporting.
Removed language from the test suite programs that
requires an ANSI-C compiler. This allowed the test
suite to be validated with cc and gcc on the un-
supported HP-UX 10.20.
At the suggestion of Manuel Bouyer <bouyer@antioche.eu.org>
switched NetBSD and OpenBSD lsof from using nlist()
to using kvm_nlist(). Made the same change for
BSDI, Darwin, and FreeBSD.
Validated test suite on OPENSTEP 4.2.
In response to a suggestion from Jeff Stoner
<jstoner@blackboard.com> enhanced support for the
FD list of the -d option to allow it to be either
an exclusion or inclusion list, using the '^' prefix
to denote exclusions.
Made adjustments for FreeBSD 4.6 and 5.0-CURRENT.
Fixed a FreeBSD /etc/make.conf CFLAGS extraction
bug, reported by Kris Kennaway <kris@obsecurity.org>,
and new a bug in the fix, reported by Eric Cronin
<ecronin@eecs.umich.edu>
Added nullfs support for FreeBSD, NetBSD, and OpenBSD
at the request of Andrew Brown <atatat@atatdot.net>.
Modified all readmnt() functions to ignore mounted-on
directory names that don't begin with '/'.
Tested on NetBSD 1.6A and OpenBSD 3.1.
Upgraded to Solaris 9 FCS with two changes to the
BETA-Refresh support: 1) an adjustment to dnode.c
for a change in the so_so (sonode) structure; and
2) addition of Solaris 9 FCS specific DNLC code.
David Comay <David.Comay@Eng.Sun.COM> sent me the
dnode.c change and Casper Dik <Casper.Dik@sun.com>
helped with the new DNLC support code.
Applied OpenUNIX changes that permit lsof to compile
and run on the upcoming 8.0.1 release. The changes
were supplied by Robert Lipe <robertl@caldera.com>.
Larry Rosenman <ler@lerctr.org> provided a test
system.
Added Solaris fd file system support.
4.65 October 10, 2002
Adjusted for change in FreeBSD 5.0-CURRENT inode
structure, reported by David O'Brien <obrien@NUXI.com>.
Adjusted for changes in FreeBSD 5.0-CURRENT <sys/vnode.h>.
One change was reported by Anders Nordby
<anders@FreeBSD.org>. Adjusted for FreeBSD 5.0-CURRENT
on sparc64 architecture.
Enhanced the error reporting of Solaris lsof when
it detects a kvm_open() failure, and added a 00FAQ
entry on the cause, based on a report from Peter
J. Bertoncini <pjb@anl.gov>.
Enabled compiling of lsof for NetBSD 1.5 with the
NULL file system, using a patch from Andrew Brown
<atatat@atatdot.net>.
Removed a hack in the LTbigf test program that was
once needed when it was compiled on Solaris 9 BETA-
Refresh with gcc. The hack isn't needed on Solaris
9 FCS. Janet Hempstead <jan@library.carleton.ca>
brought the need for this change to my attention.
Applied a patch, supplied by Andrew Brown
<atatat@atatdot.net>, that updates lsof for NetBSD
version 1.6F. Corrected handling of the NetBSD
nullfs.
Updated to BSDI BSD/OS 4.3 on a test system kindly
provided by Terry Kennedy <terry@tmk.com>.
Updated to FreeBSD 4.7.
Updated to Apple Darwin 1.5, 5.x and 6.x with
patches supplied by Allan Nathanson <ajn@apple.com>.
The patches include IPv6 support.
Updated Configure to use the -bnolibpath loader
option when building lsof on a PowerPC, running
AIX 5 or greater. Valdis Kletnieks
<Valdis.Kletnieks@vt.edu> informed me this was
needed. Lsof for AIX 5.x was initially developed
on the IA64, where -bnolibpath can't be used and
I didn't think to restore it to PowerPC loads when
AIX 5.x became available for that architecture.
Updated to UnixWare 7.1.3 on a test system provided
by Larry Rosenman <ler@lerctr.org>. Removed claims
that lsof works on OpenUNIX 8.0.1, because UnixWare
7.1.3 is the release name of OpenUNIX 8.0.1.
Based on a comment that his e-mail address was
wrong in the lsof distribution from Kenneth Stailey
<kstailey@disclosure.com>, removed all e-mail
addresses from lsof documentation files except this
one, 00DIST. The addresses in 00DIST are used to
send revision release notices to those who contributed
to a revision, but the addresses in this file for
previous revisions and in other documentation files
sometimes grow stale and are never validated.
4.66 December 22, 2002
Acquired Solaris 7 and 8 test systems, courtesy of
John Dzubera <Zube@CS.ColoState.EDU>. Updated
00TEST and tests/TestDB accordingly.
Clarified FreeBSD 5.0 architecture claims at the
suggestion of David O'Brien <obrien@NUXI.com>.
Also implemented David's suggestion to change
Intel to x86.
Installed changes to DNLC handling in OSR lsof in
preparation for handling changes in the OSR 5.0.7
DNLC cache. Information about the changes and
patches to handle them were supplied by Bela Lubkin
<filbo@deepthought.armory.com>.
Upgraded True 64 UNIX support to the 5.1B release
on a test system provided by Berkley Shands
<berkley@cse.wustl.edu> Had to used relaxed ANSI
compilation because of an error in a system header
file and other lsof source usages.
Implemented the HASNOSOCKSECURITY compile-time
option. When it and HASSECURITY are defined, lsof
will be built to list only the user's open files,
but will also list anyone else's open socket files,
provided the "-i" option selects their listing.
Updated the Customize script to ask about setting
HASNOSOCKSECURITY. Left it undefined in all dialect
machine.h header files. This change was requested
by Kenneth Stailey <kstailey@speakeasy.net> for
use with ntop.
Added support for OpenBSD 3.2 and its kernel trace
file.
Improved lsof help (-h) and version (-v) information
reporting.
Fixed a FreeBSD 4.7 and above off-by-two UNIX domain
socket path termination bug, reported by Ken Stailey
<kstailey@speakeasy.net>
4.67 March 27, 2003
Began the transition of the lsof ftp server host
name from vic.cc.purdue.edu to lsof.itap.purdue.edu.
That reflects Purdue organizational changes. This
first step makes the new name an alias to the old
one. The old name, vic.cc.purdue.edu, will remain
usable for an extended period.
Corrected a revision number reference in section
17.17 of 00FAQ on the appearance of Solaris negative
DNLC caching handing.
Updated 00FAQ discussion of compilers for 64 bit
Solaris.
Validated test suite for 64 bit Solaris 8 and gcc.
At the request of Alek O. Komarnitsky <alek@komar.org>
added the "+c <width>" option to enable optional
changing of the COMMAND column output maximum width
from the default to <width>. The default maximum
width remains CMDL, as defined in lsof.h.
Fixed three AIX kernel bit size detection bugs,
one in the AIX Configure script stanza, the second
and third in the AIX dproc.c get_kernel_access()
function. The bugs were reported by Pierre-Yves
Fontaniere <pyf@cc.in2p3.fr>, who tested the fixes.
Added kernel event queue file support for FreeBSD,
NetBSD and OpenBSD. Andrew Brown <atatat@atatdot.net>
supplied the code.
Updated to AIX 5.2 on a test system provided by
Dale Talcott <dtalcott@purdue.edu>. Had to build
work-arounds for two missing AIX 5.2 header files,
<j2/j2_snapshot> and <proc/proc_public.h>. Corrected
an off-by-one UNIX socket addressing bug. Taught
AIX lsof to handle both jfs and jfs2 files at the
same time. Adjusted for an IBM mistake in the
sizing of the fdsinfo structure in <procinfo.h>
Toshiya Nakamura <TOSHIYAN@jp.ibm.com> helped test,
Updated to FreeBSD 4.8. Corrected another bug in
FreeBSD UNIX domain socket name handling.
Corrected gcc build problems on HP-UX 11i, reported
by Yuliy Minchev <yuliy@mobiltel.bg>.
Updated BSDI BSD/OS support to 4.3.1.
Augmented a lock ID test on NetBSD to check if the
ID is an LWP pointer.
4.68 June 18, 2003
Enhanced Configure script's cleanup operations.
Added support for OpenBSD 3.3, based on a report
from Peter Valchev <pvalchev@sightly.net>.
Improved the description of the detached PGP
signature certificate file in the main lsof README
file, based on a suggestion from Diana Stockdale
<diana@mpl.ucsd.edu>.
Installed a work-around for FreeBSD 5.0-CURRENT on
Alpha to avoid a compiler register use complaint.
Corrected a 'c' option error message. Gnele
<blaadeleng@yahoo.com> reported the problem.
Upgraded EXT2FS and UFS support for NetBSD and
OpenBSD to handle new inode information, and the
fast UFS1 and UFS2 file systems.
With the help of Andrew Brown <atatat@atatdot.net>
determined the NetBSD snapshot (1.6F) at which
<sys/mount.h> could be included under _KERNEL, thus
eliminating the lsof netexport.h hack. The same
change applies to OpenBSD versions 3.3 and above.
Applied a patch from Armin Gruner <ag@muc.de> that
corrects the use of the HASPROCFS definition in the
FreeBSD dialect sources.
Corrected spelling errors in 00FAQ and in the
generated 00.README.FIRST_<version> file of the
distribution archive. John Jackson <jrj@purdue.edu>
and Ray Phillips <r.phillips@jkmrc.uq.edu.au>
spotted and reported the errors.
Corrected a spelling error in a comment and incorrect
use of an alarm function in the LTsock test program.
At the suggestion of Stuart Anderson <sba@srl.caltech.edu>
added preliminary (and incomplete) SAM-FS file system
support to Solaris lsof. Completion awaits availability
of SAM-FS internals.
Fixed a Solaris device name printing bug, reported by
Ric Anderson <ric@tick.Telcom.Arizona.EDU>, only
visible when HASDCACHE is not defined. Ric helped
test the fix.
Fixed an AIX kernel bit size handling bug related
to the NFS node (rnode) structure.
Corrected a print_kptr() function call error in the AIX
AFS code, reported by David Steiner
<david.r.steiner@Dartmouth.EDU>. Upon further reflection
and because I no longer have appropriate AIX AFS test
systems, disabled AIX AFS support in the Configure script
for AIX versions above 4.3.3.0 or AIX AFS versions above 3.5.
Added support for FreeBSD 5.1.
With advice from Allan Nathanson <ajn@apple.com> adjusted
the Darwin get-xnu-headers.sh script to access the kernel
header files needed by lsof from a new form of the Apple
open source repository.
Installed Linux and lsof library bug fixes and
improvements, supplied by Marian Jancar <mjancar@suse.cz>.
One Linux improvement handles mount strings that
have octal escapes in them, eg., \040 for embedded
blanks. Marian tested the changes.
4.69 October 16, 2003
Received and applied an OpenBSD patch from Peter Valchev
<pvalchev@sightly.net> that replaces a ctob() call with
a sysconf() call. Peter claims sysconf() is needed for
OpenBSD on SPARC. (It is not needed for NetBSD on SPARC.)
With the upgrade of my only Solaris 7 test system
to, Solaris 8, dropped the *claim* that lsof works
on Solaris 7. That doesn't mean it won't work
there, so those who want lsof for Solaris 7 probably
should be able to build it there and it probably
will work there.
Revised lsof's DNLC handling for BSD derivatives,
including: BSDI; Darwin, DEC OSF/1, Digital UNIX
and Tru64 UNIX; FreeBSD; NetBSD; and OpenBSD. The
latest NetBSD distribution's dropping of the vnode
capability ID (v_id) required the revision.
Adjusted to the latest FreeBSD 5.1-CURRENT.
Added NetBSD support for using kvm_getproc2().
Added a patch from Andrew Brown <atatat@atatdot.net>
to handle NetBSD enum conflicts and changes in the
<miscfs/kernfs/kernfs.h> and <miscfs/procfs/procfs.h>
header files.
Added a "#define _KERNEL" to the AIX dnode2.c source
file for compatibility with a new <j2/j2_inode.h>
AIX 5.2 header file version. The addition was
supplied by Dick Dunbar <Dick.Dunbar@Siebel.com>
and was offered as a patch to lsof 4.68/
Added support for a second type of Solaris SAMFS.
Stuart Anderson <sba@srl.caltech.edu> provided the
support. SAMFS support in lsof SOLARIS remains
scanty, because Sun won't release any details on
its kernel structures.
Dropped the *claim* that lsof works on AIX 4.3.3,
because I was unable to test it there. That doesn't
mean it won't work there, so those who want lsof
for AIX 4.3.3 probably should be able to build it
there and it probably will work there.
Updated for Solaris 10 on test systems provided by
Mike Miscevic <miscevic@hotpop.com>. Casper Dik
<casper@holland.sun.com> provided significant help.
During the Solaris 10 port found and fixed an lofs
handling bug that prevented reporting of open lofs
file lock status.
Updated the DNLC test, LTdnlc, to provide a possible
explanation about file systems on which the test
might fail.
Modified the procedure for obtaining missing Darwin
XNU kernel header files. The new one requires more
manual intervention, but is the best that can be
done with the way Apple open sources are now
organized. 00FAQ explains the new procedures for
those not used to downloading Apple open source
files.
Added support for Apple Darwin 7.0 (Mac OS X 10.3)
with patches supplied by Allan Nathanson <ajn@apple.com>.
Dropped the *claim* that lsof builds and works on
Apple Darwin below 6.0.
Validated lsof on FreeBSD 4.9, using a test system
provided by Ben Lewis <bl@purdue.edu>.
Validated lsof on FreeBSD 5.1-CURRENT for Amd64.
David O'Brien <obrien@FreeBSD.org> provided a test
system.
Changed the NetBSD Configure stanza to do header
file searches in /usr/include by default. The
LSOF_INCLUDE and NETBSD_SYS environment variables
may still be used to specify other search paths.
Discussions with Andrew Brown and Wolfgang S.
Rupprecht <wolfgang@wsrcc.com> led to the change.
4.70 January 16, 2004
Improved shell-portability of the linux stanza of
the Configure script with a patch from Paul Jarc
<prj@po.cwru.edu>.
Added a "silent" rule to tests/Makefile for Paul.
Updated, extended and clarified the test suite
documentation in 00FAQ and 00TEST.
Fixed Solaris 10 dlsof.h typo, reported by Mike
Miscevic <miscevic@hotpop.com>. The typo prevents lsof
from loading cleanly in Solaris 10 builds past 40.
Fixed a Solaris HSFS node number reporting bug and
added a structure definition work-around for Solaris
10.
Converted PGP signing to GPG. My previous PGP key can
be used, but the gpg "--allow-non-selfsigned-uid"
option may have to be used when it is imported into a
GPG key ring.
Added bz2 compression.
Updated for OpenBSD 3.4.
Added a work-around for a missing header file in the
s10_44 Solaris 10 build.
Added support for FreeBSD 5.2-BETA and 5.2-CURRENT.
Updated Linux AX25 support with modifications supplied
by Lutz Poetschulat <dl9cu@db0zwi.de>.
Added raw IPv6 support to Linux lsof.
Improved handling of parameters after "-i@".
Improved file name test in LTdnlc.c.
Added loop count controls to the reading of Solaris
lock chains. The change was implemented as a result of
a report from Steve Gonczi <steve@relicore.com>.
Based on a report from John Jackson <jrj@purdue.edu>,
enabled a Solaris 10 <sys/lgrp.h> work-around for
Solaris 9, too. (Patch 112233 installs an lgrp.h on
Solaris 9 that needs the work-around.)
With help from Andrew Brown <atatat@atatdot.net> and
John Heasley <heas@netbsd.org> added log-structured
file system (LFS) support for NetBSD and OpenBSD.
Added AMD64 to the list of FreeBSD 5.x-CURRENT
supported architectures. FreeBSD.org provides a test
system, courtesy of (I believe) David O'Brien
<obrien@FreeBSD.org>.
Added a cast to lseek() in the HP-UX /dev/kmem-based
kread() function to make it work properly with the
bundled HP C compiler.
4.71 March 11, 2004
Added text file support to Apple Darwin lsof and
enabled the lsof executable portion of the LTbasic
test. Added support for Darwin kernel queue, POSIX
semaphore and POSIX shared memory files. Tested on
Darwin 7.2 (aka Mac OS 10.3.2).
Added process_kqueue() function prototypes for FreeBSD,
NetBSD and OpenBSD.
Picked some lint in AIX sources, lib/rnmh.c and
tests/LTsock.c.
Added "-x [fl]" cross-over option, which enables +d and
+D processing to cross over symbolic links and|or file
system mount points. Discussion with Johan Lindquist
<johan@smilfinken.net> and Eric Williams (aka The Ghost
In The Machine) <ewill3@earthlink.net> on Linux news
groups revealed the need for the option.
Updated support for UnixWare 7.1.4.
Added support for the optional reporting of socket
options, socket states and TCP flags for most currently
supported dialects. John Smith <lbalbalba@hotmail.com>
and Tristan Nefzger <tn@bhtrader.com> requested the
information. The dialects and their versions for which
this feature has become available include:
AIX 4.3.2 and 5.[12]
Apple Darwin 7.2
BSDI BSD/OS 4.3.1
Digital UNIX and Tru64 UNIX 4.0
FreeBSD 4.9 and 5.2
HP-UX 11 and 11.11 (aka 11i)
NetBSD 1.6ZH
OpenBSD 3.4
OPENSTEP 4.2
OpenUNIX 8
SCO OpenServer Release 5.0.6
Solaris 2.6, 8, 9 and 10
UnixWare 7.1.[134]
Modified the Configure stanza for HP-UX 11 with better
q4 detection. Steve Bonds <3vhmxxm02@sneakemail.com>
supplied the modification.
Applied a patch from Mike Miscevic <miscevic@hotpop.com>
to enable lsof to compile with the zone support in the
Solaris 10 s10_b51 release. Added information on lsof
zone behavior to 00FAQ.
Added a "-z [z]" option to Solaris 10 lsof. It enables
the listing of zone name and can also be used to select
the listing of processes and their files from specified
zones.
4.72 July 13, 2004
Corrected Solaris 10 ZONE column title display bug with
a patch from Joep Vesseur <Joep.Vesseur@Sun.COM>. Joep's
fix was offered as a patch to 4.71.
Based on a report from Jean-Pierre Radley <jpr@jpr.com>
about an unexpected GNU uname Configure interaction on
OSR, and working from information received from Bela
Lubkin, changed the OSR Configure stanza to use
/bin/uname instead of uname. Added an FAQ entry about
Configure version detection problems.
Added the +m and "+m m" options in response to a dialog
with Robert T. Brown <rbrown@netmentor.com>. The
options allow the creation of a mount table supplement
file which can be used on selected dialects to get
device numbers when stat(2) and lstat(2) can't deliver
them. (That's generally the result of an inaccessible
NFS server.) Currently the new options are supported
only on Linux.
Made cpumask_t typedef _KERNEL compensation for FreeBSD
5.2-CURRENT. Refined it for 5.2.1-RELEASE with testing
help from Scott Ellentuch <tuc@ttsg.com>.
Added support for FreeBSD 4.10. Larry Rosenmann
<ler@lerctr.org> kindly provided a test system.
Added support for NetBSD 2.0 with patches supplied by
Andrew Brown <atatat@atatdot.net>. Andrew also
provided two test systems.
Made handling of Linux maps file more robust, based on
a report from Jan Blunck <J.Blunck@tu-harburg.de>. As
a side benefit, made handling of generated stat(2)
information more flexible.
As a result of a discussion with Jason Fortezzo
<fortezza@mechanicalism.net>, adjusted lsof for Solaris
to obtain the maximum user name length from ut_name of
the utmpx structure, if <utmpx.h> exists.
Tested under OpenBSD 3.5.
Updated 00README information about using gcc (via the
Configure aixgcc abbrevisiation) to compile lsof on
AIX. Ann Janssen <ajanssen@nebook.com> made me aware
the information was out of date.
Added an AIX SIGDANGER handler and some 00FAQ sections
on lsof memory usage after a discussion with Tom Qin
<tom.qin@citigroup.com> about lsof memory usage.
Added scripts/sort_res.perl5, contributed by Fabian
Frederick <fabian.frederick@gmx.fr>. The script
displays lsof output sorted by size and path name.
Improved handling of files on Linux NFS mount points
that use the root_squash option, based on discussions
with Paul Szabo <psz@maths.usyd.edu.au>.
Updated FreeBSD 5.2-CURRENT support, based on a problem
report from Filippo Natali <filippo@widestore.net>.
Corrected improper FreeeBSD 5.x-CURRENT #if condition,
reported by Kim Culhan <kimc@kim.net>.
Added a Configure script work-around for AIX 5.2 lsof
with JFS2, compiled by gcc >= 3.3. The work-around
was supplied by Florian M. Weps <fmw@hactrn.ch>.
4.73 October 21, 2004
Added an __XPG4_CHAR_CLASS__ #define before
#include'ing <ctype.h> on Solaris to restore lsof's
ability to display special characters such as acute-e.
Added wide-character (e.g., UTF-8) support where
possible, prompted by a request from Kyungjoon Lee
<kjoonlee@gmail.com>. Some older dialects -- e.g.,
NetBSD 1.4.1 -- don't support wide characters, so the
wide character support is enabled by definitions in
each dialect's machine.h. Dialects with wide-
character support are listed in 00FAQ.
Make a FreeBSD 5.2-CURRENT adjustment for <sys/pipe.h>,
supplied by Sergey A. Osokin <osa@FreeBSD.ORG>.
Implemented a Linux feature request made by Jakub
Jelinek <jakub@redhat.com> that enhances lsof's ability
to locate UNIX domain sockets whose paths are named as
arguments. Jakub supplied suggested code.
Dropped *claims* that lsof works on AIX below 5.1, SCO
Dropped *claims* that lsof works on AIX below 5.1, SCO
Openserver 5.0.4, Tru64 UNIX 5.0, and UnixWare below
7.1.4. Lsof will probably build and work on those UNIX
dialect versions, but I no longer have any way to test
lsof on them.
Added support for FreeBSD 5.3 and 6.0. The FreeBSD
5.3 support hasn't been tested.
Added FD test code that will allow dialect versions to
test FD option selections. Used the new code in the
PSTAT-based HP-UX lsof to enable it to avoid scanning
the mount table when its information is not needed.
The addition was made in response to a query from
Harvey Garner <Harvey.Garner@championusa.com> about
lsof performance in a busy NFS environment.
Upgraded lsof's AIX support level to AIX 5.3, based on
a report from Dick Dunbar <Dick.Dunbar@Siebel.com>. (I
have not tested lsof under AIX 5.3.) Based on Dick's
recommendation and local testing changed the C for AIX
version 6 and higher -qmaxmem option value to -1.
Made LSOF_AR environment variable more useful and
documented it in 00XCONFIG.
Corrected the use of sum(1) to generate signatures for
the lsof distribution and binaries to match the
documentation that claims it is sum -r output. Jin
Guojun <jin@george.lbl.gov> noticed and reported the
problem.
Tested under OpenBSD 3.6.
Added checksum and GPG certificate files for the bz2,
gz and Z lsof distribution archives. The new files
reside with the distribution archives and supplement
the signature information already inside the archives.
Validated on Solaris 10, i8xpc, build s10_63.
4.74 January 17, 2005
Fixed a Solaris segment fault bug on systems that lack
a /dev/allkmem device. Offered the fix as a patch to
lsof 4.73. The bug was reported by Donald Zoch
<donald.zoch@amd.com>.
Updated lsof for FreeBSD 6.0 and higher for a change in
<sys/vnode.h>, based on a report from Sergey A. Osokin
<osa@FreeBSD.ORG>. Made the update available in a 4.74
'A' edition pre-release.
Filed an HP bug report about missing pstat(2) CWD info
for LOFS on HP-UX 11.11 and higher. The missing CWD
info was noticed by Ermin Borovac <e.borovac@bom.gov.au>.
Added info to 00FAQ about the problem, which can cause
the lsof test suite's LTbasic test to fail.
Updated the q4-generated tcp_s.h in the lsof
distribution and added socket option support for HP-UX
11.00. Erwin Reyns <ereyns@europarl.eu.int> helped
test.
Updated for Solaris 10, build s10_69, with a patch
supplied by Mike Miscevic <miscevic@hotpop.com>.
Added v_path support to Solaris 10 lsof. That relieves
it of having to read and decode the kernel DNLC, and
delivers full paths more reliably.
Added specialized NFS4 support to Solaris 10 lsof.
Applied Solaris 10 patches to lsof supplied by Casper
Dik <casper@holland.sun.com>.
Updated lsof for NetBSD 2.99.10 and tested it on a
system provided by Andrew Brown <atatat@atatdot.net>.
Added support for the FreeBSD 6.0-CURRENT f_vnode
pointer in the file structure.
Added BSDI, FreeBSD, NetBSD and OpenBSD support for the
*effnlink member of the inode structure. This makes
the lsof LTnlink test run faster on all modified
dialects and correctly on OpenBSD.
Added ptyfs support for NetBSD, using modifications
provided by Andrew Brown.
Changed the netbsd Configure stanza to look by default
for system header files in both /usr/include and
/usr/src. (The NETBSD_SYS environment variable can
still be used to select an alternate for /usr/src.)
Corrects two FreeBSD 4.10 RPC/XDR type definitions.
Added an FAQ Q&A about setuid and setgid restrictions
in HP-UX 11.11. The information in the answer was
supplied by Frank Sanders <frank.sanders@siemens.com>.
Added abbreviations for AXI FCIO and FSNAPSHOT file
flags. Holger VanKoll <Holger.VanKoll@swisscom.com>
reported the missing FCIO.
Adjusted lsof's private AIX 64 bit rnode structure for
64 bit AIX 5.2 systems. (IBM doesn't distribute a
correct <nfs/rnode.h> for it.)
Corrected a Linux socket inode printing bug reported by
Igor Schein <igor@txc.com>.
Updated for FreeBSD 4.11. The support compiles but
hasn't been tested.
Back-ported a FreeBSD 6.0-CURRENT fix to FreeBSD
5.3-RELEASE-p1. That was done to solve a compilation
problem reported by Radko Keves <rado@daemon.sk>.
4.75 May 16, 2005
Dropped the *claim* that lsof works on DEC OSF/1 and
Digital UNIX, since my last 4.0 test system has been
removed. The last tested distribution of lsof on DEC OSF/1
and Digital UNIX was revision 4.74. It has been archived
on lsof.itap.purdue.edu in pub/tools/unix/lsof/OLD/src.
Added negation forms to the values in the -g (PGID) and
-p (PID) lists. Negated PGID and PID values, like
negated UID or login name values, are applied without
ORing or ANDing and take effect before any other
selection criteria are applied.
At the request of Marcin Gozdalik <gozdal@gmail.com>
added a -X option for Linux. The option inhibits the
reading of the /proc/net/tcp* and /proc/net/udp*
files.
Based on a report from David Gutierrez
<davegu1@hotmail.com> changed DEC OSF/1 process table
allocation to request memory in smaller increments.
Based on a report from jayjwa <jayjwa@atr2.ath.cx>
updated the Customize script to use "tail -n 1" where
possible.
Enabled support for FreeBSD 5.4.
Improved the BSDI, FreeBSD, NetBSD, OpenBSD and Solaris
kvm_open() and kvm_openfiles() error messages.
Enabled support for NetBSD 2.99.12.
Improved HP-UX Configure stanza with help from Piet
Starreveld <pstarrev@csc.com>. Picked some lint Piet
found.
Enabled IPv6 support for HP-UX > 11. Piet Starreveld
helped test it on 11.23, among others.
Updated for HP-UX 11.23 on the ia64 architecture.
Updated to latest FreeBSD 6.0-CURRENT, using a test
system provided by Andrzej Tobola <ato@iem.pw.edu.pl>.
Added support for SCO OSR 6.0.0 and UnixWare 7.1.4 with
help from Richard at SCO.
Corrected a Linux bug in NFS handling, reported by Karel Zak
<kzak@redhat.com>. Karel supplied a patch.
Improved the code for accessing an AIX 3.2 and higher
sockaddr_un structure, thus eliminating a segmentation
fault possibility.
Updated for AIX 5.3.
Added preliminary (DEBUG) support for the AIX SANFS
file system.
Fixed a bug in the Solaris 10 processing of the vnode's
v_path pointer with code supplied by Edward Jajko
<ejajko@portal.com>. The fix was offered as a patch to
4.74.
Dropped support for OpenUNIX 8, since a test system is
no longer available. Archived an OpenUNIX-only
distribution of the last revision (4.74) tested on
OpenUNIX in pub/tools/unix/lsof/OLD/src.
Tested under Openbsd 3.7.
Tested under Darwin 7.7.0.
Enabled building on amd64 Solaris 10 with hints from
Marc Aurele La France <tsi@ualberta.ca>. Marc provided
a test system.
Supplied a missing quote in the FreeBSD Configure
stanza. Carl Cook <Info@quantum-sci.com> reported the
problem.
Removed "-O" option from tests/Makefile so that the
HP-UX bundled compiler won't complain.
4.76 August 30, 2005
Corrected an example and spelling errors in man page.
Updated for Apple Darwin 8.x with changes supplied by
Allan Nathanson <ajn@apple.com>. Allan also provided a
test system.
Completed documentation of CLRLFILEADD in all machine.h
files.
At the request of Chris Markle <cmarkle@sendmail.com>
added partial listen queue length to socket options
displayed when -Tf is specified. Partial queue length
is not reported for all dialects. (00FAQ lists the
ones where it is reported.)
Updated for FreeBSD 7.0 with information supplied by
Andrzej Tobola <ato@iem.pw.edu.pl>.
Updated Solaris VxFS support for VxFS versions 4 and
above with technical advice from Craig Harmer
<craig_harmer@symantec.com>, Gary Millen
<gary_millen@symantec.com> and Chuck Silvers
<charles_silvers@symantec.com>. Testing help was
provided by Michael Antlitz <mantlitz@prophasys.com>,
Steve Ginsberg <steve@dhapdigital.com> and Kenneth
Stailey <kstailey@yahoo.com>.
Fixed a Solaris address space map processing bug.
Janardhan Molumuri <mjanardhan@gmail.com> reported the
bug and help me identify it. Made the fix available as
a patch to 4.75.
Added support for Solaris 10 port and CTFS files. The
CTFS support is imcomplete, because I don't know how
to get inode number, size and link count. (There's
a new 00FAQ entry about that.)
Investigated a report from Christopher J Warweg
<warwegc@GAO.GOV> that the CHECKSUMS for the lsof 4.75
binary for 64 bit Solaris 8 was incorrect. It was my
packaging error. I rebuilt and repackaged the binary.
Enabled support for Linux map file names with embedded
spaces.
4.77 April 10, 2006
Added -X option support for Solaris 10 and above. When
-X is specified lsof will report cached v_node path
names for unlinked files, followed by "(deleted)".
Improved cached vnode path name handling by adding
"(?)" to the end of path names of questionable accuracy.
Updated 00FAQ to reflect these changes.
Updated for FreeBSD 7.0-CURRENT.
Fixed name addition spacing bug, reported by Stuart
Anderson <anderson@ligo.caltech.edu>. Also updated
Solaris 10 SAMFS support at Stuart's request.
Added missing "break;" and another HASSTATVFS test to
the NetBSD and OpenBSD dnode.c. Bill Behr
<bbehr@networkstoragecorp.com> reported those needs.
Fixed an HP-UX 11 file descriptor "chunk" size problem,
reported by Per Allansson <per@appgate.com>. Per helped
devise the fix and tested it. This fix was offered as
a patch to lsof 4.76.
Updated for FreeBSD 6.0-STABLE and FreeBSD
6.1-PRERELEASE.
Updated scripts/sort_res.perl5 with changes supplied by
Frederick Fabian <fabian.frederick@skynet.be>, the
author of the script.
Corrected +|-M man page documentation error, reported
by Roger Cornelius <rac@tenzing.org>.
Improved FreeBSD user device random seed generation in
response to a problem report from Danny Braniss
<danny@cs.huji.ac.il>.
Eliminated three syntax error bugs and other compiler
complaints from the PSTAT-based lsof. H. Merijn Brand
<h.m.brand@xs4all.nl> reported the problems and tested
the fixes.
Eliminated compiler complaints in the test suite.
Investigated problems with the building of lsof on
PA-RISC HP-UX 11.23, based on a report from John
Orndorff <John.Orndorff@sungard.com>. Found that
neither the HP bundled C compiler nor gcc would build
lsof, but the the HP unbundled ANSI C compiler would.
Concluded that HP bundled C compiler can't handle
<gssapi/gssapi.h>. Devised a work-around to gcc's
omission of the rpcent structure definition of
<netdb.h> that allows it to compile lsof's print.c, but
the resulting binary doesn't run reliably. Documented
the situation in 00FAQ.
Changed reporting of unknown file types. The number of
an unknown type is now reported as four octets. The
change was made in response to a Linux lsof bug report
from Karel Zak <kzak@redhat.com>.
Dropped the *claim* that lsof works on BSDI BSD/OS
since my last test system has been removed. The last
tested distribution of lsof for BSDI BSD/OS was
revision 4.76. It has been archived on
lsof.itap.purdue.edu in pub/tools/unix/lsof/OLD/src.
As a result of discussing the lsof source tar's MD5
checksum with Andrew Bell <andrew.bell.ia@gmail.com>,
changed the description of a suitable MD5 tool in the
lsof distribution's documentation to name the openssl
"dgst" command.
Enabled compilation on Solaris 10 1/06 with a fix sent
by Jason Fortezzo <fortezza@mechanicalism.net>. Made
the fix available as a patch to 4.76.
Adjusted to FreeBSD 5.5-PRERELEASE.
Corrected a bug in the lsof library's process_file()
function to enable the locating of AIX XTI sockets by
their TCP/IP address values. The bug was reported by
Michel Dubois <Dubois@sears.ca>.
Based on a bug report from Karel Zak <kzak@redhat.com>
added command name length checking to as many dialects
as possible (Linux for Karel) for the "-c c" option.
Updated for OpenBSD 3.[89]. Tested the 3.9 update on a
system provided by David Mazieres. I have not tested
on OpenBSD 3.8, but David reports lsof 4.76 worked
there.
Ended regression testing of lsof on 32 bit Solaris 8
with the ending of access to a test system. Lsof
continues to be tested on 64 bit Solaris 8.
4.78 April 24, 2007
Added more information to the lsof FAQ about missing
link counts and sizes on Linux files.
Simplified Linux stat() and lstat() usage.
Relocated #define's that prevent OpenBSD compilation on
systems without a /proc file system. Pieter Bowman
<bowman@math.utah.edu> reported the problem.
Added code to avoid processing Linux /proc/<PID>/maps
file entries with zero device and node numbers. Some
such entries now have names associated with them that
are not path names -- e.g., "[heap]", "[stack]" or
"[vdso]". Scott Worley <sworley@chkno.net> reported
lsof's mishandling of such entries.
Added SELinux security context support, provided by
James Antill <james.antill@redhat.com>. I have not
tested this, but James and Karel Zak <kzak@redhat.com>
have.
Added the #include of <sys/types.h> to Solaris lsof to
enabled compilation on Solaris 10 6/06. Peter Harvey
Peter.Harvey@Sun.COM diagnosed the problem and supplied
a patch.
Added better support for JFS2 on AIX 5.2 and 5.3, based
on bug reports and help from Thomas Braunbeck
<BRAUNBEC@de.ibm.com> and Tom Whitty <TWHITTY@cerner.com>.
Documented that lsof supports AIX 5.3 only up through
maintenance level 1 (ML1).
Enabled Solaris lsof to locate the AFS vnode operation
address for OpenAFS 1.4.1. The fix was supplied by
Robert Jelinek <Robert.Jelinek@MorganStanley.com>.
Enabled support for Solaris 10 ZFS. If the necessary
ZFS header files aren't found, lsof offers the option
to drop ZFS support, to use internal, possibly
inaccurate structure definitions, or to supply a path
to the missing header files. Horst Scheuermann
<Horst.Scheuermann@uni-trier.de> provided a development
system and helped test the support.
Corrected a typo in the man page, reported by Eric S.
Raymond <esr@thyrsus.com>.
Changed the spelling of macroes to macros in lsof
source and documentations files, based on a suggestion
from Josh Soref <timeless@gmail.com> and verification
with the OED.
The following dialects are no longer supported: 32 bit
AIX 5.2, HP-UX 11, OpenStep 4.2, Solaris 2.6, Solaris
8, True Unix 64 and UnixWare 7.1.4. Lsof may work on
them, but I no longer have test systems for them.
Support for OpenBSD ends at its version 3.9 for lack of
interest in the port.
4.79 April 15, 2008
**************** IMPORTANT NOTE ******************
* *
* Lsof support has been reduced to the following *
* dialects: AIX, FreeBSD, Linux and Solaris, and *
* only in selected versions of those dialects. *
* The selected versions are listed in this file *
* and in other lsof documentation. *
* *
* I have made this move because of retirement *
* and because I no longer have many test systems *
* available to me. *
* *
* Vic Abell *
* *
**************************************************
Fixed a Solaris VXFS permission problem when accessing
the VXFS inode offsets. The bug was reported by
Gregory A. Ivanov <ivga@mts.ru>. Gregory tested the
fix.
Moved an #include <string.h> later in FreeBSD dlsof.h
to enable compilation on recent FreeBSD releases. The
change was supplied by Roy Marples <uberlord@gentoo.org>.
Improved Linux /proc file stream reading speed by applying
an expanded version of a patch from Eric Dumazet
<dada1@cosmosbay.com> that allocates a page size buffer
to each stream. Improved TCP, TCP6, UDP and UDP6 hashing
by determining the hash bucket count from the /proc/net
sockstat and sockstat6 files. The improvement was
suggested by Eric and he provided sample code. Eric also
tested both improvements.
Modified Configure script to build lsof on FreeBSD
6.2. Tested it on a system provided by Larry Rosenman
<ler@lerctr.org>.
Fixed a Linux maps file processing bug that prevented path
names from having an embedded colon. James Lingard
<jchl@arastra.com> reported the bug and helped with its
fix.
Based on reports from Eric Dumazet and Samuel Thibault
<samuel.thibault@ens-lyon.org> added support for the
Linux 2.6.22 kernel's /proc/<PID>/fdinfo files -- i.e.,
file offset and flags. Samuel Thibault provided a test
system.
Fixed a Linux UNIX socket memory leak, reported by
Philip Shin <pshin@xceedium.com>. Phillip supplied the
fix.
With generous assistance from HP added support for an HP-UX
11.23 patch that makes TLI/XTI socket address information
available.
Fixed a header file problem for FreeBSD 6.2 on the Alpha
architecture. The problem was reported by Pekka Honkanen
<phonkane@cc.hut.fi>. Pekka tested the fix.
Based on a report and using suggested fixes from Karel Zak
<kzak@redhat.com>, made these changes to Linux lsof: corrected
a getpidcon() error message; insured that inode numbers are
handled correctly for their unsigned long long type; and
improved SELinux handling. At the request of Alon Bar-Lev
<alonbl@gentoo.org> added the LINUX_HASSELINUX environment
variable to enable or inhibit SElinux support unconditionally.
Updated Configure for FreeBSD 8.0-CURRENT and tested lsof on
AMD64 there.
Added a patch provided by Oles Hnatkevych
<don_oles@able.com.ua> for FreeBSD systems where the root
file system is on a CD9660 device.
Added compensation for the disappearance of FMARK and FDEFER
from the FreeBSD 8.0-CURRENT <sys/file.h>.
Updated FreeBSD lsof with ZFS support. Larry Rosenman
<ler@lerctr.org>, Erwin Lansing <erwin@FreeBSD.org>, Wesley
Shields <wxs@atarininja.org> and Dmitry Morozovsky
<marck@rinet.ru> provided test systems.
Fixed a socket file identification problem reported by
Pavol Rusnak <stick@gk2.sk>. Pavol also reported the
cause of the problem.
Added the ability to format the repeat mode marker line
with strftime(3), where the dialect supports the
localtime(3) and strftime(3) C library functions. The
addition was suggested by Mike Depot <mdepot@comcast.net>,
who also tested it. The addition required creating a new
main lsof source module, util.c, that contains functions
whose compilation conflicts with the general header file
tree defined by lsof.h and dlsof.h.
Based on reports from Andrei V. Lavreniyuk
<andy.lavr@reactor-xg.kiev.ua> and Pav Lucistnik
<pav@FreeBSD.org> updated the FreeBSD 7.0 and above
file lock handling to use new locking structures. The
update requires a terrible hack to get a definition for
the lock owner structure from a kernel source module
into a local lsof header file.
4.80 May 12, 2008
Updated for a FreeBSD 7.0 and above byte level locking
change. The problem was reported by Conrad J. Sabatier
<conrads@cox.net>, who helped test the update. Wesley
Shields <wxs@FreeBSD.org> provided an 8.0-CURRENT test
system.
Propagated the FreeBSD 7.0 and above locking changes to
FreeBSD 6.x, based on a report from Edwin Groothuis
<edwin@FreeBSD.org>.
Added warnings for unsupported dialects or versions.
Added Linux support for the UDPLITE protocol. Eric
Dumazet <dada1@cosmosbay.com> supplied a patch.
Added a missing quote to the Configure script's
FreeBSD stanza.
Added a usage.o rule to the HP-UX PSTAT-based
Makefile. I mistakenly deleted the rule at revision
4.79. The missing rule was reported by Kawaljeet Kaur
<kawaljeet.malviya@gmail.com> who tested the corrected
Makefile.
4.81 October 21, 2008
Updated the Darwin libproc sources with changes from
Allan Nathanson <ajn@apple.com>. Tested them on a iMac
mini, provided by Apple Inc.
Changed dummy declarations in library source files to
eliminate complaints about unused variables and empty
object files. This change may not work on dialects I
can no longer test; it has been tested on some versions
of AIX, Darwin, FreeBSD, Linux and Solaris.
At the request of Hal Brooks <hal@uga.edu> added support
for Linux /proc/net/packet files. Hal tested it.
Added socket file only performance enhancements to Linux
and PSTAT-based HPUX lsof.
Added htonl call around improper usage of INADDR_LOOPBACK;
report from an Apple engineer forwarded by Allan Nathanson
<ajn@apple.com>.
Adjusted for FreeBSD-8.0 change in device number handling.
The adjustment should work for FreeBSD 5 and above, should
the 8.0 change be propagated downward. The problem was
reported by Pav Lucistnik <pav@FreeBSD.org>. An updated
test system was provided by Erwin Lansing <erwin@FreeBSD.org>.
Reduced AIX support to version 5.3, since test systems with
older versions are no longer available to me.
At the request of Marjo F. Mercado <mmercado@xceedium.com>
and Phil Shin <pshin@xceedium.com> applied some speed
improvements to lsof, particularly when the files of
interest are /Internet files -- i.e., selected with lsof's
-i" option. Added a two new options to assist the
improvements: 1) "-c^<command>" to tell lsof to exclude the
named command(s); and 2) "-stcp|ud>:[^]state' to tell lsof
to include in its reporting or exclude ('^') from its
reporting Internet files in the named states (e.g., LISTEN,
^CLOSE_WAIT, IDLE, etc.) For the most part these changes
apply only to AIX, Darwin, FreeBSD, PSTAT-based HP-UX, Linux
and Solaris, since those are the only places I could test
them. They are controlled by the HASTCPUDPSTATE definition
in each dialect's machine.h header file. Marjo and Phil
provided HP-UX 11.23 and 11.31 test systems.
Fixed a stat(2) problem on HP-UX 11.31 while testing the
speed improvements.
Adjusted for kernel header file changes in FreeBSD
8.0-CURRENT. Larry Rosenman <ler@lerctr.org> provided
a test system.
Added a warning for Solaris systems where VxFS node info
can't be obtained from the VxFS utility library. The
warning was requested by Tom Matthews <Tom.MATTHEWS@rbs.com>.
Corrected mishandling of file system path name arguments
that have trailing slashes, except, of course, the root
file system, "/". Allan Nathanson <ajn@apple.com> reported
the bug.
4.82 March 25, 2009
Corrected an over-zealous exclusion test that caused
lsof to report nothing when it was given no arguments
and built with HASSECURITY and HASNOSOCKSECURITY enabled.
Joshua Kinard <kumba@gentoo.org> reported the bug and
supplied information for reproducing it.
Based on a report from Dan Trinkle <trinkle@cs.purdue.edu>
corrected use of <sys/utsname.h> for 32 bit Solaris 10
and above compilations. Simultaneously eliminated a
casting complaint in arg.c and updated Configure to use
the appropriate 64 bit compilation option (-xarch=v9 or
-m64) with the Solaris Sun C compiler.
Updated for FreeBSD 7.1-PRERELEASE with information
supplied by Larry Rosenman <ler@lerctr.org>.
Updated the Darwin libproc sources with changes from
Allan Nathanson <ajn@apple.com>. Tested them on a iMac
mini, provided by Apple Inc. Allan also provided man
page corrections.
Updated the FreeBSD Makefile to use the ${MAKE} variable
for ZFS dnode2.c module compilation, based on a suggestion
from Alexis Ballier <aballier@gentoo.org>.
Improved the Solaris VxFS library location test, based on a
suggestion from Jason Fortezzo <fortezza@mechanicalism.net>.
Jason tested the change.
Updated Solaris 10 ZFS support for ZFS version 4 and ZFS
pool version 10, using a test system kindly provided by
Vladislav Nespor <vladislav.nespor@id.ethz.ch>. Renata
Maria Dart <renata@slac.stanford.edu> tested on ZFS
version 4, verifying that the update works there, too.
(ZFS pool version 10 is apparently the ZFS version shipped
with the 10/08 update to Solaris. The original ZFS
support targeted ZFS version 3.)
I still consider ZFS support in Solaris lsof a hack,
because it depends on a znode structure definition that
I developed using dbx. Sun is remiss in not distributing
the ZFS header files used to build the distributed kernel.
Because of the znode structure definition hack, I can't
guarantee that lsof ZFS support will work for any other
versions of ZFS.
Solaris 10: adjusted to a change in the way devices are
stored in the kernel; fixed a problem in zone handling;
and added rudimentary sharedfs support. Carson Gaspar
<carson@taltos.org> reported the device number problem,
provided a test system, and tested the changes. Peter
Vines <psv2b@eservices.virginia.edu> reported the zone
handling problem and tested the fix.
Adapted to FreeBSD 8.0-CURRENT changes in device number
computation. Problem was reported by Erwin Lansing
<erwin@FreeBSD.org>. Larry Rosenman <ler@lerctr.org>
provided a test system.
Corrected Solaris Configure test for appropriate VxFS
library when using gcc to compile lsof.
Updated for loss of KAME IPv6 FreeBSD accommodations.
Adapted to FreeBSD 7.2. Made Configure script recognized
FreeBSD 6.3.
Vic Abell <abe@purdue.edu>
March 25, 2009
Copyright 2K16 - 2K18 Indonesian Hacker Rulez