Date: Sun, 2 Dec 2007 13:42:26 +0000 From: Jurjen Middendorp <jurjenm@stack.nl> To: freebsd-questions@freebsd.org Subject: Re: Linux /proc on FreeBSD Message-ID: <20071202134226.GA7974@s062107.lan> In-Reply-To: <200712020132.37819.pieter@degoeje.nl> References: <1196552904.16096.10.camel@sundaysister> <200712020132.37819.pieter@degoeje.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071202134226.GA7974>