Messages in this thread | | | Date | Wed, 1 Sep 1999 13:18:16 -0400 (EDT) | From | Vince Weaver <> | Subject | Re: /proc/cpuinfo verbiage differ unnecessarily between ports... |
| |
well, I am an author of one of those "user-space tools" that reads /proc/cpuinfo.
<PLUG>http://www.glue.umd.edu/~weave/vmwprod/linux_logo</PLUG>
Trying to keep up-to date on this, with the varous ports, is nearly impossible. cpuinfo structures change, even between stable kernel trees [2.0.32 I remember changed a bunch of them]. The "sysinfo_ix86.c" file in my aforementioned program is 7k of various complicated text parsing and checking just to try to print out a sane name for the CPU.
And between the ports, it is even worse. Some have "bogomips" some "BogoMips" some "bogoMIPS" and some even "bogo mips". Extraneous spaces, colons, etc... it is just a mess.
Whenever this comes up though people say cpuinfo is for human eyes only, it should not be parsed. But when someone suggests making a syscall for it, everyone decries that idea too.
WHat would be nice would be a standard, something like this
number_of_cpus: 1 cpu_type: K6-2 cpu_manufacturer: AMD cpu_speed: 350Mhz bogomips: 680.2
then follow it by platform dependent stuff like
cpu_id: AuthenticAMD fpu: yes flags: blah blah blah
if enough people think this is a good idea, I might try to work out a patch that does this.
If not, I will let the mess continue. I have to maintain the code one way or another; it would be nicer just to have ther kernel do the right thing.
PS. Here are some illustrations of how cpuinfo files can differ
---------ALPHA--------------------
cpu : Alpha cpu model : EV6 cpu variation : 7 cpu revision : 0 cpu serial number : system type : Tsunami system variation : Goldrush system revision : 0 system serial number : NI92204312 cycle frequency [Hz] : 500000000 timer frequency [Hz] : 1024.00 page size [bytes] : 8192 phys. address bits : 44 max. addr. space # : 255 BogoMIPS : 994.05 kernel unaligned acc : 0 (pc=0,va=0) user unaligned acc : 60 (pc=120002aa0,va=120109614) platform string : AlphaServer DS20 500 MHz CPUs probed 2 active 2 map 0x3 IPIs 2310537
--------INTEL------------------------
processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 8 model name : AMD-K6(tm) 3D processor stepping : 12 cpu MHz : 337.507214 fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mmx 3dnow bogomips : 673.38
------------mips--------------------------
cpu : MIPS cpu model : R4000SC V6.0 system type : SGI Indy BogoMIPS : 87.24 byteorder : big endian unaligned accesses : 0 wait instruction : no microsecond timers : no extra interrupt vector : no hardware watchpoint : yes VCED exceptions : 12424 VCEI exceptions : 37454
---------------m68k----------------------
Model: Amiga 3000 CPU: 68060 MMU: 68060 FPU: 68060 Clocking: 49.6MHz BogoMips: 99.32 Calibration: 49664000 loops System Memory: 73728K Chip RAM: 2048K PS Freq: 50Hz EClock Freq: 709379Hz Graphics: ECS Detected hardware: Amiga Video Blitter Amber Flicker Fixer Amiga Audio Floppy Controller SCSI Controller WD33C93 (A3000 style) Keyboard Mouse Port Serial Port Parallel Port Hardware Clock (A3000 style) Chip RAM Paula 8364 Denise 8373 Fat Hires PAL Agnus 8372 Magic Hard Rekick Zorro AutoConfig: 2 Expansion Devices
____________ \ /\ /\ / Vince Weaver \/__\/__\/ weave@eng.umd.edu http://www.glue.umd.edu/~weave
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |