On Thu, Mar 31, 2016 at 11:46:53PM +1300, Simon Lyall wrote: > I'm looking for a tool that might handle this nicely. > > I have some asterisk log files that are generated by daemontools' > multilog. The problem is that daemontools rotates logs every few > minutes at the volumes I do so a single call can be scattered across > several files. Total files might be a few GB. >
Two sideways possibilities occur to me. First, you can tune multilog to produce fewer files, at the cost of leaving them open longer and keeping them in RAM. Unless you're already at s16777215, of course. Then you can do a search like: grep -A20 -H $phonenumber $( ls -t |head ) Second, you might want to send all of the logs off of the asterisk box and over to a syslog server, where you can set the file size or time for log rotation to exactly what you want. You could also run a parser over this to bring all the information related to a single call together. Do you need to debug calls more than a day or two old? -dsr- _______________________________________________ Tech mailing list Tech@lists.lopsa.org https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/