[Icecast] script to link error.log and access.log for the purpose of finding the name of a disconnected feed
    Rene Christensen Dokbua 
    rene at dokbua.com
       
    Mon Jul  8 07:52:17 UTC 2013
    
    
  
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/ && /SOURCE/ } <$AL>;
        close($AL);
        print @lines;
    }
}
close($EL);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20130708/57b941db/attachment.htm>
    
    
More information about the Icecast
mailing list