aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergő2020-05-25 15:17:21 +0200
committerM.Gergő2020-05-25 15:17:21 +0200
commit82a4167c25ffea4009a01d8299156440776b1d73 (patch)
treef1ae5c8ea00a372733207948b4daeae268c29d73
parentd33ee24ff6f5face09765539376a4e6a2728b478 (diff)
downloadmunin-unifi-82a4167c25ffea4009a01d8299156440776b1d73.tar.gz
munin-unifi-82a4167c25ffea4009a01d8299156440776b1d73.zip
More debug
-rw-r--r--ubnt_unifi.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/ubnt_unifi.php b/ubnt_unifi.php
index 00edda5..2b6dfaa 100644
--- a/ubnt_unifi.php
+++ b/ubnt_unifi.php
@@ -577,13 +577,14 @@ $hosts = $hostsr;
//$test = collect_response_time($raw, "ap12.wireless.lan");
//print_r($test);
+if(!is_array($raw) /*|| empty($raw)*/ ){
+ die();
+}
if (isset($argv[1]) and $argv[1] == "config"){ // munin config
- if(!is_array($raw) || empty($raw) ){
- die();
- }
+
print_header(collect_radio_summary($raw,null));
foreach($hosts as $key => $val){
print_header(collect_radio_summary($raw,$val));
@@ -614,12 +615,12 @@ if (isset($argv[1]) and $argv[1] == "config"){ // munin config
echo "\tShared_key: ".$shm_key."\n";
echo "\tShared_mem_key".$shm."\n";
echo "\tSemaphore_key".$sf."\n";
- echo "\tFunction_exist(ftok): ".function_exists("ftok");
- echo "\tFunction_exist(shmop_open): ".function_exists("shmop_open");
- echo "\tFunction_exist(sem_get): ".function_exists("sem_get");
- echo "\tFunction_exist(pcntl_fork): ".function_exists("pcntl_fork");
- echo "\tFunction_exist(pcntl_waitpid): ".function_exists("pcntl_waitpid");
- echo "\tFunction_exist(json_encode): ".function_exists("json_encode");
+ echo "\tFunction_exist(ftok): ".function_exists("ftok")."\n";
+ echo "\tFunction_exist(shmop_open): ".function_exists("shmop_open")."\n";
+ echo "\tFunction_exist(sem_get): ".function_exists("sem_get")."\n";
+ echo "\tFunction_exist(pcntl_fork): ".function_exists("pcntl_fork")."\n";
+ echo "\tFunction_exist(pcntl_waitpid): ".function_exists("pcntl_waitpid")."\n";
+ echo "\tFunction_exist(json_encode): ".function_exists("json_encode")."\n";
echo "\nRAW\n";
print_r($raw);
@@ -628,14 +629,13 @@ if (isset($argv[1]) and $argv[1] == "config"){ // munin config
print_r(collect_netw_summary($raw,null));
print_r(collect_response_time($raw,null));
- echo "\n Print test on Controller: \n";
+ echo "\n\nHeader-Print test on Controller: \n";
print_header(collect_radio_summary($raw,null));
+ echo "\n\nData-Print test on Controller: \n";
print_data(collect_radio_summary($raw,null));
+
} else { // munin data
- if(!is_array($raw) || empty($raw) ){
- die();
- }
print_data(collect_radio_summary($raw,null));
foreach($hosts as $key => $val){
print_data(collect_radio_summary($raw,$val));