large log files

Discussion in 'General' started by sygram, Jul 22, 2011.

  1. sygram

    sygram New Member

    Hi there,

    i have noticed that in few websites the log folder is 2.6G . Most of web.log files are larger than 250MB. Is there a way to limit the level of logging ? I believe this will effect stats right ? What is the common practice ?


  2. falko

    falko Super Moderator ISPConfig Developer

    You can delete old, unused log files to free space.
  3. make-fun

    make-fun Member

    If you wanna keep older logs and they are not compressed — like on many Ubuntu 8.04 — you can run this script.

    I just call it from cron, every 2nd of the month and save the output in a logfile.
    # Compressing all log files in User Web
    # Script takes Month as parameter
    # like: ./ 01
    for i in  `find /var/www/web*/log/20*/$1/*.log`
    echo "
    echo "Filesize:         "  `du -h $i`
    echo "Compressing File..."
    gzip $i
    echo "New Filesize:             "  `du -h $newFile`
    echo "__________________________________________________________________________"
    Adjust it to YOUR needs!


Share This Page