From owner-freebsd-hackers Mon Feb 21 3: 9:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 9B92637BBD9; Mon, 21 Feb 2000 03:09:15 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id DAA25595; Mon, 21 Feb 2000 03:37:48 -0800 (PST) Date: Mon, 21 Feb 2000 03:37:48 -0800 From: Alfred Perlstein To: =?iso-8859-1?Q?Jos=E9_Lu=EDs_Faria?= Cc: freebsd-doc@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: kernel Message-ID: <20000221033747.N21720@fw.wintelcom.net> References: <38B1282D.7230C8BC@di.uminho.pt> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0.1i In-Reply-To: <38B1282D.7230C8BC@di.uminho.pt>; from jose@di.uminho.pt on Mon, Feb 21, 2000 at 11:57:33AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * José Luís Faria [000221 03:25] wrote: > Hello > > I'm creating a litle update to a freebsd 3.4 kernel. > My program is for account some data: number of > packets by class, number of packets dropped by class, etc. > Now I need to pass this values to another program wich in X-Window > display this values on-line. After, I want to save this values > in a file. > > I need some docs about how I can do this. > Which are the primitives in the kernel to do this. > I use the printf to put this data in /var/log/messages. > This inappropriate, I dont want this. This is only for testing now. > > Can you help me ? Perhaps you'd like to use sysctl nodes as counters, they allow a pretty clean exporting of kernel internal variables. try "man sysctl" and looking at various other uses of sysctls in the kernel as counters. good luck, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message