routing overview start

git-svn-id: http://www.observium.org/svn/observer/trunk@2177 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-27 02:03:33 +00:00
parent 9329a6ac9c
commit 6ac8b1ff80
3 changed files with 33 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
<?php
echo("<strong>AS".$device['bgpLocalAs']."</strong>");
echo("<br />");
$total = mysql_result(mysql_query("SELECT count(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."'"),0);
$up = mysql_result(mysql_query("SELECT count(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."' AND `bgpPeerState` = 'established'"),0);
$stop = mysql_result(mysql_query("SELECT count(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."' AND `bgpPeerAdminStatus` = 'stop'"),0);
echo("Sessions: ".$total." Up: ".$up." Down: ".($total-$up) . ($stop != 0 ? " ( Shutdown: ".$stop." )" : ""));
?>

View File

@@ -0,0 +1,5 @@
<?php
echo("<pre>");
print_r(mysql_fetch_assoc(mysql_query("SELECT * FROM `ospf_instances` WHERE `device_id` = '".$device['device_id']."'")));
echo("</pre>");
?>