I've been tasked with trying to create a report that counts number of cores and logical processors. Using the info from here http://www.madanmohan.com/2012/11/get-number-of-cores-and-logical.html, I have added the following to the bottom of the sms_def.mof file after making a backup of it:
I did a mofcomp on the sms_def.mof file afterwards. I'm trying to build the report using the report syntax on that link but it clearly doesn't find the Processor_Addtl table. Is there a step I am failing to complete in my ineptness? What other steps do I need to do to have this show in say sql server to test the data?
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
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi guys,
I've been tasked with trying to create a report that counts number of cores and logical processors. Using the info from here http://www.madanmohan.com/2012/11/get-number-of-cores-and-logical.html, I have added the following to the bottom of the sms_def.mof file after making a backup of it:
[ 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;
};
I did a mofcomp on the sms_def.mof file afterwards. I'm trying to build the report using the report syntax on that link but it clearly doesn't find the Processor_Addtl table. Is there a step I am failing to complete in my ineptness? What other steps do I need to do to have this show in say sql server to test the data?
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
Any help would be great. Thanks!
Share this post
Link to post
Share on other sites