Unless I'm losing it, there used to be what I thought was a standard resource called NodeUpTime Resource which appears to have been removed from v10. Sure like to know why?
I found this code in another thread from way back in 2006 that I assume may have later been adopted by SolarWinds as the NodeUpTime Resource. Has anyone adapted this code to v10 that they would care to share? I sure would like to see this resource back again.
<!--#include Virtual=/NetPerfMon/scripts/Resource.asp -->
<table width="100%" border="0" cellpadding="8" cellspacing="0">
<tr class="ViewHeader">
<td align="left" nowrap ><B>Up Time</b><td>
<% If Node Is Nothing Then %>
<td><font color="red" sizez="2"><b>A Network Node was not Selected</b></font></td>
<% Else
Set SQLResource = NetPerfMon.NewSQLResource
SQLResource.SQL="SELECT DateDiff(Second,Nodes.LastBoot,GetDate()) AS SecondsUptime FROM Nodes WHERE NodeID=" & Node.NodeID
SQLResource.Execute
Seconds = SQLResource.GetProperty("SecondsUptime")
Days = Seconds/86400
Hours = (Days - Int(Days)) * 24
Minutes = (Hours - Int(Hours)) * 60
Seconds = (Minutes - Int(Minutes)) * 60
Days = Int(Days)
Hours = Int(Hours)
Minutes = Int(Minutes)
Seconds = Int(Seconds)
%>
<td><%=Days%> Days, <%=Hours%> Hours, <%=Minutes%> Minutes, <%=Seconds%> Seconds</td>
<% End If %>
</tr>
</table>
<br>