mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
6ac8b1ff80
git-svn-id: http://www.observium.org/svn/observer/trunk@2177 61d68cd4-352d-0410-923a-c4978735b2b8
15 lines
627 B
PHP
15 lines
627 B
PHP
|
|
<?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." )" : ""));
|
|
|
|
?>
|