Page 1 of 1 1
Topic Options
#198944 - 2010-07-02 01:16 PM What gets queried by @CPU macro?
AndreasBucher Offline
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 Administrator Offline
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.


 Code:
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 Offline
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 Offline
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
#198998 - 2010-07-13 10:55 AM Re: What gets queried by @CPU macro? [Re: AndreasBucher]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Ok. A small recap of the issue has been posted in Suggestions.
Hoping Ruud will visit korg soon and maybe he can explain what is going on.

See: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=198999


Edited by Mart (2010-07-13 10:58 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 676 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.053 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org