OSSP CVS Repository

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

ossp-pkg/snmpdx/snmpdx.d/sysVM.pm 1.9 -> 1.10

--- sysVM.pm     2003/09/20 10:33:17     1.9
+++ sysVM.pm     2004/07/28 13:00:59     1.10
@@ -49,9 +49,9 @@
         ##  sysVMActivity "/usr/bin/vmstat", add pi and po column
         ##
         if ($obj->{-name} =~ m/\.sysVMRam(Max|Used|Free)$/) {
-            my $sysVMRamMax  = undef;
-            my $sysVMRamUsed = undef;
-            my $sysVMRamFree = undef;
+            my $sysVMRamMax;
+            my $sysVMRamUsed;
+            my $sysVMRamFree;
 
             #   query system for sysctl(8) variables
             my $out = $self->{-ctx}->{-sys}->run("/sbin/sysctl -a", "1m");
@@ -81,9 +81,9 @@
             $obj->{-value} = $sysVMRamFree if ($obj->{-name} =~ m/\.sysVMRamFree$/);
         }
         elsif ($obj->{-name} =~ m/\.sysVMSwap(Max|Used|Free)$/) {
-            my $sysVMSwapMax  = undef;
-            my $sysVMSwapUsed = undef;
-            my $sysVMSwapFree = undef;
+            my $sysVMSwapMax;
+            my $sysVMSwapUsed;
+            my $sysVMSwapFree;
 
             #   determine sysVMSwapMax and sysVMSwapUsed
             my $out = $self->{-ctx}->{-sys}->run("/usr/sbin/swapinfo -k", "1m");
@@ -111,7 +111,7 @@
             $obj->{-value} = $sysVMSwapFree if ($obj->{-name} =~ m/\.sysVMSwapFree$/);
         }
         elsif ($obj->{-name} =~ m/\.sysVMActivity$/) {
-            my $sysVMActivity = undef;
+            my $sysVMActivity;
 
             my $out = $self->{-ctx}->{-sys}->run("/usr/bin/vmstat", "1m");
             my $raw = $out->{-stdout};
@@ -144,9 +144,9 @@
         ##  replaced by native Perl code to improve performance...
         ##
         if ($obj->{-name} =~ m/\.sysVMRam(Max|Used|Free)$/) {
-            my $sysVMRamMax  = undef;
-            my $sysVMRamUsed = undef;
-            my $sysVMRamFree = undef;
+            my $sysVMRamMax;
+            my $sysVMRamUsed;
+            my $sysVMRamFree;
 
             #   determine sysVMRamMax and sysVMRamUsed
             my $out = $self->{-ctx}->{-sys}->run("/bin/cat /proc/meminfo", "1m");
@@ -180,9 +180,9 @@
             $obj->{-value} = $sysVMRamFree if ($obj->{-name} =~ m/\.sysVMRamFree$/);
         }
         elsif ($obj->{-name} =~ m/\.sysVMSwap(Max|Used|Free)$/) {
-            my $sysVMSwapMax  = undef;
-            my $sysVMSwapUsed = undef;
-            my $sysVMSwapFree = undef;
+            my $sysVMSwapMax;
+            my $sysVMSwapUsed;
+            my $sysVMSwapFree;
 
             #   determine sysVMSwapMax and sysVMSwapFree
             my $out = $self->{-ctx}->{-sys}->run("/bin/cat /proc/meminfo", "1m");
@@ -205,7 +205,7 @@
             $obj->{-value} = $sysVMSwapFree if ($obj->{-name} =~ m/\.sysVMSwapFree$/);
         }
         elsif ($obj->{-name} =~ m/\.sysVMActivity$/) {
-            my $sysVMActivity = undef;
+            my $sysVMActivity;
 
             my $out = $self->{-ctx}->{-sys}->run("/usr/bin/vmstat", "1m");
             my $raw = $out->{-stdout};
@@ -233,9 +233,9 @@
         ##  sysVMActivity "/bin/vmstat", sr column
         ##
         if ($obj->{-name} =~ m/\.sysVMRam(Max|Used|Free)$/) {
-            my $sysVMRamMax  = undef;
-            my $sysVMRamUsed = undef;
-            my $sysVMRamFree = undef;
+            my $sysVMRamMax;
+            my $sysVMRamUsed;
+            my $sysVMRamFree;
 
             #   determine architecture
             my $arch = $self->{-ctx}->{-platform}->arch();
@@ -279,9 +279,9 @@
             $obj->{-value} = $sysVMRamFree if ($obj->{-name} =~ m/\.sysVMRamFree$/);
         }
         elsif ($obj->{-name} =~ m/\.sysVMSwap(Max|Used|Free)$/) {
-            my $sysVMSwapMax  = undef;
-            my $sysVMSwapUsed = undef;
-            my $sysVMSwapFree = undef;
+            my $sysVMSwapMax;
+            my $sysVMSwapUsed;
+            my $sysVMSwapFree;
 
             #   determine sysVMSwapMax, sysVMSwapFree
             my $out = $self->{-ctx}->{-sys}->run("/usr/sbin/swap -l", "1m");
@@ -290,8 +290,8 @@
             if ($raw =~ m/^\s*([^\n]*\bblocks[^\n]*\bfree[^\n]*)\n(.*)$/s) {
                 $n2i = &mkn2i(split(/\s+/, $1)) if (scalar(keys(%{$n2i})) == 0);
             }
-            my $tmpMax  = undef;
-            my $tmpFree = undef;
+            my $tmpMax;
+            my $tmpFree;
             foreach my $r (split(/\n/, $2)) {
                 if ($r =~ m/^\//) {
                     my @dat = split(/\s+/, $r);
@@ -319,7 +319,7 @@
             $obj->{-value} = $sysVMSwapFree if ($obj->{-name} =~ m/\.sysVMSwapFree$/);
         }
         elsif ($obj->{-name} =~ m/\.sysVMActivity$/) {
-            my $sysVMActivity = undef;
+            my $sysVMActivity;
 
             my $out = $self->{-ctx}->{-sys}->run("/bin/vmstat", "1m");
             my $raw = $out->{-stdout};

CVSTrac 2.0.1