Server Uptime

Select
    cs.Name0,
    DateDiff(hour,os.LastBootUpTime0,ws.LastHWScan) as ‘Uptime (in Hours)’,
    os.LastBootUpTime0 as ‘Last Reboot Date/Time’,
    ws.LastHWScan as ‘Last Hardware Inventory’
From
    dbo.v_GS_WORKSTATION_STATUS ws     Left Outer Join dbo.v_GS_Operating_System os on ws.ResourceID = os.ResourceID  
    left outer join dbo.v_GS_COMPUTER_SYSTEM cs on cs.ResourceID = os.ResourceID
    left outer join dbo.v_GS_SYSTEM sys on sys.ResourceID = os.ResourceID
Where
    Sys.SystemRole0=’Server’
Order by
    Cs.Name0

Leave a Reply

Your email address will not be published. Required fields are marked *