From owner-freebsd-questions@FreeBSD.ORG Fri Jan 4 00:01:09 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44A5116A417 for ; Fri, 4 Jan 2008 00:01:09 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [213.186.42.107]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1D813C46A for ; Fri, 4 Jan 2008 00:01:09 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from roxette.lamaiziere.net (unknown [77.192.6.103]) by smtp.lamaiziere.net (Postfix) with ESMTP id 5D7801180597 for ; Fri, 4 Jan 2008 00:45:02 +0100 (CET) Received: from roxette.lamaiziere.net (localhost [127.0.0.1]) by roxette.lamaiziere.net (Postfix) with ESMTP id 9541B412B for ; Fri, 4 Jan 2008 00:44:58 +0100 (CET) Date: Fri, 4 Jan 2008 00:44:57 +0100 From: Patrick Lamaiziere To: freebsd-questions@freebsd.org Message-ID: <20080104004457.0e015613@roxette.lamaiziere.net> In-Reply-To: <1bd550a00801030514i5007c67t509e05f08c820dd@mail.gmail.com> References: <1bd550a00801030514i5007c67t509e05f08c820dd@mail.gmail.com> Organization: /dave/nulle X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: Porting from linux to FreeBSD (procfs question) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 00:01:09 -0000 Le Thu, 3 Jan 2008 14:14:57 +0100, "Fernando Apesteguía" a écrit : > As I know, FreeBSD has some kind of procfs but more limited in terms > of information. My questions is how should I proceed now? I see two > options. > > 1 - Try to rely the porting on the compatibility procfs from FreeBSD > 2 - Do the things in a completely different way (which one is this? > Invoking sysctl system call?) > > I would like to know from you which one is the best approach. I don't know exactly what you need, but look at libkvm. Good samples are ps and top in the source code.