atom feed8 messages in org.freebsd.freebsd-currentRe: lsof + namecache
FromSent OnAttachments
Chuck RobeyOct 27, 1999 7:03 am 
Poul-Henning KampOct 28, 1999 12:09 am 
Garrett WollmanOct 28, 1999 7:52 am 
Greg LeheyOct 28, 1999 8:06 am 
David O'BrienOct 28, 1999 8:53 am 
Garrett WollmanOct 28, 1999 8:54 am 
Dan NelsonOct 28, 1999 10:35 am 
David O'BrienOct 28, 1999 10:39 am 
Subject:Re: lsof + namecache
From:David O'Brien (obr@NUXI.com)
Date:Oct 28, 1999 10:39:36 am
List:org.freebsd.freebsd-current

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.

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message