On Wed, 31 May 2017, Daniel Tryba wrote:> On Wed, May 31, 2017 at 01:39:25PM -0700, Steve Edwards wrote: >>> What bugs you about the output format? >> >> It's been a while, but as I recollect, it included the date/timestamp in the >> file name of the 'ring buffer' which meant that each time the host was >> rebooted, dumpcap didn't know the files from the previous run should be >> deleted when they 'aged out.' > > Solvable by by writing a cleanup script that deletes files over a > specific age, just a basic find in the daily crontab: > find /path/to/captures -type f -name 'pattern*' -mtime +X -exec rm {} \;Been there, done that. Just 1 more thing for me to maintain :) -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281
> On 31/05/2017, at 3:52 PM, Steve Edwards <asterisk.org at sedwards.com> wrote: > > On Wed, 31 May 2017, Daniel Tryba wrote: > >> On Wed, May 31, 2017 at 01:39:25PM -0700, Steve Edwards wrote: >>>> What bugs you about the output format? >>> >>> It's been a while, but as I recollect, it included the date/timestamp in the >>> file name of the 'ring buffer' which meant that each time the host was >>> rebooted, dumpcap didn't know the files from the previous run should be >>> deleted when they 'aged out.' >> >> Solvable by by writing a cleanup script that deletes files over a >> specific age, just a basic find in the daily crontab: >> find /path/to/captures -type f -name 'pattern*' -mtime +X -exec rm {} \; > > Been there, done that. Just 1 more thing for me to maintain :)Easier just to use logrotate no? That's what it's designed for. -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/pabx_on_disk.php (PABX on a Disk) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170531/7be84da5/attachment.html>
On Wed, 31 May 2017, Matt Riddell wrote:> Easier just to use logrotate no?Neither dumpcap or tcpdump know what to do with a HUP (I suspect I could configure logrotate to kill dumpcap and then start another instance) but I'm still in a position to have to enable/disable the logrotate script as I change which hosts need monitoring. I know... First world problems :) -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281