From owner-freebsd-hackers Thu Aug 3 8:14:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net [194.217.242.91]) by hub.freebsd.org (Postfix) with ESMTP id D157737B601 for ; Thu, 3 Aug 2000 08:14:51 -0700 (PDT) (envelope-from laurence@herculeez.com) Received: from herculeez.demon.co.uk ([158.152.217.198] helo=herculeez.com) by anchor-post-33.mail.demon.net with esmtp (Exim 2.12 #1) id 13KMhr-0004vr-0X for freebsd-hackers@freebsd.org; Thu, 3 Aug 2000 16:14:47 +0100 Message-ID: <39898D03.6185C6C3@herculeez.com> Date: Thu, 03 Aug 2000 16:17:23 +0100 From: Laurence Barry Organization: Herculeez X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: FreeBSD Hackers Subject: nfiles Content-Type: multipart/alternative; boundary="------------C15E94179D76E87B217B0C82" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --------------C15E94179D76E87B217B0C82 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sure this is a simple one ... I need to determine the total number of files open on a system. The only way I can think to do this is a sysctl() call with mib[0]=CTL_KERN and mib[1]=KERN_FILE, then trawl through the file structure that is returned. There must be a simpler way. Laurence Barry -- laurence@herculeez.com --------------C15E94179D76E87B217B0C82 Content-Type: text/html; charset=iso-8859-15 Content-Transfer-Encoding: 7bit
Sure this is a simple one ... 

I need to determine the total number of files open on a system. The only way I can think to do this is a sysctl() call with
mib[0]=CTL_KERN and mib[1]=KERN_FILE, then trawl through the file structure that is returned. There must be a simpler
way. 

  Laurence Barry 

-- 
  laurence@herculeez.com
  --------------C15E94179D76E87B217B0C82-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message