Remove all unneeded if($debug)-statements and replace them with d_echo . discovery dir..

This commit is contained in:
Mark Schouten
2015-08-21 16:10:01 +02:00
parent 4fa88bb928
commit 677a4f3f5f
89 changed files with 192 additions and 561 deletions
+5 -14
View File
@@ -2,9 +2,7 @@
if ($device['os'] == 'apc') {
$oids = snmp_get($device, '1.3.6.1.4.1.318.1.1.1.2.2.2.0', '-OsqnU', '');
if ($debug) {
echo $oids."\n";
}
d_echo($oids."\n");
if ($oids) {
echo 'APC UPS Internal ';
@@ -77,10 +75,8 @@ if ($device['os'] == 'apc') {
$set_oids = snmp_get($device, '1.3.6.1.4.1.318.1.1.13.2.2.4.0', '-OsqnU', '');
$oids = snmp_get($device, '1.3.6.1.4.1.318.1.1.13.2.2.10.0', '-OsqnU', '');
if ($debug) {
echo $set_oids."\n";
echo $oids."\n";
}
d_echo($oids."\n");
d_echo($set_oids."\n");
if ($oids !== false) {
echo 'APC Portable Supply Temp ';
@@ -103,9 +99,7 @@ if ($device['os'] == 'apc') {
unset($oids);
$oids = snmp_get($device, '1.3.6.1.4.1.318.1.1.13.2.2.12.0', '-OsqnU', '');
if ($debug) {
echo $oids."\n";
}
d_echo($oids."\n");
if ($oids !== false) {
echo 'APC Portable Return Temp ';
@@ -128,10 +122,7 @@ if ($device['os'] == 'apc') {
unset($oids);
$oids = snmp_get($device, '1.3.6.1.4.1.318.1.1.13.2.2.14.0', '-OsqnU', '');
if ($debug) {
echo $oids."\n";
}
d_echo($oids."\n");
if ($oids !== false) {
echo 'APC Portable Remote Temp ';
list($oid,$current_raw) = explode(' ', $oids);