File: arpwatch

package info (click to toggle)
logwatch 5.2.2-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,112 kB
  • ctags: 42
  • sloc: perl: 9,032; sh: 65; makefile: 54
file content (24 lines) | stat: -rwxr-xr-x 592 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w
###########################################################################
# $Id: arpwatch,v 1.5 2003/12/15 18:09:23 kirk Exp $
###########################################################################

my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;

while (defined($ThisLine = <STDIN>)) {
   chomp($ThisLine);
   next if ($ThisLine eq "");
   $ARPWatch{$ThisLine}++;
}

if ( ($Detail >= 10) and (keys %ARPWatch) ) {
   print "\n";
   foreach $ThisOne (sort {$a cmp $b} keys %ARPWatch) {
      print $ThisOne . "\n";
   }
}

exit(0);

# vi: shiftwidth=3 tabstop=3 et