Displaying 1 result from an estimated 1 matches for "1af21732".
Did you mean:
10.21732
2013 Jul 08
1
script to link error.log and access.log for the purpose of finding the name of a disconnected feed
My humble contribution to the project. :)
#!/usr/bin/perl -w
open my $EL, "/var/log/icecast/error.log" || die;
$| = 1;
while(my $buf = <$EL>) {
if ($buf =~ /Disconnect/) {
$_ = $buf;
s/\[|\]//g;
my @tmp = split(/ +/);
my $time = $tmp[1];
open my $AL, "/var/log/icecast/access.log" || die;
my @lines = grep { /$time/