Skip to main content

The access logs shows only last hour...

Comments

11 comments

  • cPanelMichael
    Hello :) You will need to disable the following option in "Tweak Settings" under the "Stats and Logs" tab: "Delete each domain"s access logs after stats run" Keep in mind this will utilize more disk space because the log files are not deleted after the statistics generation. The other option is to leave this enabled, and instead utilize the "Archive logs in the user's home directory at the end of each stats run unless configured by the user" option. Thank you.
    0
  • postcd
    Thanks for helpfull reply, (its great how good memory and skill you got) please kindly advice me more regarding this issue. In Tweak settings are options: 1) Option: "Delete each domain"s access logs after stats run" when i turn off this, it means /usr/local/apache/domlogs log files will be growing indefinatelly and i need to setup some tmpwatch on that folder? 2) Option: "Archive logs in the user's home directory at the end of each stats run unless configured by the user." When i turn off this log archiving into user accounts, will WHM auto delete already existing log files from all accounts? Or i need to setup some command/script to delete it? I found some accounts have files of total 100mb+ in /home/username/log and they are older than X months. Thx
    0
  • cPanelMichael
    ]Option: "Delete each domain"s access logs after stats run" when i turn off this, it means /usr/local/apache/domlogs log files will be growing indefinatelly and i need to setup some tmpwatch on that folder?

    Yes, but deleting the files on a cron job is not advised because you could remove data before statistics are generated from them.
    ]Option: "Archive logs in the user's home directory at the end of each stats run unless configured by the user." When i turn off this log archiving into user accounts, will WHM auto delete already existing log files from all accounts? Or i need to setup some command/script to delete it? I found some accounts have files of total 100mb+ in /home/username/log and they are older than X months.

    You have to enable "Remove the previous month's archived logs from the user's home directory at the end of each month unless configured by the user" if you want the previous month's archived logs removed. Note that users can override these options by configuring their own log archiving preferences. Thank you.
    0
  • postcd
    deleting the files on a cron job is not advised because you could remove data before statistics are generated from them.
    /usr/local/apache/domlogs are used for this generation, for which generation? or any idea how to trim these files (how many days need to be kept? You have to enable "Remove the previous month's archived logs from the user's home directory at the end of each month unless configured by the user"
    This option is grayed out when "Archive logs in the user's home directory at the end of each stats run unless configured by the user." is disabled..
    0
  • cPanelMichael
    The Apache domlogs are used for statistics generations (Awstats, Webalizer, etc). I'm not sure I fully understand your question. If you prefer to trim them, why not just enable "Delete each domain"s access logs after stats run"? Thank you.
    0
  • postcd
    because i need to keep them for a month, stats run is more frequent
    0
  • cPanelMichael
    ]This option is grayed out when "Archive logs in the user's home directory at the end of each stats run unless configured by the user." is disabled..

    Yes, you must leave that option enabled as the two are connected. Thank you.
    0
  • postcd
    I dont want to keep either enabled as per reasons i mentioned. But i asked how then i need to trim or delete domlogs access logs so it dont affect whm
    0
  • cPanelMichael
    ]I dont want to keep either enabled as per reasons i mentioned. But i asked how then i need to trim or delete domlogs access logs so it dont affect whm

    The best way to do this is to enable "Delete each domain"s access logs after stats run". You could disable that option and empty the log files manually (e.g. with a rm or echo command), but remember the data that's removed before the next statistics generation is not included in the statistics applications such as Awstats or Webalizer. Thank you.
    0
  • postcd
    Thx, will be there any error if i delete all files & folders from /usr/local/apache/domlogs ? Example adding file to /etc/cron.monthly with content: # delete domlogs contents which are older 45 days /bin/nice -n 19 tmpwatch -m 1080 /usr/local/apache/domlogs
    0
  • cPanelMichael
    You should empty the files with an "echo "" >" command instead of removing them, and keep in mind it's not recommended because you will lose some statistics data by doing so. Thank you.
    0

Please sign in to leave a comment.