*BSD News Article 52575


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!inet-nntp-gw-1.us.oracle.com!news.caldera.com!news.cc.utah.edu!park.uvsc.edu!usenet
From: Terry Lambert <terry@cs.weber.edu>
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: lsof for 2.0 ?
Date: 11 Oct 1995 21:01:00 GMT
Organization: Utah Valley State College, Orem, Utah
Lines: 33
Message-ID: <45hbac$qaa@park.uvsc.edu>
References: <44u04r$pel@noao.edu>
NNTP-Posting-Host: hecate.artisoft.com

rstevens@noao.edu (W. Richard Stevens) wrote:
]
] Anyone have a version of lsof for BSD/OS 2.0?  The version at
] Purdue stopped supporting BSDI at 3.21 and an older 3.0 source
] release that I have is for BSDI 1.1, not 2.0.  I also tried
] ftp.bsdi.com and couldn't find anything there.

Hey, fellow Tucsonan!  8-).

I believe BSDI 2.0 did what AIX and UnixWare 2.0 did that caused
identd to break as well: moved the system open file table to be
dynamically allocated.

To get around it, you would have to rewrite the system open file
table traversal code to consider only valid open files from the
read from /dev/kmem.

On AIX and UnixWare 2.0, I hacked this for identd by examining
all active process structures for all processes.  It's a lot more
expensive, but since it's not a frequent or time critical operation,
it's OK.

Without BSDI 2.0 source, it's going to be harder, but not impossible.

One potentially easy way to deal with this would be to go to using
/proc instead (this should be more portable as well).


                                        Terry Lambert
                                        terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.