From owner-freebsd-arch Tue Aug 15 21:52:17 2000 Delivered-To: freebsd-arch@freebsd.org Received: from gateway.posi.net (c1096725-a.smateo1.sfba.home.com [24.20.139.104]) by hub.freebsd.org (Postfix) with ESMTP id D681037B6C0 for ; Tue, 15 Aug 2000 21:52:12 -0700 (PDT) (envelope-from kbyanc@posi.net) Received: from localhost (kbyanc@localhost) by gateway.posi.net (8.9.3/8.9.3) with ESMTP id VAA40788; Tue, 15 Aug 2000 21:59:30 -0700 (PDT) (envelope-from kbyanc@posi.net) Date: Tue, 15 Aug 2000 21:59:29 -0700 (PDT) From: Kelly Yancey To: Alfred Perlstein Cc: arch@FreeBSD.ORG Subject: Re: would like to make cp_time a sysctl In-Reply-To: <20000815205643.M4854@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 15 Aug 2000, Alfred Perlstein wrote: > One must use libkvm for reading cpu utilization, I'm going to make > them available through sysctl. > > I would like to have a sysctl that returns a string of the cpu states: > kern.cpustates.names: user nice sys intr idle > kern.cpustates.values: values > > I'm open for alternative suggestions on how to do this. One oid per name? I.e. kern.cpustate.user = X, kern.cpustate.nice = Y... > > I've been told that netbsd has thier own way of doing it, I don't > like it because they use SYSCTL_STRUCT which isn't very useful unless > you can include the C headers to parse it. > The struct sure beats libkvm. :) In any event, one could always teach sysctl(8) about the type and it can display it suitable for humans and scripts. Kelly To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message