Files
2024-10-14 00:08:40 +02:00

27 lines
948 B
Perl

#!/usr/bin/perl
if (-f $ARGV[0]) {
open FH, "<$ARGV[0]";
}
else {
die "Datei nicht gefunden \"$ARGV[0]\"\n";
}
foreach (<FH>) {
push (@LINES, $_) if($_ =~ /ALL/);
}
# Name Id Address Xervice Stream FilterIndex total rerequested lost last reset
#VEMXTR2 21002 ALL ALL ALL ALL 2677 31 0 Tue Feb 5 06:30:00 2013
printf "\n%15s | %10s | %10s | %10s | %s\n", HOST, TOTAL, RREQ, LOST, 'LAST START';
printf "---------------------------------------------------------------------------------\n";
foreach (@LINES) {
($host,$id,undef,undef,undef,undef,$total,$rreq,$lost,$date) = $_ =~ /([^\s]*) *([^\s]*) *([^\s]*) *([^\s]*) *([^\s]*) *([^\s]*) *([^\s]*) *([^\s]*) *([^\s]*) *([^\s].*)/;
printf "%15s | %10s | %10s | %10s | %s | %s\n", $host, $total, $rreq, $lost, $date, $ARGV[0];
}
close HANDLE;