[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Analysis script for my log output
- To: aroot@ops.ietf.org
- Subject: Analysis script for my log output
- From: Harald Tveit Alvestrand <alvestrand@cisco.com>
- Date: Tue, 17 Oct 2000 08:59:03 +0200
- Delivery-date: Tue, 17 Oct 2000 00:00:15 -0700
- Envelope-to: aroot-data@psg.com
early morning
question is asked
perl falls from keyboard
#!/usr/bin/perl
#
# List changes to aroot routes
#
while (<>) {
if (/^(\S+) SUCCESS (\d+) \d+\.\d+ (\S+)/) {
$date = $1;
$hopc = $2;
$dest = $3;
# $dest =~ s/^.*\///; # remove leading router
if ($dest ne $prevdest && $dest ne "*") {
print "$date: CHANGE to $dest\n";
$prevdest = $dest;
$prevhop = $hopc;
} elsif ($prevhop != $hopc) {
print "$date: HOPS $prevhop to $hopc\n";
$prevhop = $hopc;
}
}
}
--
Harald Tveit Alvestrand, alvestrand@cisco.com
+47 41 44 29 94
Personal email: Harald@Alvestrand.no