Fixed the scrut coding style issues

This commit is contained in:
Neil Lathwood
2015-02-22 16:45:40 +00:00
parent 3045835093
commit a4d3c8709d
15 changed files with 29 additions and 3 deletions
+1
View File
@@ -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");
+1
View File
@@ -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) {
+1
View File
@@ -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");
+1
View File
@@ -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");
+2
View File
@@ -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);
+1
View File
@@ -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");