> > fstat(1) does not have the functionality (that is now missing) that
> > people have come to expect from LSOF.
> ...which is?
Say for instance I want to know which program someone is running (and
what libs it is using). fstat does not show the path to the program:
obrien communicator-4.7 84460 root / 2 drwxr-xr-x 1536 r
obrien communicator-4.7 84460 wd /files 500011 drwx--x--x 9728 r
obrien communicator-4.7 84460 text / 72712 -r-xr-xr-x 13234176 r
....
vs. LSOF:
communica 82769 obrien txt VREG 13,131072 13234176 72712
/usr/local/lib/netscape/communicator-4.7.us.bin
communica 82769 obrien txt VREG 13,131072 77824 87630
/usr/libexec/ld.so
communica 82769 obrien txt VREG 13,131072 292041 143092
/usr/X11R6/lib/aout/libXt.so.6.0
communica 82769 obrien txt VREG 13,131072 79896 143093
/usr/X11R6/lib/aout/libXmu.so.6.0
...
Both tools are useful. As Vic Abell has said:
I think lsof and fstat have gradually converged. Each delivers some
information the other doesn't but both deliver the same essential
information.
Probably the most important thing in lsof's favor is that it provides
consistent support across multiple UNIX dialects -- Linux, NetBSD,
OpenBSD, AIX, HP-UX, SCO OSR, SCO Unixware, and Sun Solaris to name a
few. Lsof might have a richer set of command option filters than
fstat, and it has an output mode designed for use by post processing
scripts and filters.
--
-- David ([EMAIL PROTECTED])
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message