From owner-freebsd-hackers Tue Jan 22 11:49:15 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 9D24D37B405 for ; Tue, 22 Jan 2002 11:49:12 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 6E17710DDFB; Tue, 22 Jan 2002 11:49:12 -0800 (PST) Date: Tue, 22 Jan 2002 11:49:12 -0800 From: Alfred Perlstein To: Brooks Davis Cc: hackers@freebsd.org Subject: Re: cpu info in userland Message-ID: <20020122114912.B13686@elvis.mu.org> References: <20020122113351.A25927@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020122113351.A25927@Odin.AC.HMC.Edu>; from brooks@one-eyed-alien.net on Tue, Jan 22, 2002 at 11:33:51AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Y'know this really deserves a FAQ entry if it exists, if not anyone feel like implementing the sysctl for it? * Brooks Davis [020122 11:34] wrote: > I'm working on a port of Globus to FreeBSD and some of the monitoring > tools want to publish info about each CPU in the system. On the i386 > the most info I need is generally found at the top of dmesg: > > CPU: Pentium III/Pentium III Xeon/Celeron (996.85-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0x686 Stepping = 6 > Features=0x383fbff > > I'm trying to figure out how to get it from userland (in a shell script). > I've looked at the cpuid port which seems to do most of it, but it > doesn't display clock speed, only works on IA32 cpus, and won't be > accurate if we have mismatched CPUs.[0] > > Linux displays this information in /proc/cpuinfo though there's no > consistancy between platforms (at least alpha and i386 seem to have > nothing in common.) Is there something similar I'm missing or is this a > missing feature? > > -- Brooks > > [0] I seem to recall seeing someone post a dmesg with an SMP system with > differently clocked CPUs in it so this is a potential concern. > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message