<%
'Only write since-date if it's been down
If > 0 then Response.Write("since ")
%> |
|
|
Last: Avg:
Max: Min:
">
Up: Down: |
<%
'Reset our variables
intResponse = -1
intFullSize = 0
intStart = 0
intEnd = 0
strResponse = "0"
'Get the check response from ServersAlive
strResponse = ""
intFullSize = 100
strResponse = ""
intFullSize = 100
strResponse = ""
strRemark = ""
'Strip words out of the check response for diskspace checks
If inStr(2, strResponse," ") and intResponse = -1 then
strResponse = LEFT(strResponse, inStr(2, strResponse," ")-1)
intResponse = cdbl(strResponse) + intResponse
'Strip percent signs out of the check response for ping checks
elseif inStr(strResponse,"%") then
intResponse = cdbl(Replace(strResponse, "%", "")) + intResponse
End If
'Get the full size if the user overrode it. Required for diskspace checks.
if inStr(strRemark,"{") then
intStart = inStr(1,strRemark,"{")
intEnd = inStr(1,strRemark,"}")
end if
If intStart > 0 AND intEnd > 0 then
intFullSize = cdbl(Mid(strRemark,intStart+1,(intEnd-intStart-1)))
end if
'If both the response and the full size are set up, render the graph
If intResponse <> -1 and intFullSize > 0 then
intGreen = Round(intResponse / intFullSize * 100,0)
intRed = 100 - intGreen
Response.Write(" ")
Response.Write(" ")
End If
%>
|
|