From owner-freebsd-questions Thu Feb 17 17:15:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from monsoon.mail.pipex.net (monsoon.mail.pipex.net [158.43.128.69]) by hub.freebsd.org (Postfix) with SMTP id CFC5037B7C2 for ; Thu, 17 Feb 2000 17:15:24 -0800 (PST) (envelope-from mark@dogma.freebsd-uk.eu.org) Received: (qmail 26706 invoked from network); 18 Feb 2000 01:15:18 -0000 Received: from userao87.uk.uudial.com (HELO marder-1.) (62.188.135.203) by smtp.dial.pipex.com with SMTP; 18 Feb 2000 01:15:18 -0000 Received: (from mark@localhost) by marder-1. (8.9.3/8.9.3) id BAA06678; Fri, 18 Feb 2000 01:15:19 GMT (envelope-from mark) Date: Fri, 18 Feb 2000 01:15:19 +0000 From: Mark Ovens To: Alfred Perlstein Cc: Omachonu Ogali , freebsd-newbies@freebsd.org, freebsd-questions@freebsd.org Subject: Re: CPU Information Message-ID: <20000218011519.A329@marder-1> References: <20000217164929.D21720@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000217164929.D21720@fw.wintelcom.net> Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Feb 17, 2000 at 04:49:29PM -0800, Alfred Perlstein wrote: > * Omachonu Ogali [000217 16:41] wrote: > > Here's a simple app to display the CPU information on a FreeBSD machine. > > I hope it helps anyone... > > It's nice, but output is incorrect, the convertions from normal numbers > to MB should be done via powers of 2 not powers of 10. > You mean s/1000000/1048576/g ? Are you sure? As posted on a K6-233, 64MB: # ./cpuinfo FreeBSD CPU Information Version 0.1 http://tribune.intranova.net Architecture: i386 Number of CPUs: 1 CPU Model: AMD-K6tm w/ multimedia extensions CPU Speed: 233MHz Total Memory: 63MB User Memory: 43MB After s/1000000/1048576/g : # ./cpuinfo FreeBSD CPU Information Version 0.1 http://tribune.intranova.net Architecture: i386 Number of CPUs: 1 CPU Model: AMD-K6tm w/ multimedia extensions CPU Speed: 223MHz Total Memory: 60MB User Memory: 41MB > Why not submit it as a port? > > -Alfred > > > > > > --- snip --- > > /* > > * FreeBSD CPU Information 0.1 > > * --------------------------- > > * Simple program to display the total RAM, and CPU information. > > * Compile: cc -o cpuinfo cpuinfo.c > > * --------------------------- > > * Omachonu Ogali > > */ > ... > > > > totalmem = (totalmem - 1000000) / 1000000; > > usermem = (usermem - 1000000) / 1000000; > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Microsoft: Where do you want to go today? Linux: Where do you want to go tomorrow? BSD: Are you guys coming, or what? -Poster at LinuxWorld 2000 ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message