x86 Family 6 Model 8 Stepping
How can i write a function that returns
the processor type and speed that will look like:
Pentium III 750 Mhz
Torgeir posted a version of this a few months back, here's a simple
rewrite I just did since I didn't look it up...
Dim wmi, wql, CPUs, CPU
Set wmi = getobject("winmgmts:")
wql = "select * from win32_processor"
Set CPUs = wmi.execquery(wql)
For Each CPU In CPUs
FamilyName = CpuIdToName(CPU.Family)
WScript.Echo CPU.CurrentClockSpeed, FamilyName
Next
Function CpuIdToName(iData)
Select Case iData
Case 0 CpuIdToName = "Other"
Case 1 CpuIdToName = "Unknown"
Case 2 CpuIdToName = "8086"
Case 3 CpuIdToName = "80286"
Case 4 CpuIdToName = "80386"
Case 5 CpuIdToName = "80486"
Case 6 CpuIdToName = "8087"
Case 7 CpuIdToName = "80287"
Case 8 CpuIdToName = "80387"
Case 9 CpuIdToName = "80487"
Case 10 CpuIdToName = "Pentium Family"
Case 11 CpuIdToName = "Pentium Pro"
Case 12 CpuIdToName = "Pentium II"
Case 13 CpuIdToName = "Pentium MMX"
Case 14 CpuIdToName = "Celeron"
Case 15 CpuIdToName = "Pentium Xeon"
Case 16 CpuIdToName = "Pentium III"
Case 17 CpuIdToName = "M1 Family"
Case 18 CpuIdToName = "M2 Family"
Case 19 CpuIdToName = "K5 Family"
Case 20 CpuIdToName = "K6 Family"
Case 21 CpuIdToName = "K6-2"
Case 22 CpuIdToName = "K6-III"
Case 23 CpuIdToName = "Athlon"
Case 24 CpuIdToName = "Power PC Family"
Case 25 CpuIdToName = "Power PC 601"
Case 26 CpuIdToName = "Power PC 603"
Case 27 CpuIdToName = "Power PC 603+"
Case 28 CpuIdToName = "Power PC 604"
Case 29 CpuIdToName = "Alpha Family"
Case 30 CpuIdToName = "MIPS Family"
Case 31 CpuIdToName = "SPARC Family"
Case 32 CpuIdToName = "68040"
Case 33 CpuIdToName = "68xxx Family"
Case 34 CpuIdToName = "68000"
Case 35 CpuIdToName = "68010"
Case 36 CpuIdToName = "68020"
Case 37 CpuIdToName = "68030"
Case 38 CpuIdToName = "Hobbit Family"
Case 39 CpuIdToName = "Weitek"
Case 40 CpuIdToName = "PA-RISC Family"
Case 41 CpuIdToName = "V30 Family"
Case 42 CpuIdToName = "Pentium Xeon"
Case 43 CpuIdToName = "AS400 Family"
Case 44 CpuIdToName = "IBM390 Family"
Case 45 CpuIdToName = "i860"
Case 46 CpuIdToName = "i960"
Case 47 CpuIdToName = "SH-3"
Case 48 CpuIdToName = "SH-4"
Case 49 CpuIdToName = "ARM"
Case 50 CpuIdToName = "StrongARM"
Case 51 CpuIdToName = "6x86"
Case 52 CpuIdToName = "MediaGX"
Case 53 CpuIdToName = "MII"
Case 54 CpuIdToName = "WinChip"
Case Else CpuIdToName = "Not in list - #" & iData
End Select
End Function
--
Please respond in the newsgroup. I've still got unread email from the
week Win95 was released, if that tells you anything.
http://www.bittnet.com/winremote
http://www.bittnet.com/scripting
"ITman" <sh...@iaa.gov.il> wrote in message
news:uJnsfUIMCHA.2088@tkmsftngp11...
> Depends on what you have installed. With WMI, you can do it pretty
> easily...
>
> Torgeir posted a version of this a few months back, here's a simple
> rewrite I just did since I didn't look it up...
>
> Dim wmi, wql, CPUs, CPU
> Set wmi = getobject("winmgmts:")
> wql = "select * from win32_processor"
> Set CPUs = wmi.execquery(wql)
> For Each CPU In CPUs
> FamilyName = CpuIdToName(CPU.Family)
> WScript.Echo CPU.CurrentClockSpeed, FamilyName
> Next
In my version of a "get CPU family" I did not use the CPU.Family method. It
looks like this property is not to be trusted, it does not return correct
numbers. I have tried both WinXP and Win2k on different types of machines, both
PIII and P4, and I mostly get returned "2" from CPU.Family. That's a "8086"
processor ;-)
Alex, what does it return for you? Could anyone else as well try the script
provided by Alex and report back the findings?
I think it is safer to analyze the Win32_Processor.Description, and map it to
the correspondending CPU family. Se my script below.
And if you don't want to/cannot use WMI, you can substitute the WMI part of the
script with a RegRead from
HKLM\Hardware\Description\System\CentralProcessor\0\Identifier. It returns
exactly the same as WMI Win32_Processor.Description.
If you do use a RegRead, note that it is only WinNT/Win2k/WinXP that returns
data in the format "x86 Family 6 Model 8 Stepping 3". Win98/WinME will return
the processor family directly, like this: "Pentium(r) II Processor". Note also
that Win95 does not have the value Identifier in registry.
Here is the script that interprets the data returned by
Win32_Processor.Description:
Select Case CpuID
Case 4
WScript.Echo "Pentium 4"
Case 3
WScript.Echo "Pentium 3"
Case 2
WScript.Echo "Pentium Pro/II or Celeron"
Case 1
WScript.Echo "Pentium or Pentium MMX"
Case Else
WScript.Echo "Unknown CPU type"
End Select
Function CpuID()
' Obtaining CPU identification using WMI
' Script author: Torgeir Bakken
' Function returns a number of type integer:
' 0 ==> Unknown CPU
' 1 ==> Pentium or Pentium MMX
' 2 ==> Pentium Pro/II or Celeron
' 3 ==> Pentium III
' 4 ==> Pentium 4
' based on this table:
' Family Model Type
' 5 < 4 Pentium
' 5 >= 4 Pentium MMX
' 6 < 3 Pentium Pro
' 6 >= 3 < 5 Pentium II
' 6 == 5 Pentium II or Celeron
' 6 == 6 Celeron
' 6 >= 7 Pentium III
'15 >= 0 Pentium 4
' Family 5 and 6 identification based on information from here:
' AP-485 Intel® Processor Identification and the CPUID Instruction
' http://www.intel.com/design/xeon/applnots/241618.htm
Dim oWMI, oCpu, sCpuDescr, aCpuDescr, i, iFamily, iModel, iVersion
Set oWMI = GetObject("winmgmts:")
For Each oCpu in oWMI.InstancesOf("Win32_Processor")
sCpuDescr = oCpu.Description
Next
aCpuDescr = Split(sCpuDescr)
For i = 0 to Ubound(aCpuDescr)
If LCase(aCpuDescr(i)) = "family" Then
iFamily = CInt(aCpuDescr(i+1))
End If
If LCase(aCpuDescr(i)) = "model" Then
iModel = CInt(aCpuDescr(i+1))
End If
Next
iVersion = (iFamily * 100) + iModel
Select Case True
Case iFamily = 5
' Pentium or Pentium MMX
CpuID = 1
Case iVersion < 607
' Pentium Pro/II or Celeron
CpuID = 2
Case iFamily = 6
' Pentium III
CpuID = 3
Case iFamily = 15
' Pentium 4
CpuID = 4
Case Else
' Unknown CPU
CpuID = 0
End Select
End Function
****************************************
The identification is based on information from here:
Intel Processor Identification and the CPUID Instruction
http://www.intel.com/design/Xeon/applnots/24161819.pdf
The original table had binary values for Family Code and Model Number, I have
converted them to decimal values.
Family Code
Model Number
Description
04 00 Intel486? DX processors
04 02 Intel486 SX processors
04 03 Intel487? processors
04 03 IntelDX2? processors
04 03 IntelDX2 OverDrive® processors
04 04 Intel486 SL processor
04 05 IntelSX2? processors
04 07 Write-Back Enhanced IntelDX2 processors
04 08 IntelDX4? processors
04 08 IntelDX4 OverDrive processors
05 01 Pentium® processors (60, 66)
05 02 Pentium processors (75, 90, 100, 120, 133, 150, 166, 200)
05 01 Pentium OverDrive processor for Pentium processor (60, 66)
05 02 Pentium OverDrive processor for Pentium processor
(75, 90, 100, 120, 133)
05 03 Pentium OverDrive processors for Intel486 processors
05 04 Pentium processor with MMX? technology (166, 200)
05 04 Pentium OverDrive processor with MMX? technology for
Pentium processor (75, 90, 100, 120, 133)
06 01 Pentium Pro processor
06 03 Pentium II processor, model 3
06 05 Pentium II processor, model 5, Pentium II Xeon processor,
model 5, and Intel Celeron processor, model 5. Note(5)
06 06 Intel Celeron processor, model 6
06 07 Pentium III processor, model 7, and Pentium III Xeon processor,
model 7. Note(6)
06 08 Pentium III processor, model 8, Pentium III Xeon processor,
model 8, and Intel Celeron processor, model 8. Note(7)
06 10 Pentium III Xeon processor, model A
06 11 Pentium III processor, model B
06 03 Intel Pentium II OverDrive processor
15 xx Intel Pentium 4 processor or Intel Xeon processor
Note:
5. To differentiate between the Pentium II processor, model 5, Pentium II Xeon
processor and the Intel Celeron processor, model 5, software should check the
cache descriptor values through executing CPUID instruction with EAX = 2. If no
L2 cache is returned, the processor is identified as an Intel Celeron processor,
model 5. If 1M or 2M L2 cache size is reported, the processor is the Pentium II
Xeon processor otherwise it is a Pentium II processor, model 5 or a Pentium II
Xeon processor with 512K L2 cache size.
6. To differentiate between the Pentium III processor, model 7 and the Pentium
III Xeon processor, model 7, software should check the cache descriptor values
through executing CPUID instruction with EAX = 2. If 1M or 2M L2 cache size is
reported, the processor is the Pentium III Xeon processor otherwise it is a
Pentium III processor or a Pentium III Xeon processor with 512K L2 cache size.
7. To differentiate between the Pentium III processor, model 8 and the Pentium
III Xeon processor, model 8, software should check the Brand ID values through
executing CPUID instruction with EAX = 1.
--
torgeir
The registry setting you point to below is reflected
in the win32 api System_Info structure:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_5r76.asp
which can be used to decode the registry value also.
- Mitch
I didn't even think about the model list when I ran my test - and my P3
shows up as an "M2"...
--
Please respond in the newsgroup. I've still got unread email from the
week Win95 was released, if that tells you anything.
http://www.bittnet.com/winremote
http://www.bittnet.com/scripting
"Michel Gallant" <neu...@istar.ca> wrote in message
news:3D3AD037...@istar.ca...
"ITman" <sh...@iaa.gov.il> wrote in message
news:uJnsfUIMCHA.2088@tkmsftngp11...
>
This minidump structure looks interesting as well:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/dbghelp_9khe.asp
- Mitch
- Mitch
> Is anyone familiar with the Intel Processor Frequency ID Utility:
> http://www.intel.com/support/processors/tools/frequencyid
> What information does it return?
Hi
Pictures of the GUI information:
http://www.intel.com/support/processors/tools/frequencyid/freqtest.htm
http://www.intel.com/support/processors/tools/frequencyid/cpuidtab.htm
I installed the utility and ran it. The results can be exported to a text file, here is the
result:
Intel(R) Processor Frequency ID Utility
Version: 4.61.20020521
TimeStamp: 2002/7/22 16:28:39
Number of processors in system: 1
Current processor: #1
Processor Name: Intel(R) Pentium(R) III Processor
CPU Type: 0
CPU Family: 6
CPU Model: 8
CPU Stepping: A
CPU Revision: 1
L1 Instruction Cache: 16 KB
L1 Data Cache: 16 KB
L2 Cache: 256 KB
Packaging: FC-PGA
MMX: Yes
SIMD: Yes
SIMD2: No
NetBurst(TM) microarchitecture: No
Reported processor Frequency: 1.0 GHz
Reported System Bus Frequency: 133 MHz
Expected processor Frequency: 1.0 GHz
Expected System Bus Frequency: 133 MHz
*************************************************************
--
torgeir
It looks like the "Family" value in Win32_Processor is not the one from the
CPUID instruction but the one from the SMBIOS specification "Processor
Family", section 3.3.5.2 of the spec. My P3 shows up as 17 (11h) which is
the correct code for a Pentium III. The most up to date values are probably
in the master.mif file on the DMTF site since that's essentially the "source
code" for all the encodings.
http://www.dmtf.org/standards/bios.php
<Alex K. Angelopoulos (MVP)> wrote in message
news:O$2QixRMCHA.1600@tkmsftngp13...
--
Please respond in the newsgroup. I've still got unread email from the
week Win95 was released, if that tells you anything.
http://www.bittnet.com/winremote
http://www.bittnet.com/scripting
"Dave Methvin" <news...@methvin.com> wrote in message
news:em0lFHaMCHA.2556@tkmsftngp11...
> If you do use a RegRead, note that it is only WinNT/Win2k/WinXP that returns
> data in the format "x86 Family 6 Model 8 Stepping 3". Win98/WinME will return
> the processor family directly, like this: "Pentium(r) II Processor". Note also
> that Win95 does not have the value Identifier in registry.
I have found that the description part is different in W9x than for NT-based OSs.
Win95 will give "CPU 0", Win98 will state the processor family name directly, e.g.
"Pentium(r) II Processor". The script need some redesign to support W9x;-)
What would be very interesting, would be to get some results from someone with AMD
or Cyrix !
If somebody could post back some AMD/Cyrix results from the script below, it would
be very nice :-)
Set oWMI = GetObject("winmgmts:")
For Each oCpu in oWMI.InstancesOf("Win32_Processor")
f = "Fam: " & oCpu.Family
d = "Desc: " & oCpu.Description
c = "Capt: " & oCpu.Caption
l = "Level: " & oCpu.Level
m = "Manufacturer: " & oCpu.Manufacturer
n = "Name: " & oCpu.Name
o = "OtherFamilyDescription: " & oCpu.OtherFamilyDescription
pty = "ProcessorType: " & oCpu.ProcessorType
v = "Version: " & oCpu.Version
Next
WScript.Echo f & vbCrLf & d & vbCrLf & c & vbCrLf & l & vbCrLf _
& m & vbCrLf & n & vbCrLf & o & vbCrLf & pty & vbCrLf & v
--
torgeir
Fam: 26
Desc: x86 Family 5 Model 6 Stepping 2
Capt: x86 Family 5 Model 6 Stepping 2
Level: 5
Manufacturer: AuthenticAMD
Name: AMD-K6 processor
OtherFamilyDescription:
ProcessorType:
Version: Model 6, Stepping 2
--
Please respond in the newsgroup so everyone may benefit.
http://www.bittnet.com/winremote
http://www.bittnet.com/scripting
"Torgeir Bakken" <Torgeir.B...@hydro.com> wrote in message
news:3D3DD5F7...@hydro.com...
"Torgeir Bakken" <Torgeir.B...@hydro.com> wrote in message
news:3D3AC958...@hydro.com...