From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 4 13:38:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5768416A46C for ; Fri, 4 Jan 2008 13:38:04 +0000 (UTC) (envelope-from gregoryd.freebsd@free.fr) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by mx1.freebsd.org (Postfix) with ESMTP id 180E913C4E7 for ; Fri, 4 Jan 2008 13:38:04 +0000 (UTC) (envelope-from gregoryd.freebsd@free.fr) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 0613C17F596; Fri, 4 Jan 2008 14:38:03 +0100 (CET) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp8-g19.free.fr (Postfix) with ESMTP id A718517F571; Fri, 4 Jan 2008 14:38:02 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id 807DB4250; Fri, 4 Jan 2008 14:38:02 +0100 (CET) Received: from bel62-2-88-160-33-190.fbx.proxad.net (bel62-2-88-160-33-190.fbx.proxad.net [88.160.33.190]) by imp.free.fr (IMP) with HTTP for ; Fri, 04 Jan 2008 14:38:02 +0100 Message-ID: <1199453882.477e36ba4d4d7@imp.free.fr> Date: Fri, 04 Jan 2008 14:38:02 +0100 From: gregoryd.freebsd@free.fr To: Fernando =?iso-8859-1?b?QXBlc3RlZ3XtYQ==?= References: <1bd550a00801030926h7b3f0aaayfd04244a3305619c@mail.gmail.com> <86tzlud6y5.fsf@ds4.des.no> <1bd550a00801031157s521665e4p77b2250d3966ec1d@mail.gmail.com> In-Reply-To: <1bd550a00801031157s521665e4p77b2250d3966ec1d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 88.160.33.190 Cc: Dag-Erling =?iso-8859-1?b?U234cmdyYXY=?= , freebsd-hackers@freebsd.org Subject: Re: Porting from Linux to FreeBSD (procfs question) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 13:38:04 -0000 Quoting Fernando Apesteguía : > Maybe a mix of both could be good: use the linxprocfs when it is > almost straightforward (in fact I could run the app, just changing few > lines) and sysctl when the linprocfs doesn't provide the information > that I need. Wouldn't the opposite be more legitimate: using sysctl and falling back on linuxprocfs when lacking functionality ? (Depending on whether it's a FreeBSD *port*, or if you want to keep it as general as you can) Also, have you considered procstat ? (as i read here: http://ivoras.sharanet.org/freebsd/freebsd8.html it is destined to replace procfs in a way, am I wrong ?) Depending on how short term your application must be available (and how long it will take to MFC procstat), it might do the thing.