ScrewTurn Wiki
Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
public.getmanagedoutageforintfinwindow_(function)
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- valign="top" | '''Function''' | public.getmanagedoutageforintfinwindow |} === Source === {{{{<nowiki> CREATE OR REPLACE FUNCTION public.getmanagedoutageforintfinwindow(integer, character varying, timestamp without time zone, timestamp without time zone) RETURNS double precision LANGUAGE plpgsql AS $function$ DECLARE nid ALIAS FOR $1; ipid ALIAS FOR $2; xtime ALIAS FOR $3; ytime ALIAS FOR $4; downtime float8 := 0.0; orec RECORD; BEGIN FOR orec IN SELECT distinct ifservices.nodeid, ifservices.ipaddr, ifservices.serviceid FROM ipinterface, ifservices where ifservices.nodeid = nid AND ifservices.ipaddr = ipid AND ipinterface.nodeid = nid AND ipinterface.ipaddr = ipid AND ipinterface.ismanaged = 'M' AND ifservices.status = 'A' LOOP BEGIN downtime := downtime + getOutageTimeInWindow( orec.nodeid, orec.ipaddr, orec.serviceid, xtime, ytime); END; END LOOP; RETURN downtime; END; $function$ </nowiki>}}}}
ScrewTurn Wiki version 2.0.36. Some of the icons created by
FamFamFam
.