<%@ LANGUAGE="VBScript" %> <% timedate=Request("timedate") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If timedate="" Then SQLStmtX = " select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') timedate from dual " Set RSX = Connection.Execute(SQLStmtX) timedate = CStr(RSX("timedate")) End If ' response.write(SQLStmtX) If Not IsDate(timedate) Then message="Wrong Time/Date format " & timedate %> <% End If timedate_par=replace(timedate," ","%20") %> FEC Supply Status

FEC Supply Status <%=timedate%>


(Hint: to get most recent time/date clear the window and push refresh button)
This web page looks only at data taken up to 2 days before the specified date, if the last data is older than 2 days it will not show up here

Back to monitoring Page



<% SQLStmt = " select to_char(ft.logdate,'MM/DD/YYYY HH24:MI:SS') ddate,ft.node_id,error_flag,out_time, " SQLStmt = SQLStmt & " 24*60*(to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-ft.logdate) ddif, " SQLStmt = SQLStmt & " to_char(vpos6,'0.00') vpos6,to_char(ipos6,'90.00') ipos6,to_char(vneg6,'0.00') vneg6,to_char(ineg6,'90.00') ineg6, " SQLStmt = SQLStmt & " to_char(vpos3,'0.00') vpos3,to_char(ipos3,'90.00') ipos3,to_char(vneg3,'0.00') vneg3,to_char(ineg3,'90.00') ineg3, " SQLStmt = SQLStmt & " fan_int1,fan_int2,fan_ext1,fan_ext2,temp,to_char(hv_volt,'999') hv_volt,hv_curr " SQLStmt = SQLStmt & " from phoffline.fec_supply ft, " SQLStmt = SQLStmt & " (select max(logdate) logdate,max(node_id) node_id " SQLStmt = SQLStmt & " from phoffline.fec_supply " SQLStmt = SQLStmt & " where logdate between to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-2 and to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS') " SQLStmt = SQLStmt & " group by node_id) pt " SQLStmt = SQLStmt & " where ft.logdate=pt.logdate and ft.node_id=pt.node_id " SQLStmt = SQLStmt & " order by ft.node_id " Set RS = Connection.Execute(SQLStmt) ' response.write(SQLStmt) %>

<% Do While Not RS.EOF Select Case CInt(RS("node_id")) Case 0 crate_name="N Ring" Case 1 crate_name="N Spect, Bot" Case 2 crate_name="N Spect, Top" Case 3 crate_name="Oct & Vert" Case 4 crate_name="P Ring " Case 5 crate_name="P Spect, Bot" Case Else crate_name="Unknown " End Select %> <% RS.Movenext Loop %>
System Graph Last DB write +6V +3.3V -3.3V -6V Bias Temp Fans Status
      V I V I V I V I V I [C] int1 int2 ext1 ext2  
<%=crate_name%>

&days=2">Time-dependent graph

<% If CDbl(RS("ddif"))<=30 Then 'measurement is less than 30 minutes old Response.write("" & CStr(RS("ddate")) & "") Else Response.write("" & CStr(RS("ddate")) & "") End If %> <%=RS("vpos6")%> <%=RS("ipos6")%> <%=RS("vpos3")%> <%=RS("ipos3")%> <%=RS("vneg3")%> <%=RS("ineg3")%> <%=RS("vneg6")%> <%=RS("ineg6")%> <%=RS("hv_volt")%> <%=RS("hv_curr")%> <%=RS("temp")%> <%=RS("fan_int1")%> <%=RS("fan_int2")%> <%=RS("fan_ext1")%> <%=RS("fan_ext2")%> <% If RS("error_flag")="0" And RS("out_time")="0" Then Response.write("OK") Elseif Not RS("error_flag")="0" Then Response.write("Error") Else Response.write("Stale") End If %>
<% Connection.Close Set RS=nothing Set Connection=nothing %>