Updated poll_device and os module to prettify output (#4740)

* Updated poll_device and os module to prettify output

* Move line return
This commit is contained in:
Neil Lathwood
2016-10-14 02:41:53 +01:00
committed by Tony Murray
parent eab4ae5ab5
commit 009281773f
2 changed files with 9 additions and 4 deletions

View File

@@ -159,7 +159,9 @@ function poll_device($device, $options)
unset($array);
$device_start = microtime(true);
// Start counting device poll time
echo $device['hostname'].' '.$device['device_id'].' '.$device['os'].' ';
echo 'Hostname: ' . $device['hostname'] . PHP_EOL;
echo 'Device ID: ' . $device['device_id'] . PHP_EOL;
echo 'OS: ' . $device['os'];
$ip = dnslookup($device);
if (!empty($ip) && $ip != inet6_ntop($device['ip'])) {
@@ -170,10 +172,10 @@ function poll_device($device, $options)
if ($config['os'][$device['os']]['group']) {
$device['os_group'] = $config['os'][$device['os']]['group'];
echo '('.$device['os_group'].')';
echo ' ('.$device['os_group'].')';
}
echo "\n";
echo PHP_EOL.PHP_EOL;
unset($poll_update);
unset($poll_update_query);