mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
21 lines
1.4 KiB
PHP
21 lines
1.4 KiB
PHP
|
<?php
|
||
|
|
||
|
if($device['os'] == "IOS") {
|
||
|
|
||
|
$array = snmp_cache_portIfIndex ($device, $array);
|
||
|
|
||
|
$cpe_oids = array("cpeExtPsePortEnable", "cpeExtPsePortDiscoverMode", "cpeExtPsePortDeviceDetected", "cpeExtPsePortIeeePd", "cpeExtPsePortAdditionalStatus", "cpeExtPsePortPwrMax", "cpeExtPsePortPwrAllocated", "cpeExtPsePortPwrAvailable", "cpeExtPsePortPwrConsumption", "cpeExtPsePortMaxPwrDrawn", "cpeExtPsePortEntPhyIndex", "cpeExtPsePortEntPhyIndex", "cpeExtPsePortPolicingCapable", "cpeExtPsePortPolicingEnable", "cpeExtPsePortPolicingAction", "cpeExtPsePortPwrManAlloc");
|
||
|
$peth_oids = array("pethPsePortAdminEnable", "pethPsePortPowerPairsControlAbility", "pethPsePortPowerPairs", "pethPsePortDetectionStatus", "pethPsePortPowerPriority", "pethPsePortMPSAbsentCounter", "pethPsePortType", "pethPsePortPowerClassifications", "pethPsePortInvalidSignatureCounter", "pethPsePortPowerDeniedCounter", "pethPsePortOverLoadCounter", "pethPsePortShortCounter");
|
||
|
|
||
|
$sub_start = utime();
|
||
|
echo("Caching Oids: ");
|
||
|
foreach ($cpe_oids as $oid) { echo("$oid "); $array = snmp_cache_slotport_oid($oid, $device, $array, "CISCO-POWER-ETHERNET-EXT-MIB"); }
|
||
|
foreach ($peth_oids as $oid) { echo("$oid "); $array = snmp_cache_slotport_oid($oid, $device, $array, "POWER-ETHERNET-MIB"); }
|
||
|
$end = utime(); $run = $end - $sub_start; $proctime = substr($run, 0, 5);
|
||
|
echo("\n$proctime secs\n");
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
?>
|