postgresql netdisco device_port total up & down port number queries
[size=undefined]
SELECT ip,port,up FROM device_port WHERE port !~ ‘[A-Z|a-z]’ORDER BY ip ASC, port ASC;
SELECT count (*) FROM device_port WHERE port !~ ‘[A-Z|a-z]’ and up=’up’;
SELECT count (*) FROM device_port WHERE port !~ ‘[A-Z|a-z]’ and up=’down’;[/size]
Mar 14