#198944 - 2010-07-02 01:16 PM
What gets queried by @CPU macro?
|
AndreasBucher
Fresh Scripter
Registered: 2010-06-22
Posts: 13
Loc: Stuttgart, Germany
|
Hi,
does anybody know what exactly is queried by the @CPU macro ?
I have people complaining about getting incorrect CPU type information listed there (they get it displayed for their information).
Checking this on some computers, I also noted that the KIX macro displays e.g. "Pentium III", while the system properties show something like "Intel Core2 Duo ..." or similar. On some other systems, the same CPU is reported by KIX and the system properties.
Therefore, there is some mismatch in this CPU information - any idea where it comes from ? It's not really serious, but it annoys the people ... :-)
Thanks a bundle !
Andreas
Edited by AndreasBucher (2010-07-02 01:17 PM)
|
Top
|
|
|
|
#198945 - 2010-07-02 01:36 PM
Re: What gets queried by @CPU macro?
[Re: AndreasBucher]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4557
Loc: USA
|
It's hard to tell where that is pulled from, but its likely it hasn't been updated in quite some time. You can use WMI though to get that info, .name shows my processor properly.
Break On
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For each $objItem in $colItems
"AddressWidth: " + $objItem.AddressWidth ?
"Architecture: " + $objItem.Architecture ?
"Availability: " + $objItem.Availability ?
"Caption: " + $objItem.Caption ?
"ConfigManagerErrorCode: " + $objItem.ConfigManagerErrorCode ?
"ConfigManagerUserConfig: " + $objItem.ConfigManagerUserConfig ?
"CpuStatus: " + $objItem.CpuStatus ?
"CreationClassName: " + $objItem.CreationClassName ?
"CurrentClockSpeed: " + $objItem.CurrentClockSpeed ?
"CurrentVoltage: " + $objItem.CurrentVoltage ?
"DataWidth: " + $objItem.DataWidth ?
"Description: " + $objItem.Description ?
"DeviceID: " + $objItem.DeviceID ?
"ErrorCleared: " + $objItem.ErrorCleared ?
"ErrorDescription: " + $objItem.ErrorDescription ?
"ExtClock: " + $objItem.ExtClock ?
"Family: " + $objItem.Family ?
"InstallDate: " + $objItem.InstallDate ?
"L2CacheSize: " + $objItem.L2CacheSize ?
"L2CacheSpeed: " + $objItem.L2CacheSpeed ?
"L3CacheSize: " + $objItem.L3CacheSize ?
"L3CacheSpeed: " + $objItem.L3CacheSpeed ?
"LastErrorCode: " + $objItem.LastErrorCode ?
"Level: " + $objItem.Level ?
"LoadPercentage: " + $objItem.LoadPercentage ?
"Manufacturer: " + $objItem.Manufacturer ?
"MaxClockSpeed: " + $objItem.MaxClockSpeed ?
"Name: " + $objItem.Name ?
"NumberOfCores: " + $objItem.NumberOfCores ?
"NumberOfLogicalProcessors: " + $objItem.NumberOfLogicalProcessors ?
"OtherFamilyDescription: " + $objItem.OtherFamilyDescription ?
"PNPDeviceID: " + $objItem.PNPDeviceID ?
"PowerManagementCapabilities: " + $objItem.PowerManagementCapabilities ?
"PowerManagementSupported: " + $objItem.PowerManagementSupported ?
"ProcessorId: " + $objItem.ProcessorId ?
"ProcessorType: " + $objItem.ProcessorType ?
"Revision: " + $objItem.Revision ?
"Role: " + $objItem.Role ?
"SocketDesignation: " + $objItem.SocketDesignation ?
"Status: " + $objItem.Status ?
"StatusInfo: " + $objItem.StatusInfo ?
"Stepping: " + $objItem.Stepping ?
"SystemCreationClassName: " + $objItem.SystemCreationClassName ?
"SystemName: " + $objItem.SystemName ?
"UniqueId: " + $objItem.UniqueId ?
"UpgradeMethod: " + $objItem.UpgradeMethod ?
"Version: " + $objItem.Version ?
"VoltageCaps: " + $objItem.VoltageCaps ?
?
Next
? 'Press Any Key to close the window'
get $
|
Top
|
|
|
|
#198946 - 2010-07-02 05:26 PM
Re: What gets queried by @CPU macro?
[Re: Allen]
|
eriqjaffe
Hey THIS is FUN
Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
|
Actually, the "Intel Pentium III" thing on newer processors is a Microsoft bug that affects XP/2003. They have a hotfix available for it, though.
http://support.microsoft.com/kb/953955
|
Top
|
|
|
|
#198996 - 2010-07-13 10:20 AM
Re: What gets queried by @CPU macro?
[Re: eriqjaffe]
|
AndreasBucher
Fresh Scripter
Registered: 2010-06-22
Posts: 13
Loc: Stuttgart, Germany
|
Hi,
thanks for the hint about WMI queries and the KB - that's exactly what I wanted to know about.
We are suffering from this "issue" addressed in the KB as well, because SCCM reports either none or incorrect CPU names, which is especially anoying in management reports and dashboards - it ruins all the nice statistics ... :-)
Btw, there's a second KB related to that: http://support.microsoft.com/kb/946554 This one fixes Celeron issues, while the other one fixes Core2Duo.
The sad thing is: Even with both patches installed (and the WMI query returning the correct value), KIX @CPU still reports "Intel Pentium III" ... so the question remains: Where does KIX dig up that ? It doesn't seem to use WMI queries, because it even returns a result when WMI is not running or damaged (see below).
And: Theoretically, yes, of course, the "easiest" would be to replace @CPU with the WMI query for Win32_Processor and .Name - but this just replaces something bad with something worse. IMHO, WMI is a nightmare in itself, because it can become damaged or inconsistent to any extent. That's the next thing I am having a big pain with: Damaged WMI (and I am not talking about 10 computers ...) - hot to detect and auto-repair.
So, my intention was to try to do as less as possible with WMI, and that was the reason for using @CPU and asking where from and how it gets it's result.
Andreas
Edited by AndreasBucher (2010-07-13 10:24 AM)
_________________________
King regards,
Andreas
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 633 anonymous users online.
|
|
|