Last updated on April 12th, 2023 at 11:55 pm
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.
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:
You can then use this to create pretty reports in SSRS or Power BI!
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.
If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.
No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.