%@ 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") %>
<%
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)
%>
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%> | <% 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 %> |