From owner-freebsd-current Thu Oct 28 10:40: 8 1999 Delivered-To: freebsd-current@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id 042B3152B2 for ; Thu, 28 Oct 1999 10:40:05 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (root@d60-025.leach.ucdavis.edu [169.237.60.25]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id KAA22283; Thu, 28 Oct 1999 10:39:59 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id KAA53354; Thu, 28 Oct 1999 10:39:58 -0700 (PDT) (envelope-from obrien) Date: Thu, 28 Oct 1999 10:39:58 -0700 From: "David O'Brien" To: Garrett Wollman Cc: current@FreeBSD.ORG Subject: Re: lsof + namecache Message-ID: <19991028103958.A53305@dragon.nuxi.com> Reply-To: obrien@NUXI.com References: <312.941094594@critter.freebsd.dk> <199910281452.KAA91520@khavrinen.lcs.mit.edu> <19991028085402.A47498@dragon.nuxi.com> <199910281554.LAA91800@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <199910281554.LAA91800@khavrinen.lcs.mit.edu> X-Operating-System: FreeBSD 4.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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 (obrien@NUXI.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message