Version 1

    Hi,

    We had a situation where we needed a core count, operating system, and node name (can anyone guess why??).

    Sadly, Solarwinds NPM does not store core count in database but it is calculated so we made custom SQL Query for this and hope it helps at least one other person out.

     

    "CPU count is not stored in database directly but it is computed from table CPUMultiLoad_Detail. There are columns NodeID and CPUIndex - so number of distinct CPUIndex values for one NodeID is equal to number of CPUs on given node."

     

    Here it is:

     

    SELECT t.*, n.Caption, N.MachineType

    FROM (

    SELECT NodeID, COUNT(DISTINCT CPUIndex) AS CPUS

    FROM CPUMultiLoad_Detail AS cpu WITH(NOLOCK)

    GROUP BY NodeID) AS T

           INNER JOIN NodesData AS N

    ON T.NodeID = n.NodeID

     

    Your mileage may vary.

    Happy SQL!!!!!!!!!!!!