/
githubmirror
/
lsof
Обзор
Документация
Войти
/
githubmirror
/
lsof
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
4.96.3
OLD/lsof3_00DIST
2 459 строк
86 KB
Masatake YAMATO
Import the final source tree published by Vic, the original lsof maintainer.
23 июл 2018, 06:45
23 июл 2018, 06:45
8662085
Код
Авторство
О чём код?
Notes for the distribution of lsof version 3 ******************************************************************** | The latest release of lsof is always available via anonymous ftp | | from vic.cc.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 What's new in Version 3 Version 3 Release Notes 3.0, May 24, 1994 3.01, May 27, 1994 3.02, June 2, 1994 3.03, July 8, 1994 3.04, July 15, 1994 3.05, July 26, 1994 3.06, September 2, 1994 3.07, September 8, 1994 3.08, September 23, 1994 3.09, October 18, 1994 3.10, October 21, 1994 3.11, October 28, 1994 3.12, October 29, 1994 3.13, November 11, 1994 3.14, November 16, 1994 3.15, November 25, 1994 3.16, December 2, 1994 3.17, January 25, 1994 3.18, January 31, 1995 3.19, February 10, 1995 3.20, February 23, 1995 3.21, March 3, 1995 3.22, March 9, 1995 3.23, March 24, 1995 3.24, March 31, 1995 3.25, April 5, 1995 3.26, April 20, 1995 3.27, May 2, 1995 3.28, May 26, 1995 3.29, June 2, 1995 3.30, June 8, 1995 3.31, June 16, 1995 3.32, June 23, 1995 3.33, June 28, 1995 3.34, June 30, 1995 3.35, July 9, 1995 3.36, July 20, 1995 3.37, July 27, 1995 3.38, August 3, 1995 3.39, August 10, 1995 3.40, August 25, 1995 3.41, September 5, 1995 3.42, September 7, 1995 3.43, September 12, 1995 3.44, September 19, 1995 3.45, September 20, 1995 3.46, October 5, 1995 3.47, October 16, 1995 3.48, October 20, 1995 3.49, October 25, 1995 3.50, October 31, 1995 3.51, November 8, 1995 3.52, November 27, 1995 3.53, December 8, 1995 3.54, December 15, 1995 3.55, December 21, 1995 3.56, January 2, 1996 3.57, January 12, 1996 3.58, February 7, 1996 3.59, February 21, 1996 3.60, February 27, 1996 3.61, March 9, 1996 3.62, March 26, 1996 3.63, April 11, 1996 3.64, April 26, 1996 3.65, May 20, 1996 3.66, June 19, 1996 3.67, July 1, 1996 3.68, July 17, 1996 3.69, July 30, 1996 3.70, August 9, 1996 3.71, August 15, 1996 3.72, August 28, 1996 3.73, September 5, 1996 3.74, September 6, 1996 3.75, September 9, 1996 3.76, September 21, 1996 3.77, October 2, 1996 3.78, October 14, 1996 3.79, October 29, 1996 3.80, November 8, 1996 3.81, November 14, 1996 3.82, December 11, 1996 3.83, December 30, 1996 3.84, January 13, 1997 3.85, January 17, 1997 3.86, January 30, 1997 3.87, February 11, 1997 3.88, February 17, 1997 Dialects Supported ================== Lsof (for LiSt Open Files) lists files opened by processes on selected Unix systems. It's a major revision of lsof version 2, and has been tested on: AIX 3.2.5, 4.1[.[1234]], the IBM RISC/System 6000 and 4.2 BSDI BSD/OS 2.0, 2.0.1, Intel-based systems and 2.1 DC/OSx 1.1 Pyramid systems EP/IX 2.1.1 the CDC 4680 FreeBSD 1.1.5.1, 2.0, Intel-based systems 2.0.5, 2.1, 2.1.5, 2.2, and 3.0 HP-UX 8.x, 9.x, 10.01, HP systems (some combinations) 10.10, and 10.20 IRIX 5.2, 5.3, 6.0, 6.0.1, SGI systems and 6.[1234] Linux through 2.0 Intel-based systems NetBSD 1.0, 1.1, and 1.2 Intel and SPARC-based systems NEXTSTEP 2.1 and 3.[0123] all NEXTSTEP architectures OpenBSD 1.2 and 2.0 Intel-based systems OSF/1 2.0, 3.0, 3.2, and the DEC Alpha 4.0-BETA Reliant UNIX 5.43 Pyramid systems RISC/os 4.52 MIPS R2000-based systems SCO OpenServer 1.1, 3.0, Intel-based systems and 5.[024] SCO UnixWare 2.1 and 2.1.1 Intel-based systems Sequent PTX 2.1.[1569], Sequent systems 4.0.[23], 4.1.[024], 4.2[.1], and 4.3 Solaris 2.[123456], 2.5.1, Sun 4 and i86pc systems and 2.6-Beta SunOS 4.1.[1234] Sun 3 and 4 Ultrix 4.2, 4.3, 4.4, DEC RISC and VAX and 4.5 (The pub/tools/unix/lsof/contrib directory on vic.cc.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@vic.cc.purdue.edu>. How Lsof Works ============== Using available kernel data access methods -- getproc(), getuser(), kvm_*(), nlist(), pstat(), read(), readx(), /proc -- lsof reads process 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 (PGRP) 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; * 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 (PGRP) -- 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. Although I have no evidence that they exist, the potential for similar restrictions exists in Solaris versions of lsof. AN LSOF BINARY, COMPILED FOR ONE SOLARIS ARCHITECTURE, ISN'T GUARANTEED TO WORK ON A DIFFERENT SOLARIS 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.) If you're worried you don't have everything, run the Inventory script. Here's aan approximate picture of what you should have: lsof_<version>: 00CREDITS 00PORTING Customize lsof_fields.h proc.c 00DCACHE 00QUICKSTART Inventory main.c proto.h 00DIST 00README arg.c misc.c scripts/ 00FAQ AFSConfig dialects/ node.c store.c 00MANIFEST Configure lsof.h print.c version lsof_<version>/dialects: aix/ epix/ linux/ osf/ riscos/ sun/ bsdi/ freebsd/ netbsd/ ptx/ sco/ ultrix/ common/ hpux/ next/ pyramid/ sgi/ unixware/ lsof_<version>/dialects/common: 00Manifest dvch.frag lkud.frag prtf.frag rnam.frag ckfa.frag fchi.frag pcdn.frag rdev.frag rnch.frag cvfs.frag isfn.frag prfp.frag rmnt.frag rvfs.frag Specific dialects sub-directories may differ slightly, depending on the needs of the dialect, but they should all contain: lsof_<version>/dialects/next: Makefile ddev.c dlsof.h dnode.c dproto.h dstore.c Mksrc* dfile.c dmnt.c dproc.c dsock.c machine.h lsof_<version>/scripts: 00MANIFEST count_pf.perl* list_fields.awk 00README count_pf.perl5* list_fields.perl* big_brother.perl5 list_NULf.perl5* watch_a_file.perl* 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>. What's new in Version 3 ======================= I had three goals in mind for version 3: 1. Make it faster. Lsof 3 defers as many lookup operations -- /dev scan, mount table scan, /etc/services scan -- until they're needed. I used prof on lsof and used its information to reduce lsof's overhead. 2. Make it easier to maintain and port to other systems, and eliminate complicated nestings of #if/#else/#endif pre-processor statements. 3. Add a few features: o ANDing of options; o Sorting of output by Process ID; o Searching for Unix domain sockets by name -- to a limited extent. o Process group ID support. (This was a late addition.) As a result of goal 2, the organization of lsof version 3 differs greatly from version 2. The main directory contains totally common functions, a dialect subdirectory contains subdirectories of code specific to each Unix dialect that is supported. There is also a dialects/common subdirectory that contains code fragments that are used by more than one, but not all dialects. A top-level Configure script constructs the complete set of sources for a given dialect and the Makefile at the top-level. Configure is self-documenting. When it is finished, Configure calls a second script, Customize, that assists with the modification of a few important compile-time options. Version 3 Release Notes ======================= 3.0 May 24, 1994 This is the first official release of lsof 3. 3.01 May 27, 1994 Corrected the #ifdef condition for HASPWSTAYOPEN under Sequent Dynix 3.0.12. Fixed bug that prevented the display of current working and root directory path names under SunOS 4.1.x, even when the user area contained pointers to them. Changed the strategy for allocating space to the local proc table in EP/IX, NEXTSTEP, Solaris, and SunOS. Closed the distance between reading the Solaris proc structure and its companion pid structure in an effort to avoid using a stale pid structure pointer. A stale pid structure pointer sometimes causes a segmentation violation in kvm_read(). Added code to the SunOS kread() function to filter out non-kernel addresses that might lead kvm_read() to a segmentation violation. The Configure script was updated to create a header file, kernelbase.h, with the necessary kernel memory boundary value; and to remove the header file when the -clean option is specified. The Configure script now passes the target name to the Mksrc shell script. It's used by sun/Mksrc to determine the source for kernelbase.h. 3.02 June 2, 1994 Added #if's to of kernelbase.h for Solaris and SunOS. This eliminates a redeclaration complaint from old versions of SunOS. Added code to process_file() in all dialects to display "no more information" when f_count in the file structure is zero. 3.03 July 8, 1994 Added support for displaying process group IDs. This includes two new options: -j to select PGRP display; and -g<list> to specify a list of PGRPs whose files are to be displayed. (-j was chosen to match a similar option in some ps(1)'s.) Philippe-Andre Prindeville <philipp@res.enst.fr> suggested this addition. 3.04 July 15, 1994 Corrected handling of port name component of -i option on systems where htons() is required. Corrected casting of UID arguments -- needed when UID is a short and the compiler wants the minimum argument size to be larger. 3.05 July 26, 1994 Added printing of DECnet socket information for the Ultrix 4.2 and 4.3 dialects. John Beacom <beacom@wisnud.physics.wisc.edu> kindly provided the test system. A new Configure abbreviation, ultrix42dn, must be used to activate the DECnet support. 3.06 September 2, 1994 The major news in this revision are the V/88 R32V3 and R40V4.2 ports for Motorola M88K systems. Chance Neale <cneale@panix.com> kindly provided test systems and Mike Feldman <feldman@charm.urbana.mcd.mot.com> provided technical assistance. Version 3.06 contains other, minor modifications: * The Configure script has been isolated from the environment, thanks to a report of a CC=xlc problem from Johnny Tolliver <jxt@ca04.cad.ornl.gov>. Johnny also suggested a better form for the install commands in the Makefile's install rule. This change affected all the dialect Mksrc scripts. A new HP-UX abbreviation (hpuxx25) was added for systems that have the /etc/conf/x25 include files. The old HP-UX abbreviation (hpux) no longer references /etc/conf or defines HPUX_CCITT. * The command "lsof `tty`" now works most places (maybe not always for SGI IRIX, but I tried) thanks to a bug report from Casper Dik <casper@fwi.uva.nl>. * A mode has been added to disable forking when debugging. The V/88 R40V4.2 debugger needed that. * Printing of stream NAMEs was standardized (IRIX was different) and an attempt was made to avoid stream NAMEs like /dev/ttyx4->/dev/ttyx4. * A new documentation file, 00FAQ, accompanies the distribution. It contains frequently asked questions about lsof, and the best answers I can manage to give. * I have a new HP-UX test system, courtesy of Dave Curry <davy@ecn.purdue.edu> and George Goble <ghg@ecn.purdue.edu> of Purdue's Engineering Computer Network. I want to thank J. Nelson Howell <nelson@zeus.mgmt.purdue.edu> of Purdue's School of Management for his prior support of lsof development under HP-UX. 3.07 September 8, 1994 This revision contains a small security enhancement. Tim Ramsey <tar@ksu.ksu.edu> pointed out that lsof's setgid or setuid power might allow it's user to read an alternate kernel name list or memory file via the -c and -k options that the real UID might not have authority to read. In revision 3.07 lsof uses access(2) to check the real UID's authority to read files named with -c and -k. 3.08 September 23, 1994 This revision contains support for Novell's UnixWare, versions 1.1, 1.1.1, and 1.1.2. Peter Lord <plord@novell.co.uk> made this possible by providing a copy of UnixWare and supplying technical advice. Binaries and sources for this version will be available from Novell sources. See the Novell UnixWare section of the distribution's 00README file for details. This version adds /proc file system support to the dialects derived from SYSV R4 (except EP/IX 2.1.1): FreeBSD, IRIX 5.2, Solaris, UnixWare, and V/88 R40V4.2. This version compiles under IRIX 4.0.5 again, correcting a problem introduced at version 3.06 in the "lsof `tty`" fix. HP-UX now skips file systems whose mount type is "ignore". The presence of the -c option is now controlled by the HASCOPT definition in machine.h. The HASSWAPPORT option is now documented and implemented correctly. Hans Petter Christiansen <hpchr@dxcern.cern.ch> suggested these changes. 3.09 October 18, 1994 This revision recognizes the DEC Alpha OSF/1 V3.0, IBM AIX 4.1, and Solaris 2.4 dialects. It has support for the SunOS 4.1.3 PC file system and two bug fixes: an IRIX, V/88, and Solaris file argument processing bug; and a V/88 include error. Alex Kreis <akreis@us.oracle.com> made the initial request for DEC OSF/1 V3.0 support and provided help with testing. Ron Young <ron@screamer.nevada.edu> graciously provided a test host. James Woodward <woodward@zk3.dec.com> provided invaluable clues to V3.0 kernel organization. Others who read the alpha-osf-managers mailing list made generous offers of test facilities, and I thank them, too. The decosf3 abbreviation was added to the Configure script, and the script was modified to request the name of the system configuration subdirectory of /sys where the configuration-specific header files reside for the decosf1, decosf2, and decosf3 configuration abbreviations. Mark Peek <mark_peek@taligent.com> provided and tested the AIX 4.1 changes. Casper Dik <casper@fwi.uva.nl> provided and tested the Solaris 2.4 changes. Friedel Loinger <friedel@wise.tau.ac.il> suggested the addition of support for the SunOS 4.1.3 PC file system ("pcfs"). Andreas Stolcke <stolcke@ICSI.Berkeley.EDU> supplied a fix to a file argument processing bug that causes lsof to crash when supplied the path of an NFS mounted file. The bug affects lsof versions for Motorola V/88 R40V4.2, SGI IRIX 5.2, and Solaris 2.[123]. Corrected an error in the path to include prdata.h in dlsof.h for Motorola V/88 R40V4.2. 3.10 October 21, 1994 This revision adds support for the cache and PC file systems to Solaris. It fixes these bugs: a problem with the display of Motorola V/88 R40V4.2 device numbers; and a failure of Readlink() to resolve symbolic links completely in all cases. Some major internal restructuring was necessary to be able to display negative inode numbers for SunOS PC file system nodes, while displaying them as unsigned numbers for Solaris, hence all dialect versions were affected. 3.11 October 28, 1994 This revision adds support for Linux version 1.0.9. Tim Korb <jtk@arthur.cs.purdue.edu> kindly provided a development system in the Computer Science Department at Purdue. It is likely that the Linux revision will have to be adjusted for each installation, and it is probable that this revision will not run under later versions of Linux. See the 00FAQ and 00REAME files for more information on Linux tuning. 3.12 October 29, 1994 This revision supports Linux version 1.1.47 -- the Yggdrasil Plug-and-Play Linux Fall '94 release. Both Linux versions now obtain kernel symbol addresses from the /zSystem.map file. November 4, 1994 Hendrik G. Seliger <hank@Blimp.automat.uni-essen.de> reports that lsof compiles and seems to work under Linux 1.1.61. He used the linux1147 Configure abbreviation. Marty Leisner <leisner@sdsp.mc.xerox.com> reports that the linux1147 Configure abbreviation produces a working lsof for Linux 1.1.64, too. 3.13 November 11, 1994 This revision contains Pyramid DC/OSx support, provided by Anthony Shortland <Anthony.Shortland@FMR.com>. Marty Leisner <leisner@sdsp.mc.xerox.com> reported a segmentation violation failure in Linux lsof. In response I changed its task structure access to use /dev/kmem instead of mmap'ing kernel memory. This avoids a possible segmentation violation when bad pointers are obtained from kernel memory. I also enabled the setting of Linux INET and Unix select flags so that the -n and -U options work -- I forgot to do that when I did the Linux port. Marty Leisner reports that the lunix1147 Configure abbreviation produces a working lsof for Linux 1.1.64, too. Francois Pindard <pinard@iro.umontreal.ca> provided a correction to the Linux install rule. 3.14 November 16, 1994 This revision adjusts the Configure script stanzas for DEC OSF/1, Motorola V/88, Pyramid DC/OSx, and Ultrix. It also contains additional support for DC/OSx and Ultrix. Bruce Beare <bjb@pyramid.com> and Robert Vernon <bob@pyramid.com.au> helped me understand Pyramid nomenclature. Robert Vernon provided DC/OSx support for the RxFS file system and added machine series auto-detection to the Configure script. Alex Podlecki <a.podlecki@att.com> helped test the updated DC/OSx distribution. Chris Timmons <skynyrd@tahoma.cwu.edu> provided information on RISC and VAX Ultrix 4.4 that led to correct prefixing of nlist() names. I updated the Configure script to detect Ultrix version, machine hardware type, and the presence of DECnet support. I also updated the OSF/1 and V/88 Configure scripts to determine configuration parameters automatically. 3.15 November 25, 1994 Corrected DEC OSF/1 V2.0 support of the ADVFS file system. Bernt Christandl <beb@mpe-garching.mpg.de> and Alex Kreis <akreis@us.oracle.com> helped test. No OSF/1 V1.x system with ADVFS was available for testing. 3.16 December 2, 1994 Fixed some device number handling bugs in DEC OSF/1 V2.0 and V3.0 support. 3.17 January 25, 1994 lsof now supports SGI IRIX 5.3, thanks to changes supplied by Dave Olson <olson@anchor.engr.sgi.com>; and SCO OpenDesktop or OpenServer releases 1.1 and 3.0, thanks to support from Dion Johnson <dionj@sco.com>, Bela Lubkin <belal@sco.com>, and Nathan Peterson <nathanp@sco.com>. Dave Olson pointed out an IRIX stream handling bug in sgi/dnode.c. When I investigated it, I found that it had implications wider than SGI IRIX. The eventual fix provided the display of inode numbers for character devices when the inode number must be obtained from /dev. IRIX, Solaris, and SunOS benefit from the fix. I added version detection to the Configure script, so there is now just one Configure abbreviation for IRIX versions 4.05, 5.2, and 5.3 -- ``irix''. (The Configure abbreviation for the SCO dialect ``sco''.) Ian Darrow <ian@sq.com> pointed out that lsof wouldn't Configure or work properly under Solaris on an i86pc. Sorting out the difficulties made clear that the HASSWAPPORT definition should be removed from every machine.h file and that ntohs() should be used in every dsock.c on every port supplied to printinaddr(). Andreas Stolcke <stolcke@ICSI.Berkeley.EDU> pointed out a method that sometimes allows lsof to report on files open to a crashed or unavailable remote NFS server. This led to the addition of code, where possible, to estimate the device number of mount points that cannot be stat()'d. The alternate device number can come from /etc/mtab or /etc/mnttab, or from the dialect's version of them. On systems that use /etc/mtab or /etc/mnttab, it is sometimes possible to add the device number manually to the mount options field in the form ``dev=xxxx''. Some internal changes in the way lsof handles device numbers were necessary to prevent ones whose dev_t typedef is a signed short from causing sign extension when promoted to integers as function arguments. David Addison <addy@meiko.co.uk> and Robert Ehrlich <Robert.Ehrlich@inria.fr> pointed out that lsof errs when reporting device numbers and other node information for some special Sun files. I rewrote most of sun/dnode.c to correct the problem; Robert rewrote it again; and I rewrote it once more. David and Robert helped me test it under Solaris 2.[34] and SunOs 4.1.[23]. While using code from the Motorola V/88 port for the SCO port, I found and fixed some NFS bugs in the V/88 port. 3.18 January 31, 1995 I added the -b and -w options. The -b option causes lsof to avoid the functions lstat(2), readlink(2), and stat(2) that might block in the kernel -- e.g., when they reference an inaccessible NFS file system. Instead it uses alternate device numbers obtained from the mount table, where possible. The -w option causes lsof to suppress warning messages -- e.g., when the -b option has been specified. The suppression of warning messages was formerly bundled into the -t option. The -t option now selects -w. I figured out how to make alternate AIX 3.2.5 device numbers from the kernel mount structure. The new -b option therefore works under AIX 3.2.5. With the help of Chance Neale <cneale@panix.com> I fixed bugs in the Motorola V/88 R32V3 NFS support. I added a solariscc Configure abbreviation for those who want to use Sun's C compiler. 3.19 February 10, 1995 Robert Ehrlich <Robert.Ehrlich@inria.fr> pointed out that lsof might be able to gather more complete path name information from the kernel's name cache. Name cache access may be inhibited with the new -C option. Revision 3.19 implements name cache access for: DEC OSF/1 [23].0 Dynix (Purdue 3.0.12) EP/IX 2.1.1 FreeBSD 1.1.5.1 HP-UX 9.01 Motorola V/88 R40V4.2 NEXTSTEP 3.1 SGI IRIX 5.3 Solaris 2.[34] SunOS 4.1.x Ultrix 2.2 and 4.2 Revision 3.19 does NOT implement name cache access for: === AIX The knlist() function won't return cache addresses -- some IBM wisdom to "protect" their customers. Linux My only access is to 1.0.9, and it doesn't seem to have a kernel name cache. Motorola V/88 It doesn't have a unified R32V3 name cache. Novell UnixWare I don't have a test system. Pyramid DC/OSx I don't have a test system. SCO OpenDesktop It doesn't have a unified OpenServer name cache. SGI IRIX 4.0.5H I saw no unified name cache in the header files before my 4.05H system was converted to 5.2. SGI IRIX 5.2 I don't have a test system. Another Robert Ehrlich suggestion led to the establishment of a device cache file feature. The new -D option gives control of it. This feature speeds lsof dramatically on some dialects after lsof has been called once and the cache has been built. (Calling stat(2) on several hundred or thousand /dev nodes can take a long time.) The feature can be disabled or modified in the machine.h header file and the dialects/*/ddev.c source file when lsof is built. 3.20 February 23, 1995 Upgraded Linux socket handling for versions 1.1.75 or greater with help from Marty Leisner <leisner@sdsp.mc.xerox.com> and Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI>. There is now a single Configure script abbreviation for linux. Updated for Motorola V/88 R40V4.3 with help from Mike Feldman feldman@charm.urbana.mcd.mot.com> and Chance Neale <cneale@panix.com>. Updated for SGI IRIX 6.0 with help from Przemek Klosowski <przemek@rrdjazz.nist.gov and Dave Olson <olson@anchor.engr.sgi.com>. Corrected access of device cache file that needs to be updated so that someone other than the file owner can rewrite it. Deleted the chmod() failure warning. Updated Configure and the Sun Makefile to specify absolute paths to the Sun install program. 3.21 March 3, 1995 Removed BSDI BSD/386 support, because I no longer have a test system, and I needed to have separate sources for two of the three dialects (FreeBSD, and NetBSD) once served by the BSDI BSD/386 sources. FreeBSD sources are now in the freebsd subdirectory; NetBSD, in netbsd. With the help of Greg Earle <earle@isolar.Tujunga.CA.US> and Paul Kranenburg <pk@cs.few.eur.nl> installed new NetBSD support for versions 1.0 and 1.0A. The NetBSD 0.9 support was removed. The 1.0A support has been tested on Intel and SPARC-based systems. 3.22 March 9, 1995 Fixed a bug in name cache handling that occasionally caused lsof to cause a segmentation violation on FreeBSD. Although the bug didn't do that anywhere else, recreated the binaries of all dialect versions that use the affected code from rnam.frag and rnch.frag. 3.23 March 24, 1995 Removed forgotten HASSWAPPORT reference from HP-UX machine.h and inserted ntohs() calls in the printinaddr() calls of dsock.c for HP-UX and NEXTSTEP. Added support for NEXTSTEP 3.3, courtesy of Allan Nathanson <ajn@NeXT.com> 3.24 March 31, 1995 Changed Configure script to handle DEC OSF/1 V3.2. Removed leading zero from DEC OSF/1 and ADVFS version values. Added dialects/osf/dec_a/3.2 header file directory, courtesy of Dave Morrison <dmorriso@us.oracle.com>, who also tested the 3.24 DEC/OSF1 V3.2 lsof. 3.25 April 5, 1995 Ported to RISC/os on a R2030 (R2000-based) system, provided by Zdenko Tomasic <zdenko@harvey.cam.rice.edu>. Tightened security on the device cache file; lsof always tries to change its ownerships to the effective IDs after creating it. This was suggested by Stefan Kelm <kelm@cert.dfn.de>. Ported to FreeBSD 2.0, starting with work done by Kurt Jaeger <pi@complx.stgt.sub.org> on lsof revision 3.16. Ade Barkah <mbarkah@hemi.com> and William McVey <wam@cs.purdue.edu> provided test systems. 3.26 April 20, 1995 Ported to SCO OpenDesktop or OpenServer 5.0 (aka Everest and 3.2v5.0.0). Hugh Dickins <hughd@sco.COM>, Bela Lubkin <belal@sco.COM>, Craig B. Olofson <craigo@sco.COM>, and Nathan Peterson <nathan@sco.com>, provided me an early-release version of 3.2v5.0.0 and gave technical advice. Added length checking of the Namech buffer to the printinaddr() function. 3.27 May 2, 1995 Corrected typo in AIX install rule, courtesy of a report from John Colgrave <colgrave@hursley.ibm.com>. At the suggestion of Greg Earle <earle@isolar.Tujunga.CA.US> added a function to print the name of the unknown protocol (the AF_* symbol), when there is no specific processing for it in dsock.c. This change affected most dialects: exceptions are DC/OSx, Linux, Motorola V/88, and UnixWare. 3.28 May 26, 1995 Added support for Sequent PTX 2 and PTX 4. The PTX 2.1.6 and PTX 4.0.2 test systems and technical advice were provided by Gerrit Huizenga <gerrit@sequent.com>, Peter Jordan <petej@sequent.com>, Kevin Smallwood <kcs@sequent.com>, and Mike Spitzer <mks@sequent.com>. (Thomas A. Endo) <tendo@netcom.com> and (David Putz). <PutzDW@PO1.LMB.unisys.com> tested under PTX 2.1.5. Bob Foertsch <foertsch@uiuc.edu> tested under PTX 4. Kevin Smallwood tested under 2.1.1. Others who helped include Shane Kenney <shane@sequent.com>, Stephan Rossi <rossi@mtu.edu>, Douglas R. Smith <drsmith@us.oracle.com>, and Joel White <jdwhite@netcom.com>. Changed the local dev structure's name to l_dev to avoid conflicts with the PTX dev structure. Added a common/rdev1.frag -- a variant of rdev.frag. It's used by EP/IX, PTX, RISC/os, and V/88. Changed printname() to check Namech first and print it if it contains something. This eliminates some hacks in the handling of names for streams, but generates some duplicate device name look-up code in the dnode.c files of some dialects. 3.29 June 2, 1995 Added clone device support to Motorola V/88 R40V4.3. Added a generic ``-X'' option for dialect-specific use. Used it in AIX to allow use of readx(). Lsof no longer uses readx() by default, because its use can cause an AIX 3.2.x and 4.1.x kernel error to appear. Kevin Ruderman <rudi@acs.bu.edu> reported this bug to me and the possibility that lsof might trigger it. The error, known as the Stale Segment ID bug, hangs the kernel in its dir_search() function, thus hanging the application process that called it so tightly that the application process can neither be killed nor stopped. The bug does not directly affect lsof, but may cause the hang when the kernel is searching directories for other processes. 00FAQ and 00README describe the Stale Segment ID bug in more detail. Consult dialects/aix/machine.h for options on enabling or disabling readx() by default, or permanently enabling or disabling it with the HASXOPT and HASXOPT_VALUE definitions. When not using readx(), AIX lsof may not report fully on all text and loader references. Changes to the kernel getuser() function in AIX 4.1.1 appear to have eliminated the text file and loader file reference information that once led lsof to use readx(); of course, without that information, lsof can no longer report on the executing text file or shared libraries in 4.1.1. Changed the Configure script to use a single abbreviation, aix, for AIX. Configure now uses /usr/bin/oslevel to determine the AIX version; in the absence of /usr/bin/oslevel, Configure issues a warning and assumes the version is 3.2.0. Source code changes were made to dialects/aix/*.[ch] to accommodate the new form of the _AIXV value. 3.30 June 8, 1995 Added -c to the installation of the man page in the Ultrix Makefile's install rule. Thanks go to Jules van Weerden <Jules.vanWeerden@let.ruu.nl> for noticing this omission. Made FreeBSD 2.0 changes: 1) added automatic sensing of the FreeBSD 2.0 boot file path, using the getbootfile(3) function (suggested by Ade Barkah); 2) changed kvm_getprocs(3) function call to use KERN_PROC_ALL symbol from <sys/sysctl.h>, thus eliminating incorrect use of the <sys/kinfo.h> and <sys/kinfo_proc.h> header files; and 3) removed <sys/kinfo.h> and <sys/kinfo_proc.h> header files from the dialects/freebsd/include/2/sys subdirectory of distribution. Tested under AIX 4.1.2. 3.31 June 16, 1995 Added the NOUSAGEONERR definition to allow lsof to be compiled with the displaying of usage information after option error messages disabled. Lsof is distributed without the NOUSAGEONERR definition -- i.e., usage output is displayed after option error messages. Worked on documentation in the 00* files and the man page, adding tables of contents, making usage more consistent, trying to insure proper dialect titles, and inserting some notes about distribution restrictions (few) and warranty (none). Fixed Motorola V88 R32V3 bug in handling Internet files. This bug was introduced some time ago, but I have only recently been able to test under R32V3 again. 3.32 June 23, 1995 Added the ability to the Linux nlist() function to automatically detect that the kernel binary is COFF or ELF form. Also corrected the UID_ARG cast from int to u_int. These changes were suggested by Michael Shields <shields@tembel.org>. Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> provided a test system. Updated lsof for HP-UX 10. Richard Allen <ra@rhi.hi.is> provided a test system. The hpux stanza in the HP-UX configure script was updated to sense the HP-UX version automatically, and to sense the availability of CCITT header files in /etc/conf/x25. 3.33 June 28, 1994 Added options to select "field" output that can be parsed by a subsequent program. (The -f, -F, and -0 options form the selection set.) Provided sample awk and Perl scripts for parsing and displaying field output. This feature was suggested by Dan Bernstein <djb@silverton.berkeley.edu>. Tested under PTX 4.0.3. 3.34 June 30, 1995 Changed display of file offset to decimal in the form "0t12345678" if it is less than 100,000,000. The offset is displayed in hexadecimal in the form "0x12abcdef" if it is larger than 99,999,999. Changed inode field output from signed to unsigned decimal. Updated the list_fields.{awk,perl} and list_NULf.perl5 scripts. Documented the truncated inode output form (leading `*' and 5 digits) for inodes that are too large for the output field; thanks go to Leonard Sitongia <sitongia@zia.hao.ucar.edu> for pointing out that this wasn't documented. 3.35 July 9, 1995 Added loopback file system support to Solaris with advice from Casper Dik <casper@Holland.Sun.COM>. Removed the NOUSAGEONERR compile option in favor of producing a shortened usage message when option errors are detected. Marty Leisner <leisner@sdsp.mc.xerox.com> provided code to validate the Linux system map file (/System.map or /zSystem.map). If lsof detects that the system map file doesn't match the booted kernel, it complains and quits. Updated host name cache to include dot forms -- e.g., when the host name can't be obtained via gethostbydddr(). This prevents subsequent lookup delays for the same address. 3.36 July 20, 1995 Updated kernel name cache handling to assume a default size for pointer-linked caches (DEC OSF/1, FreeBSD, NetBSD, and SGI IRIX 5.3) when the kernel's cache size variable has a value of zero. A warning is issued, but lsof proceeds to read and use the name cache. Folded rdev1.frag into rdev.frag by supporting a HASDNAMLEN #define for those dialects whose DIRTYPE structure has a d_namlen definition. Updated Linux distribution to avoid using d_namlen from struct dirent if the Linux version is 1.2.10 or greater. This avoidance might work on earlier version of Linux, too, but I have no way of telling. Added support for FreeBSD 2.0.5. Ade Barkah <mbarkah@hemi.com> provided a test system. Added WARNDEVACCESS definition to machine.h control the default issuance of device directory and subdirectory access errors. Changed options: -m (mount warning) option deleted -c (core file) option changed to -m -c option redesignated as command selector -d (device warning) option deleted -d option redesignated as file descriptor selector -O (order) option changed to less-overhead option -r option added to enable repeat mode Added a repeat mode in which lsof will display output, sleep for the number of seconds defined by the repeat-mode option, -r <seconds>, and then display output again, doing this repetitively until it receives an interrupt or quit signal. This option is much more efficient for monitoring a file than calling lsof repeatedly from a shell script, since it entails only one set of lsof startup operations. The CANDOCHILD compile-time option has been removed. The -O run-time option will do the same thing. 3.37 July 27, 1995 Fixed incorrect setting of low-overhead flag from -O option. Marty Leisner reports that d_namlen is not needed under Linux 1.2.8. Changed the #if test that sets HASDNAMLEN accordingly. Made more changes to option processing: combined -f, -F, and -0 into -F (-0 becomes a field identifier value for -F); now allow -F, -g, -r, and -S to have an optional value; made -F? (help) and -F0 (all fields plus NUL terminator) special forms of -F; and added support for --. These option processing changes are handled with a local getopt() function (named GetOpt() to avoid confusion). Made yet another attempt to create "standard" install and deinstall SunOS/Solaris Makefile rules. Corrected improper use of examine_lproc() when in repeat mode. 3.38 August 3, 1995 Modified Linux and PTX to show TCP's "send next" sequence number as the offset for TCP socket files. Added some version tests for Linux 1.3.0, provided by Roman Gollent <roman@portal.stwing.upenn.edu>. Added some more PTX tests around code that shouldn't be active when the NFS layered product is unavailable. Mark Vasoll <vasoll@a.cs.okstate.edu> provided them. 3.39 August 10, 1995 Added generic support for dialect-specific elements in the lfile structure. The HASLFILEADD and SETLFILEADD macroes are used in lsof.h to define the elements and in proc.c to preset them. Field identifiers `1' through `9' are allocated to dialect-specific files. The HASFIELDAP<x> strings define the -F? help text for the FieldSel[] table of store.c, and LISTLFILEAP<x> are macroes, used in the print_proc() function of proc.c, to list fields. (<x> is the field identifier.) Other private element and field processing should be done in dialect-specific modules. Used {HAS,SET}LFILEADD, HASFIELDAP[12], and LISTLFILEAP[12] to define and list link count and inode address lfile elements under PTX. Used the -X option to control when the values are displayed. 3.40 August 25, 1995 Added support for Solaris 2.5-BETA, including rudimentary support for door files and extensive support for fattach'ed files with the help of Henry Katz <hkatz@panix.com>, Joseph Kowalski <jek3@jurassic.Eng.Sun.COM>, and Mike Tracy <mtrac@jurassic-45.Eng.Sun.COM>. Changed most dialects to use slightly safer fchown() on the device cache file. Changed dvch.frag to avoid creating a device cache file that is owned by root. Cleared caches when reading of device cache file fails and removed extra NL from device cache error messages. After receiving yet another complaint about Makefile install rules, I decided to remove all install and deinstall rules from the distribution Makefiles. The Makefiles now contain a set of comments (echo commands) that describe what the install rule might be. The lsof user is now free to construct install and deinstall rules that meet local conventions and preferences. 3.41 September 5, 1995 Changed Linux kernel symbol handling to avoid the stripping of leading `_' characters that was installed in revision 3.32. (Recent Linux kernels have some symbols that are the same except for the leading `_'.) The Linux kernel loader format is now determined by testing for "_system_utsname" (COFF) and "system_utsname" (ELF) in the symbols returned by the get_kernel_syms() syscall. If neither or both symbols are present, a warning is issued and COFF format is assumed. If the loader format is COFF, then kernel symbols important to lsof are assumed to have a leading `_'. Because recent Linux releases add a parameter hashing suffix to kernel symbols, lsof removes it before comparing kernel symbol names and addresses to those in /[z]System.map. Marty Leisner, Keith Parks <emkxp01@mtcc.demon.co.uk>, and Michael Shields helped me with the Linux changes. After much discussion of the security of the device cache file on the bugtraq mailing list, I adopted a suggestion from Dave Sill <de5@sws5.CTD.ORNL.GOV>. His suggestion removes the world-writable device cache file from /tmp and creates instead a mode 0600 device cache file in the home directory of the real user ID that is executing lsof. Lsof issues a warning message when it does this. (The warning can be suppressed with -w.) The HASDCACHE definition becomes a relative path. When lsof is run from root, it will create a device cache file in root's home directory, e.g., / or /root, but the file will be readable and writable only by root. This should make the device cache file much more secure. Added support for SGI IRIX 6.1. Dave Olson provided technical support and Przemek Klosowski supplied a test system. Since Przemek's system formerly supported my testing of lsof for IRIX 6.0, its update to 6.1 means I have not tested lsof under IRIX 6.0 since revision 3.39. Changed name list structure element initialization for V/88 to make gcc happy. Albert Chin-A-Young <china@cig.mot.com> suggested this. 3.42 September 7, 1995 Changed device cache file naming process to add a suffix formed of an underscore, followed by the first component of the host name returned by gethostname(2). This allows lsof to create separate device cache files for each host from which it is run for the same UID when the UID's home directory is shared by the hosts via NFS. 3.43 September 12, 1995 Enabled SCO searching for stream files and Release 5.0 Unix domain socket files by name. Defined HASDOPTPATH for dialects that can supply a path with -Db, -Dr, and -Du. Defined it for all but DC/OSx, UnixWare, and V/88. Used it in the ctrl_dcache() function of arg.c to enable and disable -Db, -Dr, and -Du. Used is_readable() in dvch.frag when opening the device cache file for reading. 3.44 September 19, 1995 Added test for setuid-root state so that some security-sensitive code now disabled by #define's can by dynamically disabled. Enhanced, extended, improved, secured, and documented formation and use of the device cache file path. More options, more carefully controlled are now available. A separate documentation file, 00DCACHE, accompanies the distribution to explain the device cache file path handling. Where possible, lsof now drops setgid permission as soon as possible. Two exceptions are the Solaris and SunOS versions of lsof which need to close and re-open kvm access. Setuid-root lsof implementations must retain that permission to access files in /proc. Improved the README.lsof_<revision> file that appears in the lsof wrapper tar file with help from Jon A. Tankersley <tank@amoco.com>. Added Veritas file system support to the HP-UX dialect port. Albert Chin-A-Young tested lsof under Motorola V/88 R40V4.1 and provided #if/#else/#endif changes. 3.45 September 20, 1995 Enabled setgid permission surrender for Solaris and SunOS dialects. 3.46 October 5, 1995 Added more conversions to HASPERSDC, based on suggestions from John Gardiner Myers <jgm+@CMU.EDU>. They make it possible to locate the personal device cache file in /tmp, for example. A new -D function, `?', reports device cache file name formation information. Gained access to AIX 4.1.3, compiled lsof there, and found that it seems to work. Tested lsof under FreeBSD 2.1.0-950726-SNAP. John Clear <jac@dragonfly.vet.purdue.edu> kindly provided a test system. Added a Customize script that helps with the job of modifying some important (e.g., security-related) compile-time options. Configure calls Customize, but can be told not to with the -n|-nocust options. Fixed over-sensitivity to unexpected kernel file structure pointer values in HP-UX version that led to premature exit. Lionel Cons <cons@dxcern.cern.ch> pointed out the problem. With the help of Leif Hedstrom <leif@infoseek.com> identified a pair of conflicting Solaris 2.4 patches that prevent lsof from working. A work-around is described in section 00FAQ. 3.47 October 16, 1995 Enabled suppression of an HP-UX pstat() warning message. Added big_brother.perl5 to field output scripts/ subdirectory. Both changes are courtesy of Lionel Cons <Lionel.Cons@cern.ch>. Added a test for automount detritus in the SCO mount table. Added kernel name cache support to SCO dialect. Modified most name cache support to report full path names without the intervening `` -- '' when possible. Added an Inventory script to check the contents of the distribution, using a new file, 00MANIFEST. The Configure script normally calls Inventory. Changed the -n option to Configure to avoid calling the Customize and Inventory scripts and dropped the -nocust option. The presence of .neverCust suppresses the calling of Customize; .neverInv, Inventory. The Inventory script creates .ck00MAN when it completes, so that subsequent calls to Inventory won't check the inventory again -- although the caller is given the opportunity to have the inventory rechecked. Added PTX 4.1.0 support, courtesy of a test system supplied by Kevin Smallwood <kcs@sequent.com>. Picked lint for gcc in the V/88 dproc.c from hints provided by Albert Chin-A-Young <chinay@cig.mot.com>. 3.48 October 20, 1995 Improved root directory detection during name cache lookup. Remove the Novell UnixWare and Pyramid DC/OSx ports from the distribution, because I have not been able to test them for 40 or more revisions. Their pieces may now be found on vic.cc.purdue.edu in pub/tools/unix/lsof/OLD/{binaries,dialects}. Corrected an error in Customize that caused it to incorrectly redefine HASSYSDC to HASSYSDCPATH. This was reported by Michael Beirne <beirne@dcdsv0.fnal.gov>. Made sure that lsof will compile when HASDCACHE is undefined. A problem with a reference to the DChelp symbol was reported by Vasco Pedro <vp@fct.unl.pt> and resolved by always defining DChelp. Corrected handling of -c and -m options. Corrected the reading of the SCO /etc/mnttab. Bela Lubkin <belal@sco.com> helped me understand its special multi-line format. The "nothing/nowhere" lines are continuations of the file system directory and device names when either are > 31 characters. Corrected SCO version list in Configure help output. Update special SCO name cache code to make it more robust. Add support for IRIX 6.0.1 with the help of Eberhard Mater <system@grzap1.rz.go.dlr.de>. 3.49 October 25, 1995 Removed need for dialects/sgi/irix601hdr subdirectory, replacing it with one created by dialects/sgi/Mksrc and composed of symbolic links to dialects/sgi/irix6hdr. Eberhard Mater did the testing. Added file system inode number to the local file structures of the DEC OSF/1, DYNIX, EP/IX, HP-UX, NeXT, PTX, RISCos, SGI, Sun, and V/88 dialects. Added code to name cache, node, and VFS functions to set the file system inode number and use it for faster recognition of files on the file system mount point. Added kernel name cache support to Linux. This has been tested only under release 1.2.13. 3.50 October 31, 1995 Updated 00FAQ: reorganized and renumbered sections; added some DEC OSF/1 sections; section about the Solaris and SunOS Sun KERNELBASE. Added an alternative readdir() function, called ReadDir(), to dialects/osf/ddev.c This function was supplied by Duncan McEwan <duncan@comp.vuw.ac.nz>, who discovered that the getdirentries() function in DEC OSF/1 versions 3.[02] returns an incorrect length for the /dev/fd directory when it is a file system mount point. Modified the Configure script to define USELOCALREADDIR for 3.[02] to enable using this local function. Modified the Solaris/SunOS Mksrc to create a dummy (empty) kernelbase.h for Solaris 2.5 (5.5). 3.51 November 8, 1995 Modified the Configure script to declare the kernel state definitions appropriate to IRIX 6.1 on IP21 and IP26 platforms. News of the need for this came from Kate Fissell <Kate.Fissell@IUS4.IUS.CS.CMU.EDU> and Dave Olson <olson@anchor.engr.sgi.com>. Modified the SGI IRIX dproc.c to provide more information when the kernel's idea of the size of a proc structure doesn't match sizeof(struct proc). This mismatch can occur if the wrong kernel state definitions are used to condition the header files (e.g., <sys/proc.h>) included when compiling dproc.c. Made the -i option with no arguments equivalent to the -n option -- i.e., they both select the listing of all open Internet files. Supplied a missing "you" in the Customize script introduction. John Jackson <jrj@cc.purdue.edu> noticed the omission. Modified the Customize script to put long messages in here documents rather than echo statements, so that changing and reformatting them is easier. John Jackson offered this helpful suggestion. Fixed a port number cast bug in Solaris 2.[45], courtesy of information and code supplied by Allan Black <allan@scotnet.co.uk>. Automated the detection of Solaris 2.4 patches 101945-32 and 102303-02 that cause the installed kernel's user structure to differ from the one defined by <sys/user.h> because of a patch to <sys/auxv.h> that wasn't applied when the kernel was built. The Configure script invokes an alternate auxv.h file and warns that it is doing so. Fixed a problem with Inventory script that shows up on systems where echo is not an sh built-in. The bug was reported by Scott Ballew <smb@cc.purdue.edu>. 3.52 November 27, 1995 Added support for Linux versions 1.3.22 and above, courtesy of changes supplied by Keith Parks <emkxp01@mtcc.demon.co.uk>. Changed -d option processing to allow specification of a comma-separated list of file descriptors. Modified SCO support to allow NFS code to be optional at the request of Dave Gilbert <agere!dgilbert%peapod.com@zool.interaccess.com>. Enabled HP-UX 10.x version to display device and inode numbers for FIFOs. The problem was reported by Jeff Earickson <jaearick@colby.edu>. 3.53 December 8, 1995 Enhanced NeXTSTEP FIFO reporting. Fixed a formatting problem in the man page, reported by Angel Li <angel@flipper.rsmas.miami.edu>. Added support for DEC OSF/1 4.0-BETA. Angel Li provided the test system. Added a -v option to display lsof version information. Marty Leisner <leisner@sdsp.mc.xerox.com> suggested this. Replaced touch with echo in Inventory script to avoid DEC OSF/1 4.0 complaint. Tested under PTX 4.1.2. 3.54 December 15, 1995 Added support for IRIX 6.2-BETA. The support for older IRIX versions changed considerably in the process. Revision 3.54 has been tested under these older IRIX versions: 5.3 and 6.1. Angel Li <angel@flipper.rsmas.miami.edu> provided a test system and Jim Brown <jim@guanabana.rsmas.miami.edu> helped. Tested under AIX 4.1.4. Decommissioned the DYNIX port -- I no longer have access to a test system. Added the HASXOPT_ROOT define to allow the lsof builder to restrict the use of the dialect-specific X option (AIX and PTX currently) to processes whose real user ID is root. Updated the Customize script to provide an easy mechanism to change HASXOPT_ROOT. AIX uses HASXOPT_ROOT; PTX does not. This change was suggested by R. Lindsay Todd <toddr@rpi.edu>. 3.55 December 22, 1995 Eliminated need for modified DEC OSF/1 headers by using #undef and #define statements. Chip Stettler <STETTLERC@wlmpo1.wilm.ge.com> helped test. Added quick start documentation file, 00QUICKSTART, containing examples and explanations of lsof use. Verified that lsof works under the released Solaris 2.5. 3.56 January 2, 1996 Corrected lock reporting for Solaris 2.[345]. Corrected Linux malloc() kernel symbol handling bug, reported by Keith Parks <emkxp01@mtcc.demon.co.uk>. Corrected AIX loader text file selection bug; it caused all process IDs to be listed when the -t option and one file system name was specified. The bug was reported by Christopher C. Evert <cevert@waii.com>. Made sure Solaris Kb variable is zeroed before first use. 3.57 January 12, 1996 Updated SunOS port to obtain lock information from v_filocks and the lock_list struct to which it points. Changed -H to -n. The function formerly performed by -n can be done by using -i with no address. Updated Linux FIFO support so that the display for FIFOs contains device number, inode number, and NAME. Johannes Kroeger <jkroeger@squirrel.owl.de> reported the lack of these items in the Linux FIFO display. Added RCS identification to header files, Makefiles, and common fragments. Added BSDI BSD/OS support for 2.0, 2.0.1, and 2.1-BETA. Terry Kennedy <terry@spcvxa.spc.edu> kindly provided a 2.1-BETA test system and did the 2.0.1 testing. Modified the Inventory script to compensate for dialects that have an expr that doesn't set its exit code when string matches fail. Converted internal representations of file offset and size to unsigned long. Corrected bug in NetBSD lock handling. Corrected bug in FreeBSD file system type name handling. Keith Parks <emkxp01@mtcc.demon.co.uk> reports lsof 3.57 compiles and runs under Linux 1.3.56. 3.58 February 7, 1996 Changed Solaris 2.3 configuration to pass the level of patch 101318 to the source code. This allows a Solaris 2.3 lock handling difference to be accommodated. Updated 00QUICKSTART to reflect -n and -H changes made in revision 3.57. (Ooops!) Changed Configure script to compile lsof for SCO versions beyond 3.2v5.0.0 as it is compiled for 3.2v5.0.0. Bill Campbell <bill@celestial.com> reported he has done this successfully. Added information to 00FAQ about a Linux kernel symbol problem (section 3.7.6) and included a <linux/random.h> patch to work around it. The patch was supplied by Keith Parks <emkxp01@mtcc.demon.co.uk>. 3.59 February 21, 1996 In response to a query from Louis Rayman <lou@asahi.ps.quotron.com>, added special support for Solaris "sockmod" streams, used for Unix domain sockets, that allows their file system device type and inode number to be displayed. It also allows lsof to search for them by name or type (-U). Added range handling to -d argument. Added the display of CDFS file size to DEC OSF/1 output. Added an include of <rpc/xdr.h> to keep gcc on HP-UX 10 happy. Blair Zajac <blair@olympia.gps.caltech.edu> suggested it. Added Ultrix 4.5 to support list, courtesy of a notification from Gregory Neil Shapiro <gshapiro@WPI.EDU>. Added AFS support for Solaris 2.4 at the request of Michael L. Lewis <mlewis@morgan.com> and Phillip Moore <wpm@morgan.com>. Phillip helped me locate a test host, generously provided by Heidi Hornstein <heidi@cmf.nrl.navy.mil> with support from Chaskiel Moses Grundman <cg2v+@andrew.cmu.edu> and Sushila R. Subramanian <sushi@cmf.nrl.navy.mil>. Lsof is configured for AFS with a new script, AFSConfig. Used a SunOS 4.1.4 test system, provided by Chaskiel, to extend Solaris AFS support to cover SunOS. Used another test system, provided by Chaskiel, to extend AFS support to NEXTSTEP 3.2. Tested lsof under AFS on yet another Chaskiel-provided system, running Linux 1.2.13 and AFS 3.3, and found that lsof needed no changes to recognize its AFS files. Used a test system, provided by Curt Freeland <curt@grumpy.cse.nd.edu> and Terry McCoy <terry@anubis.cc.nd.edu> to extend Solaris AFS support to Solaris 2.5 with AFS 3.4-Alpha. Added the [-A A] option for specifying the name list file that contains dynamic kernel module addresses. This is defined for the NEXTSTEP, SunOS, and Solaris implementations. Added stty isig handling (where appropriate) to the Customize and Inventory scripts. Added support to Solaris for the nfs3 file system type. Its absence was reported by Patrick D. Sullivan <pds@snt.bellsouth.com>. In response to a report from Tigran Aivazian <bs_s641@ceres.king.ac.uk)> corrected bug in Linux local nlist() function and based the default kernel loader format on a Configure test for CONFIG_KERNEL_ELF in /usr/src/linux/include/linux/autoconf.h. Fixed a bug in name cache exploration for BSD-derived dialects -- e.g., FreeBSD. Updated for NetBSD 1.1. 3.60 February 27, 1996 Improved Unix domain socket reporting for Solaris. Louis Rayman <lou@asahi.ps.quotron.com> helped test. Added warning messages about absence of Linux CONFIG_MODULES definition in autoconf.h, leading to lack of get_kernel_syms() support. Tigran Aivazian <bs_s641@ceres.king.ac.uk)> supplied the information. 3.61 March 8, 1996 Added AFS support for AIX and HP-UX and verified that the lsof Ultrix version needs no additions for AFS. Chaskiel Moses Grundman <cg2v+@andrew.cmu.edu> provided the HP-UX and Ultrix test systems. Jan Tax <jan_tax@unc.edu> provided an AIX 4.1.4 test system. Bob Cook <bobcook@SLAC.Stanford.EDU> provided 3.2.5 and 4.1.4 test systems. Fixed minor problems and made improvements to NEXTSTEP, Solaris, and SunOS AFS support. Changed the AFSConfig script to ask for AFS version. During the Hp-UX AFS work, added the hpuxgcc abbreviation to the Configure script for configuring lsof to be compiled with gcc under lsof. Fixed a NetBSD mount structure array referencing bug, reported by Peter Svensson <petersv@df.lth.se>. Dropped support for Motorola V/88, because I no longer have access to test systems. Added rudimentary support for the IRIX XFS file system type, pending more information. 3.61 March 12, 1996 Corrected misuse of the LSOF_DINC shell variable in the Configure script for HP-UX and Solaris. Larry Rogers <lrr@cert.org> pointed out this problem. Also removed an obsolete irix52 abbreviation from Configure. I didn't consider this change sufficient to warrant a new version number, but just rebuilt the 3.61 distribution. 3.62 March 26, 1996 Updated AFS comments in 00README. Supplied missing break statement in a N_VXFS case clause in the HP-UX dnode.c. Added Veritas file support to PTX, courtesy of code supplied by Laurent Montaron <lpm@sequent.com> and help from Kevin Smallwood <kcs@sequent.com>. Created two new source modules (dnode[12].c) to separate PTX header file node definitions and thus eliminate symbol conflicts. Laurent did most of the testing. Added tests to BSDI, FreeBSD, HP-UX, IRIX, NetBSD, NEXTSTEP, PTX, Solaris and SunOS lsof versions that allow them to report on unknown file system types. Added IRIX 6.0.1 #if/#else/#endif support in response to a report and suggested modifications from Scott Presnell <srp@zgi.com>. With the help of Dave Olson <olson@anchor.engr.sgi.com> improved the IRIX 6.2-BETA XFS support. 3.62 March 27, 1996 Corrected SunOS incompatibility with last-minute addition of Solaris MVFS support. The problem was reported by Larry W. Virden <lvirden@cas.org>. I didn't consider this change sufficient to warrant a new version number, but just rebuilt the 3.62 distribution. 3.63 April 11, 1996 Upgraded Solaris MVFS support. In the process, enlarged Solaris and SunOS DEVICE output column. Changed SunOS 4.1.x Configure to make -DNOCONST Makefile definition dependent on SC version. At the suggestion of John DiMarco <jdd@cdf.toronto.edu> suppressed two warning messages: the device cache file creation warning when -Db has been specified; and the one issued when -D? is used with a non-writable system-wide device cache file and there is no other writable path. Also at John's suggestion redid the manner in which child processes are used to avoid kernel calls that might block; the net effect of the change is that normally one child process is required, rather than one per kernel call. Refined the NetBSD test for <nfs/nfsproto.h> with a Configure script change. Modified Configure script to compute AIX version with ``uname -rv'' when /usr/bin/oslevel can't be executed. Stephen C. Woods <scw@seas.ucla.edu> suggested this. Disabled conflicting prototype definitions in the local netdb.h used when the SCO 3.0 netdb.h is missing. Disabled #include of <strings.h> unless the SCO version is 5.0 or above. Don Kirouac <dkirouac@minicom.com> pointed out these problems. 3.63 April 15, 1996 Improved Configure's SunOS 4.1.x CC test for compiler support of the const keyword and avoided Configure's ``test -f {Customize,Inventory}'' (because the Ultrix test doesn't grok -x) in response to a report from Larry Schwimmer <rosebud@cyclone.Stanford.EDU>. I didn't consider this change sufficient to warrant a new version number, but just rebuilt the 3.63 distribution. 3.64 April 26, 1996 Added a negate option for entries of the -u list. Kurt Hillig <khillig@Chem.LSA.umich.edu> suggested it. Added a check for legal protocols in the -i option. Adjusted the Configure and SGI MkKernOpts scripts to handle more IRIX situations per instructions from Dave Olson <olson@anchor.engr.sgi.com>. Added support for HP-UX 10.10, courtesy of a test system provided by Mark Bixby <markb@cccd.edu>. 3.65 May 20, 1995 Corrected errors, reported by Arne H. Juul <arnej@pvv.unit.no>, in use of IRIX stat structure. Added support for the IRIX 6.2 cachefs, following a report from Peter Van Epp <vanepp@sfu.ca>. Added clone support for AIX 4.1.4 and above. Adjusted the IRIX configuration to work properly for 64 bit IRIX 6.2 systems. Richard Chycoski <richard@sfu.ca> and Peter Van Epp <vanepp@sfu.ca> provided a test system. 3.66 June 19, 1996 Improved the HP-UX VXFS test in the Configure script, based on a report from Robert Hall <rjh6810@misty.ca.boeing.com>. Added SCO information to 00FAQ. Added information about lsof slowness and nameserver. Added an untested Configure abbreviation for Solaris 2.5.1. Ambrose Li <ambrose@www.mingpaoxpress.com> supplied a Linux change that avoids a conflict with the d_namlen definition in versions 1.99.8 and above. Added compiler version identification to the Configure script for AIX and Solaris cc. Added support for FreeBSD 2.2-960612-SNAP. Ade Barkah <mbarkah@hemi.com> provided a test system. 3.67 Jult 1, 1996 Made miscellanous documentation corrections. Added support for gcc under AIX 4.1 and above, including an aixgcc Configure abbreviation, and a work-around for an long long alignment problem. Stuart D. Gathman <stuart@bmsi.com> and Waldemar Zurowski <bilbo@pwr.wroc.pl> helped me to understand the gcc problem and devise the work-around. 3.68 July 17, 1996 Malgorzata Roos <groos@rzusun.unizh.ch>: pointed out the AIX lsof didn't report the inode number for named pipes (FIFOs) and wouldn't locate them by name; _and_ supplied a fix. (Now _that's_ the kind of bug report I like. :-) Update Configure script to clean out aix41* subdirectories created by the AIX gcc work-around. Taught IRIX lsof how to report the correct device number, inode number, and size for named NFS pipes. Taught HP-UX 9.x lsof how to report size/offset and inode number for named NFS pipes. (HP-UX 10.x already knows.) Taught DEC OSF/1 (errr, Digital Unix) lsof to report device and inode numbers correctly for named pipes. Because stat(2) under DEC OSF/1 V3.2 doesn't report the device number correctly for named pipes, lsof can't locate them by name, but it can do that under DEC OSF/1 V2.0. Taught EP/IX 2.1.1 lsof to report device and inode numbers correctly for named pipes. Taught versions of lsof for PTX 2.1.6 and 4.1.2 to report device and inode numbers correctly for named pipes. Taught RISC/os 4.52 lsof to report device and inode numbers correctly for named pipes. Taught versions of lsof for Ultrix 4.2 and above to report inode numbers and file systems names correctly for named pipes (FIFOs). Added safety check when trying to get a sockaddr_un structure from a BSDI, FreeBSD, or NetBSD mbuf. Improved documentation on install permissions in 00README at the suggestion of Paul Wickman <Paul.Wickman@amd.com>. Installed support for the DTYPE_PIPE file structure in FreeBSD 2.2. Changed the FreeBSD version symbol from _FREEBSDV to FREEBSDV. Added support for NetBSD 1.2. 3.69 July 30, 1996 Added block device name caching and reporting for all dialects. Improved (I think) IRIX 6.2 64 bit configuration. Eliminated C name space pollution by removing the leading `_' from all dialect version symbols that had it: _AIXV, _BSDIV, _OSF1V, _ADVFSV, _EPIXV, _HPUXV, _IRIXV, _PTXV, _RISCOSV, and _SCOV. Changed decosf stanza in Configure script to automatically detect the subdirectory of /sys (or /usr/sys) that contain's the configuration header files for the machine. Added a 00FAQ entry about this. 3.70 August 9, 1996 Set the execute bits on scripts/big_brother.perl5. Changed -H in scripts/watch_a_file.perl to -n. Retained all the command name characters that are available in the proc or user struct for field output. Improved sample install rules for BSDI and HP-UX. Strengthened HP-UX CCITT test in the Configure script. Gildas Perrot <perrot@francenet.fr> suggested these changes. Improved Solaris local TCP address reporting, based on a bug report from John Caruso <jcaruso@csg.com>. Improved HP-UX VFS handling, and corrected a bug in VFS handling, based on bug reports from David Capshaw <David.Capshaw@SEMATECH.Org>. Added support to -i argument handling to allow port lists and ranges, and service name lists to be specified. John DuBois <spcecdt@armory.com> suggested this. Dropped support for IRIX 4.0.5H. Revived support for IRIX 5.2, courtesy of a test system from Dan Trinkle <trinkle@cs.purdue.edu>. 3.71 August 15, 1996 Improved handling of port ranges specified with the -i option. Improved performance when the only option is -i. 3.72 August 28, 1996 Fixed bugs and typos in SCO mount table handling. Added support for OpenBSD (only the i386 architecture type has been tested), using the NetBSD dialect sources. David Mazieres <dm@amsterdam.lcs.mit.edu> provided a test system. Added fdesc file system support to FreeBSD, NetBSD and OpenBSD. Changed the way proc file system support is activated with additions to the Configure script and changes to the dialect machine.h files. Dropped the distribution of the Freebsd <procfs/procfs.h> header file. Added support for PTX 4.1.4. 3.73 September 5, 1996 Added information to 00FAQ for missing CCITT HP-UX header file x25L3.h. Pasi Kaara <ppk@atk.tpo.fi> provided the information. Changed AIX header file #include pattern to prevent gcc's loader from complaining about multiply defined etherbroadcastaddr[], fddi_broadcastaddr[], and ie5_broadcastaddr[] CONST u_char arrays from <net/net_globals.h>. (The AIX loader doesn't complain.) David Capshaw <David.Capshaw@SEMATECH.Org> reported this problem. Removed the HASPWSTAYOPEN definition; it was only used for two dialects that are no longer supported. Corrected a bug in UID cacheing that appeared during long repeat-mode (-r) operations. The bug was reported by Peter Van Epp <vanepp@sfu.ca>. When in repeat mode the UID cache will be cleared when /etc/passwd changes. Fixed a bug in FreeBSD support that causes a segmentation fault on VBAD vnodes. Deleted ultrix22 from Configure and RHF from Ultrix source files. Dropped 2.2 from support list. 3.74 September 6, 1996 Corrected a bug in FreeBSD's proc table handling, reported by David O'Brien <obrien@Nuxi.cs.ucdavis.edu>. 3.75 September 9, 1996 Added FreeBSD proc table handling fix from revision 3.74 to BSDI, NetBSD, and OpenBSD dialects. Improved Solaris VFS handling. Added pipe handling to OpenBSD. Changed Configure script to define OPENBSDV for OpenBSD and used that definition to include the pipe support in the NetBSD sources. The Configure script defines NETBSDV for NetBSD. So far neither dialect has any #if/#else/#endif blocks that depend on version number. Added support for AIX 4.2. 3.76 September 21, 1996 Plugged a memory leak in command handling, introduced in revision 3.70. The bug was reported by Peter Van Epp <vanepp@sfu.ca>. Fixed a bug in the reporting of size for IRIX 5.3 EFS files, introduced in revision 3.69 by the name space pollution abatement. The _IRIXV definition was used in the IRIX 5.x private efs_inode.h header file to configure the inode stricture for IRIX 5.3, so I changed the tests to use IRIXV. Changed information on the AIX Stale Segment ID bug to reflect the fact that IBM now says they won't fix it. They have closed the APAR. Disabled the AIX gcc long long alignment hack under AIX 4.2, because it doesn't work there. Installed a fatal error message in Configure that gcc can't be used to compile lsof under AIX 4.2 until a work- around can be developed. Upgraded BSDI, FreeBSD (2.0 and above), NetBSD (1.1B and above), and OpenBSD lock reporting. David Mazieres <dm@amsterdam.lcs.mit.edu> reported the need for the upgrade. Made similar lock reporting upgrades to (versions tested are in parentheses): AIX (4.1.4 and 4.2); DEC OSF/1 (2.0 and 3.2d); EP/IX (2.1.1); HP-UX (9.x and 10.10); IRIX (5.2, 5.3, and 6.2); Linux; NEXTSTEP (3.1); PTX (2.1.6 and 4.2); RISCos; SCO (releases 3.0 and 5.0); Solaris (2.5); SunOS (4.1.3); and Ultrix (4.2). Updated man page and 00FAQ with more information on lock reporting. Updated PTX lsof for 4.2. Upgraded HP-UX lsof for 10.20. Used a test system, provided by Richard Allen <ra@rhi.hi.is>, and received testing assistance from Marc Winkler <marc@healthchex.com>. Changed handling of Internet addresses to avoid DNS lookup operations when the address has clearly not been selected. John DuBois <johnd@sco.COM> suggested this. 3.77 October 2, 1996 Changed SCO Configure stanza to call nm by its full path, thus avoiding possible confusion. The change was suggested by Jean-Pierre Radley <jpr@jpr.com>. Added changes to allow lsof to be compiled by gcc under AIX 4.2 -- enabled some gcc-specific typedef's in the AIX machine.h and disabled the Configure script's rejection of aixgcc for AIX 4.2. The typdef's were supplied by Henry Grebler <henryg@optimation.com.au>. Based on information supplied by Henry and David J. Wilson <davidw@optimation.com.au>, invented a description and processing for an unknown file struct that is established by AIX 4.2 (at least) for X processes when DISPLAY=:0.0. For convenience I gave its type the DTYPE_PIPE definition, but that may be incorrect. Fixed some Solaris 2.[34] errors in locking code, added at 3.76, that I couldn't test. Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> reported the problem and supplied the fixes. Made Configure script supply NeXTSTEP 3.x version in Makefile so that the shadow vnode locking code, introduced in 3.76, would be disabled for NeXTSTEP 3.0. Rainer Orth discovered this problem, too. Added reporting of UNIX domain socket inode numbers for Linux version 2.0 and above. The addition was supplied by Matthew Burt <BurtM@poole.siemens.co.uk>. Enhanced file searching to report all instances of references to automounted file systems, even when they're direct mounts not yet realized. Enhanced Solaris 2.5 lsof to grok autofs nodes. Victoria H. Lau <vlau@msmail2.hac.com> pointed out the need for these enhancements and helped test them. Changed AIX lock length test so it will work with gcc under AIX 4.2. Changed PTX HAS_VXFS symbol, indicating presence of VxFS, to HASVXFS for consistency with the HP-UX form of the symbol. 3.78 October 14, 1996 Changed strtol() call in private Linux nlist() function to strtoul(). Linux kernel addresses at 2.1.0 have their top bit set and appear to be negative to strtol(). This information was provided by Marty Leisner <leisner@sdsp.mc.xerox.com>. Marty also notes that other, unknown-as-of-yet problems prevent lsof from working under 2.1. He is investigating, since I don't have access to a 2.1 system. Added definitions to machine.h for a private file struct type (HASPRIVFILETYPE and PRIVFILETYPE) that can be accommodated without changing prfp.frag, much as HASPIPEFN works for PIPE file struct types. Used the new private file struct type support to support the AIX f_type=0xf that DISPLAY=:0.0 causes. Changed its output TYPE from PIPE to SMT; displayed file size as buffer size less free bytes in buffer; enabled recognizion under AIX 4.1.4. Mike Feldman <feldman@charm.urbana.mcd.mot.com> and others helped me identify this file as a Shared Memory Transport (SMT) socket. Corrected a function prototype in the HP-UX dnode.c for HP-UX 10 and greater; gcc objected; HP's cc did not. Christian Krackowizer <kra1@technodat.co.at> reported the problem. Made AFSConfig script more capable of locating the cell's root directory. Updated AFS documentation in 00FAQ and 00README. Both were suggested by Timothy Miller <tsm@cs.brown.edu>. Installed update to big_brother.perl5 script from Lionel Cons <Lionel.Cons@cern.ch>. 3.79 October 29, 1996 Added support for IRIX 6.4, courtesy of a test system provided by Angel Li <angel@rrsl.rsmas.miami.edu>. Fixed FIFO and NFS3 bugs in IRIX 6.2 lsof in the process. Lsof has not been tested under IRIX 6.3, but the Configure script has a stanza for it. Changed device functions to use stat() instead of lstat(). Used WARNDEVACCESS to suppress stat(2) failure messages. Tested under OpenBSD 2.0. 3.80 November 8, 1996 Corrected comments in 00README about using the sunos413 and sunos413cc Configure abbreviations. Made some Configure and Customize script changes, suggested by Bruce Jerrick <bruce@cse.ogi.edu>. Added missing elements to definition of local Solaris 2.3 lock_descriptor structure so that dnode.c will compile and work properly under it. Corrected a bug in Solaris 2.[34] lock descriptor handling. 3.81 November 14, 1996 Corrected error in the "invented" HP-UX 10.20 proc struct. The erroneous struct definition named the set-UID member as the UID member, resulting in occasional incorrect UID attributions in lsof output. At the suggestion of Larry Schwimmer <schwim@cyclone.stanford.edu>, changed AFSConfig to use awk to get the cell name from /usr/etc/vice/ThisCell, thus avoiding a problem when the cell name line has more than one word. Added -DSWASH to IRIX 6.2 options propagated from the kernel build CCOPTS to lsof's Makefile. Randolph J. Herber <herber@dcdrjh.fnal.gov> did the detective work that revealed the need for this. IRIX 6.2 patch 1488 added -DSWASH and its effects. 3.82 December 11, 1996 Updated Configure script for FreeBSD 3.0 and SCO OpenServer 5.0.[24]. FreeBSD Configure script change was supplied by David E. O'Brien <obrien@NUXI.com> and SCO Configure script change was supplied by Bela Lubkin <belal@sco.COM>. Tested lsof under FreeBSD 3.0, courtesy of a test system provided by Ade Barkah <mbarkah@hemi.com>. Added changes to support SCO OpenServer 5.0.4 (Comet), supplied by Bela Lubkin <belal@sco.COM>. Added support for UnixWare 2.1. D. Chris Daniels <chrisd@dlpco.com> provided a test system and Bela Lubkin provided technical assistance. Added support for Pyramid DC/OSx 1.1 and Reliant UNIX 5.43. Bruce Beare <bjb@pyramid.com> and Kevin Smith <kevin@pyramid.com> provided test systems and technical assistance. This dialect version must run setuid-root, since it accesses proc and user structures vic the /proc file system. Tested under PTX 2.1.9 and added support for PTX 4.2.1. At Bela Lubkin's suggestion added a commercial to the lsof man page, -h option, and -v option output, telling where to get the latest revision. This entailed large scale rearrangement of the -h output to keep it as short as possible. It also involved shortening the -X explanation for PTX. Made sure that address segment access errors didn't incorrectly force the listing of a process. This fix was needed by the Sun, Pyramid, and UnixWare ports. Corrected bug in the way the local device table is sorted. 3.83 December 30, 1996 Added support for Solaris 2.6 (Beta) with help from Casper Dik <casper@holland.Sun.COM>, May Jackson <methalya.jackson@eng.sun.com>, Joseph Kowalski <jek3@Eng.Sun.COM>, and the Solaris 2.6 Beta test program. Fixed an inode file system type processing bug in SCO OpenServ 5.0 and greater, reported by Robert Lipe <robertl@arnet.com>. Fixed bugs in SCO kernel name cache probing, courtesy of code and suggestions from Bela Lubkin <belal@sco.COM>. Revised kernel name list handling to remove the need for changing two files (dlsof.h and dstore.c) when altering, removing, or adding name list symbols. All dialects were affected. Added support for SCO OpenServer event "clones." Robert Lipe need for their support and Bela Lubkin provided technical assistance in identifying them. Added display of bound name to Solaris UNIX domain socket file handling. Correct bug in SunOS address space ("txt" file) handling. Tested under UnixWare 2.1.1. Changed SGI IRIX lsof to use the kernel's proc struct size when striding through its proc table (IRIX versions below 6.4). The proc struct size difference warning is still issued, and lsof still uses the proc struct size and proc struct from <sys/proc.h> to read and process proc table information. Added a note to 00FAQ about this. Deferred Internet host and port name lookups to print time, thus avoiding lookups for files that are not listed. 3.84 January 13, 1997 Updated the Pyramid private configuration script, MkKernOpts, to propagate the R4000 definition for DC/OSx systems so equipped. Anthony Shortland <anthony.shortland@FMR.COM> pointed out the need for this and Kevin Smith <kevin@pyramid.com> provided access to a test system. Added information to 00FAQ about UDP ports for which lsof can't find users, because the ports are reserved to the kernel and aren't associated with open files. 3.85 January 17, 1987 The DEC OSF/1 kernel name cache can be processed as a simple table, rather than a linked list, so changed the interface to rnam.frag accordingly. Added a new optional output field, parent process ID (PPID). The -R option (for paRent) selects it, and the `R' field identifier labels it. Updated some scripts to handle it and developed two new scripts, idrlogin.perl and idrlogin.perl5, to use it in locating nework (rlogind and telnetd) source addresses for shell processes. Added some information about the new scripts to 00QUICKSTART. 3.86 January 30, 1997 Add explanation of why device warning messages disappear when the device cache file is used. Changed Linux Configure stanza to check more places for the [z]System.map file and warn if the one located differs in date from /vmlinuz. Bjorn S. Nilsson <NILSSON@nbivms.nbi.dk> suggested this for easier configuration at Linux 2.0.28. Changed Linux Confifgure stanza to check for the presence of fl_fd, fl_file, and fl_whence in the file_lock structure of <linux.fs.h> and define symbols appropriately. Changed Linux lock testing to test task structure pointer (fl_owner) from file_lock struct as well as (possibly) the file struct pointer (fl_file) or file decriptor number (fl_fd) to identify the lock owner, depending on what HAS_FL_* symbols were defined by Configure's file_lock structure examination. Added section to Linux Problems in 00FAQ about this. Corrected 00FAQ reference in Configure's Solaris 2.4 stanza. 3.87 February 11, 1997 Corrected setting of VxFS device number for HP-UX and PTX. Added VM map flag test #if/#else/#endif for recent versions of FreeBSD 3.0, supplied by Chris Timmons <skynyrd@opus.cts.cwu.edu>. Added a #define that removes a conflict between a signal() prototype in the IRIX 6.4 <sys/systm.h> and one in its <sys/signal.h>, exposed when cachefs support is enabled. Wolfgang Hecht <hecht@zedat.fu-berlin.de> identified the need for this addition and helped test it. Refined IRIX proc struct size test, warning, and use. Revised Linux system map file handling (yet again) to search for the file at execution time, rather than in the Configure script. Marty Leisner <leisner@sdsp.mc.xerox.com> suggested this. Added VxFS support to Solaris lsof with help from Peter Radig <radig@DresdnerBank.de>. Philip Kizer <pckizer@tamu.edu> helped test. Added support for PTX 4.3, thanks to access provided by Peter Jordan <petej@sequent.com>. 3.87 February 11, 1997 supplement Updated FreeBSD kernel name list handling. 3.88 February 17, 1997 Added documentation files -- 00.README.FIRST[_<version>] and 00RELEASE.SUMMARY_<version> -- to the distribution. Vic Abell <abe@purdue.edu> Purdue University Computing Center February 17, 1997