From owner-freebsd-questions Thu Aug 3 7:40:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (Postfix) with ESMTP id E353737B5B3 for ; Thu, 3 Aug 2000 07:40:49 -0700 (PDT) (envelope-from laurence@herculeez.com) Received: from herculeez.demon.co.uk ([158.152.217.198] helo=herculeez.com) by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1) id 13KMAx-000JlW-0C for freebsd-questions@FreeBSD.ORG; Thu, 3 Aug 2000 14:40:48 +0000 Message-ID: <39898501.6FDC3C79@herculeez.com> Date: Thu, 03 Aug 2000 15:43:14 +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 Questions Subject: nfiles Content-Type: multipart/alternative; boundary="------------7BE7112A5D8588A6B55EFFFC" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --------------7BE7112A5D8588A6B55EFFFC 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 --------------7BE7112A5D8588A6B55EFFFC 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
  --------------7BE7112A5D8588A6B55EFFFC-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message