Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2002 11:49:12 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        hackers@freebsd.org
Subject:   Re: cpu info in userland
Message-ID:  <20020122114912.B13686@elvis.mu.org>
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
References:  <20020122113351.A25927@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Y'know this really deserves a FAQ entry if it exists, if not anyone
feel like implementing the sysctl for it?

* Brooks Davis <brooks@one-eyed-alien.net> [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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020122114912.B13686>