/[cricket]/parse_iptraf.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /parse_iptraf.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Mon May 20 16:00:03 2002 UTC revision 1.3 by dpavlin, Mon May 20 16:31:01 2002 UTC
# Line 38  close(LOG); Line 38  close(LOG);
38    
39  foreach my $port (@PORTS) {  foreach my $port (@PORTS) {
40          print @{$hash{$port}}[0] || 0,"\n",@{$hash{$port}}[1] || 0,"\n";          print @{$hash{$port}}[0] || 0,"\n",@{$hash{$port}}[1] || 0,"\n";
41            delete $hash{$port};
42  }  }
43    
44    my ($sum_in,$sum_out) = (0,0);
45    
46    foreach my $port (keys %hash) {
47            $sum_in+=@{$hash{$port}}[0];
48            $sum_out+=@{$hash{$port}}[1];
49    }
50    print "$sum_in\n$sum_out\n";

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26