On a couple of machines that SARG (Squid Access Report Generator) is installed on, the HTML files that it generates in the daily, weekly, and monthly subdirectories of /var/www/html/squid have grown to such an extent that they need pruning. These files grew so numerous that it crippled one machine when the filesystem disk space usage on /dev/hda6 topped out at 100%.
To do a quick fix, I wrote a very simple shell script that prunes files older than 90 days, after which it rebuilds the index pages.
=============================================
#!/bin/sh
find /var/www/html/squid -mtime +90 -exec rm -Rf {} \;
/usr/sbin/sarg.daily
/usr/sbin/sarg.weekly
/usr/sbin/sarg.monthly
=============================================
I suspect that SARG has some built-in feature that limits the number of HTML records it generates, or automagically prunes these files to some pre-defined value. Does anyone know if SARG has anything like this?
TIA,
-MD