mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Fixed the scrut coding style issues
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
$var = array();
|
||||
$var['mess_recv'] = (isset($stats['mess_recv']) ? $stats['mess_recv'] : "U");
|
||||
$var['mess_rejected'] = (isset($stats['mess_rejected']) ? $stats['mess_rejected'] : "U");
|
||||
$var['mess_relay'] = (isset($stats['mess_relay']) ? $stats['mess_relay'] : "U");
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
$var = array();
|
||||
$var['offset'] = (isset($ntp['offset']) ? $ntp['offset'] : "U");
|
||||
$var['frequency'] = (isset($ntp['frequency']) ? $ntp['frequency'] : "U");
|
||||
if ($newstats_style) {
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
$var = array();
|
||||
$var['stratum'] = (isset($ntpd['stratum']) ? $ntpd['stratum'] : "U");
|
||||
$var['offset'] = (isset($ntpd['offset']) ? $ntpd['offset'] : "U");
|
||||
$var['frequency'] = (isset($ntpd['frequency']) ? $ntpd['frequency'] : "U");
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
$var = array();
|
||||
$var['corrupt-packets'] = (isset($pdns['corrupt-packets']) ? $pdns['corrupt-packets'] : "U");
|
||||
$var['deferred-cache-inserts'] = (isset($pdns['deferred-cache-inserts']) ? $pdns['deferred-cache-inserts'] : "U");
|
||||
$var['deferred-cache-lookup'] = (isset($pdns['deferred-cache-lookup']) ? $pdns['deferred-cache-lookup'] : "U");
|
||||
|
||||
@@ -656,6 +656,7 @@ function outputStatistics($rra) {
|
||||
|
||||
function updateXML(&$output, &$rra) {
|
||||
global $numspike, $percent, $avgnan, $method, $total_kills;
|
||||
$new_array = array();
|
||||
|
||||
/* variance subroutine */
|
||||
$rra_num = 0;
|
||||
@@ -797,6 +798,7 @@ function debug($string) {
|
||||
|
||||
function standard_deviation($samples) {
|
||||
$sample_count = count($samples);
|
||||
$sample_square = array();
|
||||
|
||||
for ($current_sample = 0; $sample_count > $current_sample; ++$current_sample) {
|
||||
$sample_square[$current_sample] = pow($samples[$current_sample], 2);
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
function doSNMPv2($vars) {
|
||||
$res = array();
|
||||
foreach ($vars as $items=>$server) {
|
||||
$var = array();
|
||||
$var['bitrate'] = (isset($server['5']) ? (($server['5'] / 8) * 1000) : "0");
|
||||
//$var['bitrate'] = (isset($server['5']) ? ($server['5'] * 1024) : "0");
|
||||
$var['traf_in'] = (isset($server['1']) ? ($var['bitrate'] * $server['1']) : "0");
|
||||
|
||||
Reference in New Issue
Block a user