/[cricket]/parse_bind9stat.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_bind9stat.pl

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

revision 1.5 by dpavlin, Wed Jul 10 22:41:01 2002 UTC revision 1.7 by dpavlin, Fri Jul 26 10:10:02 2002 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3    # Parse output from bind9 rndc stats command
4    # Dobrica Pavlinusic, <dpavlin@rot13.org>
5    # http://www.rot13.org/~dpavlin/sysadm.html
6    #
7    # Usage: parse_bind9stat.pl [/var/log/stats.dump [/usr/sbin/rndc]]
8    
9  use strict;  use strict;
10    
11  my $log = shift @ARGV || "/var/log/stats.dump";  my $log = shift @ARGV || "/var/log/stats.dump";
# Line 44  while(<DUMP>) { Line 50  while(<DUMP>) {
50          }          }
51    
52  }  }
 close(DUMP);  
53    
54  open(D,"> $delta") || die "can't open delta file '$delta' for log '$log': $!";  open(D,"> $delta") || die "can't open delta file '$delta' for log '$log': $!";
55  print D tell(DUMP);  print D tell(DUMP);
56  close(D);  close(D);
57    
58    close(DUMP);
59    
60  foreach (@counters) {  foreach (@counters) {
61          print $total{$_},"\n",$forward{$_},"\n",$reverse{$_},"\n";          print $total{$_},"\n",$forward{$_},"\n",$reverse{$_},"\n";
62  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26