fix: ubnt bad edgeswitch uptime #4470

fix: ubnt bad edgeswitch uptime #4470
This commit is contained in:
Neil Lathwood
2016-09-18 19:24:09 +01:00
committed by GitHub

View File

@@ -39,13 +39,15 @@ if (empty($uptime)) {
echo 'Using hrSystemUptime ('.$uptime."s)\n";
} else {
$uptime = floor($poll_device['sysUpTime'] / 100);
echo 'Using SNMP Agent Uptime ('.$uptime."s)\n";
echo 'Using SNMP Agent Uptime ('.$uptime."s)\n ";
}//end if
}//end if
if ($snmp_uptime > $uptime && is_numeric($snmp_uptime)) {
$uptime = $snmp_uptime;
d_echo('hrSystemUptime or sysUpTime looks like to have rolled, using snmpEngineTime instead');
if ($device["os"] != "edgeswitch") {
if ($snmp_uptime > $uptime && is_numeric($snmp_uptime)) {
$uptime = $snmp_uptime;
d_echo('hrSystemUptime or sysUpTime looks like to have rolled, using snmpEngineTime instead');
}
}
if (is_numeric($uptime)) {