SMSUG.ca

...your virtual communITy
Welcome to SMSUG.ca Sign in | Join | Help
in Search

Garth Jones

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

Published Jan 20 2009, 04:01 PM by Garth
Filed under: , , ,

Comments

No Comments

This Blog

Syndication

News

Training

Powered by Community Server (Non-Commercial Edition), by Telligent Systems