User m-milligan has a great core/socket query that I adjusted below to fit my needs. I would like to add 2 columns to this query, but can't seem to get the syntax correct.
What would I need fro an IP Address column and a column that states whether the node is physical or virtual?
Thanks!
SELECT [Node], [OS], [OS Version], [Total CPU Sockets], [Total CPU Cores], [CPU Vendor], [CPU Cores Per Socket]
FROM
(select
N.Caption as [Node],
Max(N.AssetInventory.ServerInformation.OperatingSystem) as [OS],
Max(N.AssetInventory.ServerInformation.OSVersion) as [OS Version],
Count(N.AssetInventory.Processor.Name) as [Total CPU Sockets],
Sum(N.AssetInventory.Processor.NumberOfCores) as [Total CPU Cores],
Max(N.AssetInventory.Processor.Manufacturer) as [CPU Vendor],
Sum(N.AssetInventory.Processor.NumberOfCores)/Count(N.AssetInventory.Processor.Name) as [CPU Cores Per Socket]
FROM Orion.Nodes N
Group By N.Caption
HAVING Count(N.AssetInventory.Processor.Name) > 0
UNION
(
SELECT
H.HostName as [Node],
CASE
WHEN H.Node.AssetInventory.ServerInformation.OperatingSystem is not NULL THEN H.Node.AssetInventory.ServerInformation.OperatingSystem
ELSE 'WMware ESXi'
END as [OS],
CASE
WHEN H.Node.AssetInventory.ServerInformation.OSVersion is not null THEN H.Node.AssetInventory.ServerInformation.OSVersion
ELSE 'unknown'
END as [OS Version],
H.CpuPkgCount as [Total CPU Sockets],
H.CpuCoreCount as [Total CPU Cores],
H.ProcessorType as [CPU Vendor],
H.CpuCoreCount/CpuPkgCount as [CPU Cores Per Socket]
FROM Orion.VIM.Hosts H
)
) AS Physical
ORDER BY Physical.Node
