NumberOfCores - Mof Edit

By Request, in win32_processor, for the newer operating systems (Server 2008 and newer, Vista and newer), there are 2 additional WMI Attributes of "NumberOfCores" and "NumberofLogicalProcessors".  Since you should leave the default sms_processor class alone in the existing sms_def.mof (because otherwise you'll break the client's ability to use it to report), to get those additional attributes try this custom mof edit.  Add it to the bottom of your sms_def.mof in inboxes\clifiles.src\hinv.  It will work for both SMS2003 and ConfigMgr07.  If you are on SMS2003, there is no need to "mofcomp" this on your clients--it's a WMI edit.  If you're clients have these attributes already in WMI, they will report them, if not--they won't. 

Edit: Jennifer Socha found that if you need this information reported by your Windows 2003 servers, implement KB932270 on those servers, so those servers can successfully report this information.  Great find Jenny!

Edit:  If your XP workstations are misreporting, apply http://support.microsoft.com/kb/936235 to them to get this information reported correctly.

// Sherry Kissinger 5-19-09
// Not available on older OS', expect failures on those OS'
// Do NOT change to "false" the existing sms_processor class.

[ SMS_Report (TRUE),
  SMS_Group_Name ("Processor_Addtl"),
  SMS_Class_ID  ("CUSTOM|Processor_Addtl|1.0")]

class win32_processor : SMS_Class_Template
{
    [SMS_Report (FALSE)     ]   uint16     AddressWidth;
    [SMS_Report (FALSE)     ]   uint16     Architecture;
    [SMS_Report (FALSE)     ]   uint16     Availability;
    [SMS_Report (FALSE)     ]   string     Caption;
    [SMS_Report (FALSE)     ]   uint32     ConfigManagerErrorCode;
    [SMS_Report (FALSE)     ]   boolean    ConfigManagerUserConfig;
    [SMS_Report (FALSE)     ]   uint16     CpuStatus;
    [SMS_Report (FALSE)     ]   uint32     CurrentClockSpeed;
    [SMS_Report (FALSE)     ]   uint16     CurrentVoltage;
    [SMS_Report (FALSE)     ]   uint16     DataWidth;
    [SMS_Report (FALSE)     ]   string     Description;
    [SMS_Report (TRUE), key ]   string     DeviceID;
    [SMS_Report (FALSE)     ]   boolean    ErrorCleared;
    [SMS_Report (FALSE)     ]   string     ErrorDescription;
    [SMS_Report (FALSE)     ]   uint32     ExtClock;
    [SMS_Report (FALSE)     ]   uint16     Family;
    [SMS_Report (FALSE)     ]   datetime   InstallDate;
    [SMS_Report (FALSE)     ]   uint32     L2CacheSize;
    [SMS_Report (FALSE)     ]   uint32     L2CacheSpeed;
    [SMS_Report (FALSE)     ]   uint32     LastErrorCode;
    [SMS_Report (FALSE)     ]   uint16     Level;
    [SMS_Report (FALSE)     ]   uint16     LoadPercentage;
    [SMS_Report (FALSE)     ]   string     Manufacturer;
    [SMS_Report (FALSE)     ]   uint32     MaxClockSpeed;
    [SMS_Report (FALSE)     ]   string     Name;
    [SMS_Report (TRUE)      ]   uint32     NumberOfCores;
    [SMS_Report (TRUE)      ]   uint32     NumberOfLogicalProcessors;
    [SMS_Report (FALSE)     ]   string     OtherFamilyDescription;
    [SMS_Report (FALSE)     ]   string     PNPDeviceID;
    [SMS_Report (FALSE)     ]   uint16     PowerManagementCapabilities[];
    [SMS_Report (FALSE)     ]   boolean    PowerManagementSupported;
    [SMS_Report (FALSE)     ]   string     ProcessorId;
    [SMS_Report (FALSE)     ]   uint16     ProcessorType;
    [SMS_Report (FALSE)     ]   uint16     Revision;
    [SMS_Report (FALSE)     ]   string     Role;
    [SMS_Report (FALSE)     ]   string     SocketDesignation;
    [SMS_Report (FALSE)     ]   string     Status;
    [SMS_Report (FALSE)     ]   uint16     StatusInfo;
    [SMS_Report (FALSE)     ]   string     Stepping;
    [SMS_Report (FALSE)     ]   string     SystemName;
    [SMS_Report (FALSE)     ]   string     UniqueId;
    [SMS_Report (FALSE)     ]   uint16     UpgradeMethod;
    [SMS_Report (FALSE)     ]   string     Version;
    [SMS_Report (FALSE)     ]   uint32     VoltageCaps;
}; 

 -------------------------------

Sample report for "Processor Information Details for a specific computer"

 SELECT 
   SYS.Netbios_Name0, 
   Processor.Name0, 
   Processor.NormSpeed0 as [CPU Speed], 
   Processor.DeviceID0, 
   ProcAddtl.NumberOfCores0 as [Number of Cores], 
   ProcAddtl.NumberOfLogicalProcessors0 as [Number of Logical Processors]
  FROM v_R_System SYS
   JOIN v_GS_PROCESSOR Processor on SYS.ResourceID=Processor.ResourceID
   left join v_gs_Processor_Addtl0 as ProcAddtl on Processor.ResourceID = ProcAddtl.ResourceID
  WHERE SYS.Netbios_Name0 LIKE @variable

.... where you would have a prompt for "variable" with this as the prompt sql: 

 begin
  if (@__filterwildcard = '')
   SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS ORDER By SYS.Netbios_Name0
  else
   SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS 
   WHERE SYS.Netbios_Name0 like @__filterwildcard
   ORDER By SYS.Netbios_Name0
 end

 

Published Tuesday, May 19, 2009 7:56 PM by skissinger

Comments

No Comments