lsofLists information about open files (similar to fstat(1))
4.99.5,8sysutilsΣ=212 4.99.5,8Version of this port present on the latest quarterly branch.upstream: 4.99.7A newer version was found upstream by portscout, first on 2026-06-20.
Lsof (LiSt Open Files) lists information about files that are open by the
running processes. An open file may be a regular file, a directory, a block
special file, a character special file, an executing text reference, a library,
a stream or a network file (Internet socket, NFS file or Unix domain socket).
See also fstat(1) in the base system.
===> The following configuration options are available for lsof-4.99.5,8:
NOSOCKSECURITY=off: Non-root users can only list their own files except sockets (Implies SECURITY)
SECURITY=off: Non-root users can only list their own files
===> Use 'make config' to modify these settings
NOTE: Due to the way the FreeBSD build clusters make packages,
you may see a warning similar to the following:
lsof: WARNING: compiled for FreeBSD release 11.1-RELEASE-p6; this is 11.1-RELEASE-p4.
This is because the poudriere jails that build the packages don't have the
corresponding kernel installed, so they don't know that the kernel version is different.
This warning can be ignored if you are using a system that is updated via freebsd-update
and are using pre-built packages.
sysutils/lsof: 4.89B -> 4.89C
- Updated for latest version of FreeBSD 11.0-CURRENT.
- Compensated for a missing FreeBSD 10.0 typedef of bool on the
i386 architecture. Allen Hewes provided a test system.
Andrey Chernov provided useful advice.
- Improved tests/Add2TestDB script with a patch from Peter Schiffer.
Added patches from Peter to eliminate Linux gcc warnings.
Updated Lsof.8 with improvements supplied by Bjarni Ingi Gislason.
- Changed FreeBSD global CFLAGS extraction per Terry Kennedy
Also made sure -DNEEDS_BOOL_TYPEDEF is #define'd when the resulting
CFLAGS doesn't contain it. Terry reported that need.
PR: 197388
Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer)
- Update to 4.88
Release notes:
___________________ lsof 4.88 release notes _______________________
4.88 October 13, 2014
Reduced to 50 the number of open file descriptors lsof
attempts to close while trying to protect itself from a
file descriptor exec() attack. This limits the overhead
lsof incurs on systems that have large file descriptor
limits, yet provides sufficient open descriptors for the
library functions lsof calls.
Updated for changes in FreeBSD 10 with advice from Eygene
(Only the first 15 lines of the commit message are shown above )
- Update to 4.88E
- While I'm here:
- Support STAGEDIR
- Use USES=shebangfix
Changes:
- Support HEAD being FreeBSD 11-CURRENT
PR: ports/182924
Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer)
Rely on bsdtar to autodetermine the format of the distfiles when possible
For a while now bsdtar is able to autotermine compression and archive format.
Let's then use tar directly instead of piping to tar.
Now USE_BZIP2 and USE_XZ only set EXTRACT_SUFX to the right format
- update to 4.87
- trim Makefile header
- remove USE_GCC (builds fine with clang)
- bump PORTEPOCH (4.87A is greater than 4.87)
PR: 174906
Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer)
Force numerous ports that fail to build with clang over to instead always
rely on gcc. The patch uses the new USE_GCC=any code in Mk/bsd.gcc.mk to
accomplish this.
The ports chosen were ports that blocked 2 or more ports from building with
clang. (There are several hundred other ports that still fail to build with
clang, even with this patch. This is merely one step along the way.)
Those interested in fixing these ports with clang, and have clang as their
default compiler, can simply set FORCE_BASE_CC_FOR_TESTING=yes.
For those who have gcc as their default compiler, this change is believed
to cause no change.
Hat: portmgr
Tested with: multiple runs on amd64-8-exp-bcm and 9-exp-clang, with various
combinations of patch/no-patch and flag settings.
The lsof port has a patch that turns HASSECURITY on. However, thanks to the
security.bsd.see_other_uids sysctl feature, a lsof binary that was built
without HASSECURITY does not report any additional information
whensecurity.bsd.see_other_uids is set to 0.
It would be nice to get rid of this since enabling HASSECURITY has the nasty
side effect that non-root users cannot use lsof to look at processes other than
their own even if they a member of group kmem.
PR: ports/132557
Submitted by: Craig Leres <leres@ee.lbl.gov>
Approved by: maintainer, so (cperciva)
Apply a vendor patch that corrects over-zealous rejection of open file
listing when no options are specificed to lsof and lsof security options
are enabled.
PR: ports/128538
Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer)
Update to 4.80:
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>.
(as a note about the above, if the port still fails for you, you should upgrade
your system either to the latest HEAD or the latest 7-STALBE there's a 2 weeks
window of breakage or so).
Added warnings for unsupported dialects or versions.
Added a missing quote to the Configure script's
FreeBSD stanza.
PR: ports/123615
Submitted by: maintainer
Supplimentary tindy testing by: miwi@
- Update to 4.80B
This should fix build failure on 7.x and 8.x since last update.
PR: ports/123261
Submitted by: Larry Rosenman <ler at lerctr.org> (maintainer)
1. Update to version 4.79L.
2. Remove the trailing whitespace at the end of the last ftp URL.
Vic Abell made the following changes to more easily bullet-proof
the new locking stuff:
-----
I've toughened the part of Configure that handles the new 7.0 and 8.0 file
locking changes and made it quit when anything goes wrong.
I've updated 00FAQ to describe why Configure quits. I also added a section
about lockf compiler errors, although it's unlikely those will be seen
any more now that Configure quits.
-----
PR: ports/122751
Submitted by: Larry Rosenman <ler at lerctr.org> (maintainer)
- Update to 4.79K
- Remove local distfiles, add maintainer's mirror site
PR: ports/122690
Submitted by: Larry Rosenman <ler at lerctr.org> (maintainer)
Update to 4.79J:
- This should fix sysutils/lsof on recent 8-Current. Thanks to Vic Abell for
the quick turnaround on new release!
Please let maintainer know of any issues.
PR: ports/122505:
Submitted by: Larry Rosenman (maintainer)
Add MASTER_SITE_LOCAL since the primary distribution site rejects
connections without working reverse DNS.
Approved by: Larry Rosenman (maintainer), garga (mentor)
Update to 4.79E which fixes the build on 8.0
Thanks to Vic Abell for a very quick response and new release.
PR: 119339
Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer),
pointyhat
[PATCH] sysutils/lsof: update to 4.79A
Update to 4.79A
This fixes the GCC 4.2 errors on -CURRENT.
(Vic Abell pointed me to the new TarBall).
PR: ports/113123
Submitted by: Larry Rosenman <ler@lerctr.org>
Upgrade to revision 4.74.
+ Updated lsof for FreeBSD 6.0 and higher for a change in
<sys/vnode.h>.
+ Added support for the FreeBSD 6.0-CURRENT f_vnode
pointer in the file structure.
+ Added FreeBSD support for the *effnlink member of the inode
structure. This makes the lsof LTnlink test run faster.
+ Corrects two FreeBSD 4.10 RPC/XDR type definitions.
+ Updated for FreeBSD 4.11. The support compiles but
hasn't been tested.
The latest 6.0-CURRENT has a change in the file structure that requires
an lsof change.
Tested on: 4.9 i386, 4.0 i386, 5.3 Alpha, 6.0 AMD64 and 6.0 Sparc64.
Submitted by: Vic Abell <abe@purdue.edu>
Update to a snap release that fixes the build on 5.2[.1]-RELEASE, and fixes
the configure script so that 4.10-RELEASE is treated as 4.10 vs. 4.1.
While LSOF did build on 4.10, the resulting binary most likely won't work.