Website stats directory filling up

Discussion in 'ISPConfig 3 Priority Support' started by Taleman, Apr 28, 2020.

Tags:
  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I just noticed a longtime client website is over quota, and the culprit is stats/ directory. It has I believe all fies ever generated, oldest ones from year 2009. How is this supposed to work, should the website statistics program (in this case AWStats) remove old files or is it on purpose that old ones are never deleted?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I know, AWStats does not clean up old stats by default, but there might be options for that. How much MB doe the stats dir has? I thought the statistics would be quite small.
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Code:
    web/stats# LANG=C du -shc .
    643M    .
    643M    total
    
    Oldest files are small, but latest ones bigger.
    Code:
    web/stats# LANG=C ls -lhS | head
    total 23M
    -rw-r--r-- 1 web312 client31 215K Apr 28 00:06 awstats.somehost.com.lasthosts.html
    -rw-r--r-- 1 web312 client31 215K Apr 28 00:06 awstats.somehost.com.allhosts.html
    -rw-r--r-- 1 web312 client31 169K Jun  2  2016 usage_201605.html
    -rw-r--r-- 1 web312 client31 168K May  2  2016 usage_201604.html
    -rw-r--r-- 1 web312 client31 166K Sep  2  2013 usage_201308.html
    -rw-r--r-- 1 web312 client31 166K Dec  2  2017 usage_201711.html
    -rw-r--r-- 1 web312 client31 166K Feb  2  2014 usage_201401.html
    -rw-r--r-- 1 web312 client31 166K Sep  2  2016 usage_201608.html
    -rw-r--r-- 1 web312 client31 165K Sep  2  2014 usage_201408.html
    
    Code:
    web/stats# LANG=C ls -lhS | tail
    -rw-r--r-- 1 web312 client31 2.1K May 13  2009 hourly_usage_200806.png
    -rw-r--r-- 1 web312 client31 2.1K Jul  1  2009 hourly_usage_200906.png
    -rw-r--r-- 1 web312 client31 2.0K May 13  2009 hourly_usage_200701.png
    -rw-r--r-- 1 web312 client31 2.0K May 13  2009 hourly_usage_200705.png
    -rw-r--r-- 1 web312 client31 2.0K Jun  1  2009 hourly_usage_200905.png
    -rw-r--r-- 1 web312 client31 2.0K May 13  2009 hourly_usage_200704.png
    -rw-r--r-- 1 web312 client31 1.9K May 13  2009 hourly_usage_200612.png
    -rw-r--r-- 1 web312 client31 1.9K May 13  2009 hourly_usage_200702.png
    -rw-r--r-- 1 web312 client31 1.9K May 13  2009 hourly_usage_200703.png
    -rw-r--r-- 1 web312 client31 1.7K May 13  2009 hourly_usage_200611.png
    
    Over 16K files, subdirectories included.
    Code:
    /web/stats# tree | wc -l
    16274
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ok, that's a lot indeed. I looked around on the net a bit and it seems that awstats has no builtin tool to safely remove old statistics, all I found is that one has to delete the old files manually.
     

Share This Page