SCCM SQL Query for all server CPU information

SCCM SQL Query for all server CPU information
SCCM SQL Query for all server CPU information

Estimated reading time: 2 minutes

If you are looking for an SQL query to use against your System Center Configuration Manager database to give you the ability to report on server CPU information, this is the query for you!

You can use the below to get various information on the CPU or you can use SELECT * to bring back all information and make your own choices. We have gone for the basics of what you would normally need for a report using SSRS or Power BI. You can also then use many Power BI connectors to enhance your reports once you get the basics set up correctly.

SQL Query

SELECT
   DISTINCT(CPU.SystemName0) AS [System Name],
   CS.Manufacturer0 AS [Make],
   CS.Model0 AS [Model],
   OS.Caption0 AS [Operating System],
   CS.SystemType0 AS [Architecture],
   CPU.Name0 AS [CPU Model],
   COUNT(CPU.ResourceID) AS [Number of CPUs],
   CPU.NumberOfCores0 AS [Number of Cores per CPU],
   CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
FROM [dbo].[v_GS_PROCESSOR] CPU
   LEFT OUTER JOIN dbo.v_GS_COMPUTER_SYSTEM CS
ON CS.ResourceID = CPU.ResourceID
   LEFT OUTER JOIN dbo.v_GS_Operating_System OS
ON CS.ResourceID = OS.ResourceID
   WHERE OS.Caption0 LIKE '%server%'
GROUP BY
   CS.Manufacturer0,
   CS.Model0,
   OS.Caption0,
   CS.SystemType0,
   CPU.SystemName0,
   CPU.Name0,
   CPU.NumberOfCores0,
   CPU.NumberOfLogicalProcessors0
ORDER BY [System Name] ASC

This should then produce SQL information like this:

SQL CPU Information
SQL CPU Information

You can then use this to create pretty reports in SSRS or Power BI!

More Queries

Our full range of SQL and WQL Collection queries is available here.

Feedback

If you have any questions or feedback about this post, or if you would like us to create any queries for you, please go ahead and leave us a message below in the comments section and we will get back to you as quick as we can.

Click to rate this post!
[Total: 1 Average: 5]

Share this content:

Avatar for Andrew Armstrong

About Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 26 years. Sharing experience and knowledge whenever possible! Making IT Happen.

View all posts by Andrew Armstrong

Leave a Reply

Your email address will not be published. Required fields are marked *