OSSP CVS Repository

ossp - Difference in ossp-pkg/snmpdx/snmpdx.d/swBind.pm versions 1.3 and 1.4
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/snmpdx/snmpdx.d/swBind.pm 1.3 -> 1.4

--- swBind.pm    2007/03/01 10:52:39     1.3
+++ swBind.pm    2007/03/01 11:16:15     1.4
@@ -40,17 +40,21 @@
     #   local workspace
     my $out; my $raw;
     my $rndc = "$openpkg/sbin/rndc";
-    my $file = "$openpkg/var/bind/named.stats"; #"statistics-file" setting in "option" section in named.conf
+    my $file = "$openpkg/var/bind/named.stats"; # "statistics-file" setting in "option" section in named.conf
 
-    ###   query status via rndc(8)
+    #   query status via rndc(8)
     $out = $self->{-ctx}->{-sys}->run("$rndc status 2>/dev/null", "1m");
     $raw = $out->{-stdout};
-    my $swBindStatusNumberOfZones = $1 if ($raw =~ m/number of zones: (\d+)/s        );
-    my $swBindStatusDebugLevel    = $1 if ($raw =~ m/debug level: (\d+)/s            );
-    my $swBindStatusXfersRunning  = $1 if ($raw =~ m/xfers running: (\d+)/s          );
-    my $swBindStatusXfersDeferred = $1 if ($raw =~ m/xfers deferred: (\d+)/s         );
-    my $swBindStatusSoaQueries    = $1 if ($raw =~ m/soa queries in progress: (\d+)/s);
-    my $swBindStatusQueryLogging  = $1 if ($raw =~ m/query logging is (^\n)+/s       );
+    my $swBindStatusNumberOfZones    = $1 if ($raw =~ m/number of zones: (\d+)/s         );
+    my $swBindStatusDebugLevel       = $1 if ($raw =~ m/debug level: (\d+)/s             );
+    my $swBindStatusXfersRunning     = $1 if ($raw =~ m/xfers running: (\d+)/s           );
+    my $swBindStatusXfersDeferred    = $1 if ($raw =~ m/xfers deferred: (\d+)/s          );
+    my $swBindStatusSoaQueries       = $1 if ($raw =~ m/soa queries in progress: (\d+)/s );
+    my $swBindStatusQueryLogging     = $1 if ($raw =~ m/query logging is (^\n)+/s        );
+    my $swBindStatusRecClientsActive = $1 if ($raw =~ m/recursive clients: (\d+)\/\d+/s  );
+    my $swBindStatusRecClientsMax    = $1 if ($raw =~ m/recursive clients: \d+\/(\d+)/s  );
+    my $swBindStatusTcpClientsActive = $1 if ($raw =~ m/tcp clients: (\d+)\/\d+/s        );
+    my $swBindStatusTcpClientsMax    = $1 if ($raw =~ m/tcp clients: \d+\/(\d+)/s        );
 
     ##   query stats via rndc(8)
     $self->{-ctx}->{-sys}->run("$rndc stats 2>/dev/null", "1m");
@@ -74,18 +78,22 @@
     my $swBindStatsFailure   = $1 if ($raw =~ m/failure (\d+)/s  );
 
     #   provide results
-    if    ($obj->{-name} =~ m|\.swBindStatusNumberOfZones$|) { $obj->{-value} = $swBindStatusNumberOfZones ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatusDebugLevel$|   ) { $obj->{-value} = $swBindStatusDebugLevel    ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatusXfersRunning$| ) { $obj->{-value} = $swBindStatusXfersRunning  ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatusXfersDeferred$|) { $obj->{-value} = $swBindStatusXfersDeferred ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatusSoaQueries$|   ) { $obj->{-value} = $swBindStatusSoaQueries    ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatusQueryLogging$| ) { $obj->{-value} = $swBindStatusQueryLogging  ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatsSuccess$|       ) { $obj->{-value} = $swBindStatsSuccess        ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatsReferral$|      ) { $obj->{-value} = $swBindStatsReferral       ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatsNxrrset$|       ) { $obj->{-value} = $swBindStatsNxrrset        ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatsNxdomain$|      ) { $obj->{-value} = $swBindStatsNxdomain       ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatsRecursion$|     ) { $obj->{-value} = $swBindStatsRecursion      ; }
-    elsif ($obj->{-name} =~ m|\.swBindStatsFailure$|       ) { $obj->{-value} = $swBindStatsFailure        ; }
+    if    ($obj->{-name} =~ m|\.swBindStatusNumberOfZones$|   ) { $obj->{-value} = $swBindStatusNumberOfZones;    }
+    elsif ($obj->{-name} =~ m|\.swBindStatusDebugLevel$|      ) { $obj->{-value} = $swBindStatusDebugLevel;       }
+    elsif ($obj->{-name} =~ m|\.swBindStatusXfersRunning$|    ) { $obj->{-value} = $swBindStatusXfersRunning;     }
+    elsif ($obj->{-name} =~ m|\.swBindStatusXfersDeferred$|   ) { $obj->{-value} = $swBindStatusXfersDeferred;    }
+    elsif ($obj->{-name} =~ m|\.swBindStatusSoaQueries$|      ) { $obj->{-value} = $swBindStatusSoaQueries;       }
+    elsif ($obj->{-name} =~ m|\.swBindStatusQueryLogging$|    ) { $obj->{-value} = $swBindStatusQueryLogging;     }
+    elsif ($obj->{-name} =~ m|\.swBindStatusRecClientsActive$|) { $obj->{-value} = $swBindStatusRecClientsActive; }
+    elsif ($obj->{-name} =~ m|\.swBindStatusRecClientsMax$|   ) { $obj->{-value} = $swBindStatusRecClientsMax;    }
+    elsif ($obj->{-name} =~ m|\.swBindStatusTcpClientsActive$|) { $obj->{-value} = $swBindStatusTcpClientsActive; }
+    elsif ($obj->{-name} =~ m|\.swBindStatusTcpClientsMax$|   ) { $obj->{-value} = $swBindStatusTcpClientsMax;    }
+    elsif ($obj->{-name} =~ m|\.swBindStatsSuccess$|          ) { $obj->{-value} = $swBindStatsSuccess;           }
+    elsif ($obj->{-name} =~ m|\.swBindStatsReferral$|         ) { $obj->{-value} = $swBindStatsReferral;          }
+    elsif ($obj->{-name} =~ m|\.swBindStatsNxrrset$|          ) { $obj->{-value} = $swBindStatsNxrrset;           }
+    elsif ($obj->{-name} =~ m|\.swBindStatsNxdomain$|         ) { $obj->{-value} = $swBindStatsNxdomain;          }
+    elsif ($obj->{-name} =~ m|\.swBindStatsRecursion$|        ) { $obj->{-value} = $swBindStatsRecursion;         }
+    elsif ($obj->{-name} =~ m|\.swBindStatsFailure$|          ) { $obj->{-value} = $swBindStatsFailure;           }
     return;
 }
 

CVSTrac 2.0.1