mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
updates
git-svn-id: http://www.observium.org/svn/observer/trunk@528 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -34,5 +34,6 @@ if (!is_file($cpurrd)) {
|
||||
|
||||
shell_exec($config['rrdtool'] . " update $cpurrd N:$cpu_usage");
|
||||
|
||||
include("hr-mib.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -25,19 +25,25 @@
|
||||
|
||||
$ifmib_oids = array_merge($data_oids, $stat_oids);
|
||||
|
||||
if(count($ifmib_oids) > (count($ports)*2.5)) { /// If there are 2.5x more interfaces than OIDs, do per-OID
|
||||
$sub_start = utime();
|
||||
echo("Caching Ports: ");
|
||||
foreach($ports as $port) { echo("$port "); $array = snmp_cache_port_oids($ifmib_oids, $port, $device, $array, "IF-MIB"); }
|
||||
$end = utime(); $run = $end - $sub_start; $proctime = substr($run, 0, 5);
|
||||
#echo("\n$proctime secs\n");
|
||||
} else {
|
||||
$sub_start = utime();
|
||||
echo("Caching Oids: ");
|
||||
foreach ($ifmib_oids as $oid) { echo("$oid "); $array = snmp_cache_oid($oid, $device, $array, "IF-MIB"); }
|
||||
$end = utime(); $run = $end - $sub_start; $proctime = substr($run, 0, 5);
|
||||
#echo("\n$proctime secs\n");
|
||||
}
|
||||
# if(count($ifmib_oids) > (count($ports)*2.5)) { /// If there are 2.5x more interfaces than OIDs, do per-OID
|
||||
# $sub_start = utime();
|
||||
# echo("Caching Ports: ");
|
||||
# foreach($ports as $port) { echo("$port "); $array = snmp_cache_port_oids($ifmib_oids, $port, $device, $array, "IF-MIB"); }
|
||||
# $end = utime(); $run = $end - $sub_start; $proctime = substr($run, 0, 5);
|
||||
# #echo("\n$proctime secs\n");
|
||||
# } else {
|
||||
# $sub_start = utime();
|
||||
# echo("Caching Oids: ");
|
||||
# foreach ($ifmib_oids as $oid) { echo("$oid "); $array = snmp_cache_oid($oid, $device, $array, "IF-MIB"); }
|
||||
# $end = utime(); $run = $end - $sub_start; $proctime = substr($run, 0, 5);
|
||||
# #echo("\n$proctime secs\n");
|
||||
# }
|
||||
|
||||
$ifmib_oids = array('ifentry', 'ifxentry');
|
||||
|
||||
echo("Caching Oids: ");
|
||||
foreach ($ifmib_oids as $oid) { echo("$oid "); $array = snmp_cache_oid($oid, $device, $array, "IF-MIB");}
|
||||
echo("\n");
|
||||
|
||||
#foreach ($etherlike_oids as $oid) { $array = snmp_cache_oid($oid, $device, $array, "EtherLike-MIB"); }
|
||||
#foreach ($cisco_oids as $oid) { $array = snmp_cache_oid($oid, $device, $array, "OLD-CISCO-INTERFACES-MIB"); }
|
||||
|
||||
Reference in New Issue
Block a user