OSSP CVS Repository

ossp - Check-in [5566]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5566
Date: 2004-Jul-28 15:00:59 (local)
2004-Jul-28 13:00:59 (UTC)
User:thl
Branch:
Comment: remove irrelevant assignments which perl >= 5.8.4 optimizes away anyway
Tickets:
Inspections:
Files:
ossp-pkg/snmpdx/snmpdx.d/sysVM.pm      1.9 -> 1.10     23 inserted, 23 deleted

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