0 Replies Latest reply on Jan 6, 2009 10:27 AM by rdmott

    Is there a way to capture how many times a server reboots in a 7 day period?

      I am looking into the Report Writer to see if there is a way to capture how many times a server reboots in the last 7 days.  I know there is a way to show the Last Boot Date for servers.  Now, we are trying to see if we can drill deeper to see how many times a server may have rebooted in the past 7 days.  Reason for this is that the report doesn't show how many times a server that has rebooted in the past 7 days has rebooted.  This way, we can see if we have a problem node. 

       

      Here's the current SQL info:  I need to see how to get it to give a column on how many times a server has rebooted within the past 7 days.

      SELECT  TOP 10000 CONVERT(DateTime,
      LTRIM(MONTH(DateTime)) + '/01/' + LTRIM(YEAR(DateTime)),
      101) AS SummaryMonth,
      Nodes.Caption AS NodeName,
      Nodes.IP_Address AS IP_Address,
      Nodes.LastBoot AS Last_Boot,
      DATEDIFF(day, Nodes.LastBoot, getdate()) AS Days_Since_Last_Boot,
      Nodes.Vendor AS Vendor

      FROM
      Nodes INNER JOIN ResponseTime ON (Nodes.NodeID = ResponseTime.NodeID)


      WHERE
      ( DateTime BETWEEN 39767 AND 39774.6666666667 )
       AND 
      (
        (Nodes.Vendor = 'Microsoft') OR
        (Nodes.MachineType = 'Windows 2003 Domain Controller ') OR
        (Nodes.MachineType = 'Windows 2003 Server ')
       
      )


      GROUP BY CONVERT(DateTime, LTRIM(MONTH(DateTime)) + '/01/' + LTRIM(YEAR(DateTime)), 101),
      Nodes.NodeID, Nodes.VendorIcon, Nodes.Caption, Nodes.IP_Address, Nodes.LastBoot, Nodes.Vendor


      ORDER BY SummaryMonth ASC, 4 ASC