Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20598

Re: Modify a top ten display to include a downtime count

$
0
0

How about something like this, you can choose how you display..

 

select NodeID,IP_Address,Caption,Status, StatusLED, LastSystemUpTimePollUtc,

DATEDIFF(mi,LastSystemUpTimePollUtc,GETDATE())% 60 as MinsDown,

DATEDIFF(hh,LastSystemUpTimePollUtc,GETDATE())% 24 as HoursDown,

DATEDIFF(d,LastSystemUpTimePollUtc,GETDATE())as DaysDown,

--OR

convert(varchar(10),DATEDIFF(d,LastSystemUpTimePollUtc,GETDATE()))+':'+

convert(varchar(10),DATEDIFF(hh,LastSystemUpTimePollUtc,GETDATE())% 24 )+':'+

convert(varchar(10),DATEDIFF(mi,LastSystemUpTimePollUtc,GETDATE())% 60)as'DD:HH:MM:SS',

--OR

convert(varchar(10),(DATEDIFF(d,LastSystemUpTimePollUtc,GETDATE())))+' Days '+

convert(varchar(10),(DATEDIFF(hh,LastSystemUpTimePollUtc,GETDATE())% 24 ))+' Hours '+

convert(varchar(10),(DATEDIFF(mi,LastSystemUpTimePollUtc,GETDATE())% 60))+' Mins 'as'DD:HH:MM:SS'

from nodes

where StatusLED ='down.gif'

 


Viewing all articles
Browse latest Browse all 20598

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>