From 546cdc1b76b3a0bd5cc87b374d511c46e8d7db00 Mon Sep 17 00:00:00 2001 From: Thomas Casteleyn Date: Wed, 3 Apr 2024 12:10:07 +0200 Subject: [PATCH] Fix fping command to not output stderr (#8) --- src/TeemIpDiscoveryIPv4Collector.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TeemIpDiscoveryIPv4Collector.class.inc.php b/src/TeemIpDiscoveryIPv4Collector.class.inc.php index 10cb880..9367cc1 100644 --- a/src/TeemIpDiscoveryIPv4Collector.class.inc.php +++ b/src/TeemIpDiscoveryIPv4Collector.class.inc.php @@ -230,7 +230,7 @@ protected function PingIpv4Ips($sTimeStamp) Utils::Log(LOG_INFO, "Start to ping subnet: ".$sSubnetIp); // fping if available - if (isset($sFpingCmd)) exec(sprintf('%s -r1 -t%d -ga %s %s', $sFpingCmd, $iTimeOut*1000, long2ip($iIp), long2ip($iBroadcastIp-1)), $aFPingResults); + if (isset($sFpingCmd)) exec(sprintf('%s -r1 -t%d -ga %s %s 2>&1', $sFpingCmd, $iTimeOut*1000, long2ip($iIp), long2ip($iBroadcastIp-1)), $aFPingResults); while ($iIp < $iBroadcastIp) { $sIp = long2ip($iIp);