From owner-freebsd-questions@FreeBSD.ORG Sun Dec 2 12:44:34 2007 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 E3FF816A41B for ; Sun, 2 Dec 2007 12:44:34 +0000 (UTC) (envelope-from jurjenm@stack.nl) Received: from mx1.stack.nl (meestal-mk5.stack.nl [IPv6:2001:610:1108:5010::149]) by mx1.freebsd.org (Postfix) with ESMTP id 9BAE613C459 for ; Sun, 2 Dec 2007 12:44:34 +0000 (UTC) (envelope-from jurjenm@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id AB87741D23; Sun, 2 Dec 2007 13:44:33 +0100 (CET) X-Spam-DCC: dcc-servers: toad.stack.nl 1049; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on toad.stack.nl X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_47, J_CHICKENPOX_48,RDNS_DYNAMIC,SPF_NEUTRAL autolearn=no version=3.2.3 X-Spam-Relay-Country: NL Received: from jurjen (a62-251-106-27.adsl.xs4all.nl [62.251.106.27]) by mailhost.stack.nl (Postfix) with ESMTP id 3F31841A6C for ; Sun, 2 Dec 2007 13:44:26 +0100 (CET) Received: by jurjen (sSMTP sendmail emulation); Sun, 2 Dec 2007 13:42:26 +0000 Date: Sun, 2 Dec 2007 13:42:26 +0000 From: Jurjen Middendorp To: freebsd-questions@freebsd.org Message-ID: <20071202134226.GA7974@s062107.lan> Mail-Followup-To: Jurjen Middendorp , freebsd-questions@freebsd.org References: <1196552904.16096.10.camel@sundaysister> <200712020132.37819.pieter@degoeje.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200712020132.37819.pieter@degoeje.nl> User-Agent: Mutt/1.4.2.3i Organization: FOTLP (Federation Of Terribly Lazy People) Subject: Re: Linux /proc on FreeBSD 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: Sun, 02 Dec 2007 12:44:35 -0000 On Sun, Dec 02, 2007 at 01:32:37AM +0100, Pieter de Goeje wrote: >On Sunday 02 December 2007, Lennart Koopmann wrote: >> Hey everyone, >> >> i am going to port a server that i am currently working on to FreeBSD. >> I don't have much experience with FreeBSD yet. The only real big thing >> i have to change is the way some data is fetched. In the Linux version i >> read in data like the hostname, the domainname, the kernel version etc >> from /proc. >Sysctls kern.hostname and kern.version. >> >> Is there a central point to look for those values in FreeBSD? >Yes, the sysctl MIB tree. >> If not, where do i get those values? >> >> I _don't_ want to use external binaries like sysctl etc... >man 3 sysctl :) Why not use (more portable (?)) functions instead of linux-isms or freebsd-isms? (e.g. uname, gethostname and friends vs. /proc and sysctl). -jurjen