4 Replies Latest reply on Oct 6, 2016 2:12 AM by aqeel73

    How to insert CPU Count in report


      Hi, I have build a SQL report for CPU information i,e Node, Avg CPU, Peak CPU, CPU Load. I want to add No. OF CPUs per server as well. SQL query for the report is :

      SELECT  TOP 10000 CONVERT(DateTime,

      LTRIM(MONTH(DateTime)) + '/01/' + LTRIM(YEAR(DateTime)),

      101) AS SummaryMonth,

      Nodes.NodeID AS NodeID,

      Nodes.Caption AS NodeName,

      AVG(CPULoad.AvgLoad) AS AVERAGE_of_AvgCPULoad,

      MAX(CPULoad.MaxLoad) AS MAX_of_MaxCPULoad,

      MAX(Nodes.CPULoad) AS MAX_of_CPULoad,



      Nodes INNER JOIN CPULoad ON (Nodes.NodeID = CPULoad.NodeID)




      ( DateTime BETWEEN 42581 AND 42611.9999884259 )



        (Nodes.Department = 'Systems Department')



      GROUP BY CONVERT(DateTime, LTRIM(MONTH(DateTime)) + '/01/' + LTRIM(YEAR(DateTime)), 101),

      Nodes.NodeID, Nodes.Caption


      ORDER BY SummaryMonth ASC, 3 ASC


      I found SQL code for CPU count in some thread but dont know how to insert it on existing code,

      Select COUNT(DISTINCT CPUIndex) As "Number Of Cores"

      FROM CPUMultiLoad_Detail CPU WITH(NOLOCK)

      JOIN Nodes N ON CPU.NodeID = N.NodeID

      GROUP BY


      Order By



      I could not find a single specific guide on Orion SQL .