Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    64

    Default DomLog rotation?

    Is that possible without manually writing a script? It seems a big problem on many servesr. PLESK has it's own log rotation system. Several domains always end up breaking apache due to their 2gb log file sizes.

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You can set the logs to rotate after every stats run, which then only keeps the records since the last stats run: WHM > Tweak Settings > Delete each domain's access logs after stats run
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Mar 2004
    Posts
    117

    Default

    I have one domain on the server that is passing the 2GB filesize limit for its domlog around the 20th of each month.

    But I'd like to keep the raw logs for more than 24 hours in case I need to refer to them.

    Are there any easy ways to:
    1.) only delete/reset the domlogs when they pass say 1.5 GB in size
    2.) rotate the domlogs on a weekly basis to something like domain.ext.2 domain.ext.3 and domain.ext.4

    Or some other way to keep the log files for more than 24 hours and yet still keep them from growing beyond 2 GB?

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,931

    Default

    you could set logrotate /etc/logrotate.conf instead of cpanel doing it

    to rotate your domain logs for you then you would have your domain.com domain.com.1 domain.com.2 etc


    I use logrotate to rotate my domain SSL logs


    works just fine

  5. #5
    Member
    Join Date
    Dec 2001
    Posts
    1,558

    Default

    If you use logrotate cpanel may miss some of the information as it may be removed before the stats program gets a chance to get at it. Alternatively, you could have the logs rotate on each run and have the users save their log files via cpanel. Otherwise, put in a feature request ( enhancement ) via bugzilla.cpanel.net to allow for "on demand" and "X days till rotate".
    Beau Henderson

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,931

    Default

    If you use logrotate cpanel may miss some of the information as it may be removed before the stats program gets a chance to get at it.
    its allready there use the logschedule in add on modules and any losses would be negligible

    but I agree this needs to be a feature enhancemet to combat large log files
    Last edited by dalem; 02-27-2005 at 12:22 AM.

  7. #7
    Member
    Join Date
    Mar 2004
    Posts
    117

    Default

    Quote Originally Posted by dalem
    its allready there use the logschedule in add on modules and any losses would be negligible

    but I agree this needs to be a feature enhancemet to combat large log files
    I just installed log schedule from the cpanel addons section, but it doesn't seem to have anything to do with log rotation. It gives me a choice of which times I do not want logs to be processed - but it doesn't seem to deal at all with the actual rotation of the log files???

  8. #8
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yup there's confusion with some people here between logrotate (an OS application that rotates server logs) and logrunner (the application that cPanel uses to rotate domlogs). They're different things. Logrotate does not rotate your domlogs. Logshcedule is an addon for affecting when logrunner runs. However, the OP is talking about logrotate.

    Without seeing what logrotate is doing on the server it's difficult to know where the problem lies. You could try running it interactively and see if it is balking on a certain log file:

    /usr/sbin/logrotate -vf /etc/logrotate.conf
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  9. #9
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default

    Quote Originally Posted by chirpy
    You can set the logs to rotate after every stats run, which then only keeps the records since the last stats run: WHM > Tweak Settings > Delete each domain's access logs after stats run
    At the risk of asking a stupid question...

    Let's say I turn this option (above) on so that domain access logs are deleted after a stats run. The upside is of course that we have much smaller domlog sizes. But what are the downsides? What are the negative or side effects of doing this? What does it change as far as your average cPanel-using customer is concerned? Realistically, to what extent does it diminish the ability of a server administrator to do his/her job effectively?

    Thanks for your comments.
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  10. #10
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    This thread pretty much covers it:
    http://forums.cpanel.net/showthread.php?t=32078
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  11. #11
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default

    thanks for that chirpy. I did search first - honestly! Maybe vbulletin and others could work on a more sophisticated built-in search engine for their forums in order based on more accurate relevancy scores! :-)
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  12. #12
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Default

    Hi

    Please vote for better logrotate for domlogs and stats features and fixes.

    http://bugzilla.cpanel.net/show_bug.cgi?id=3153

    cheers
    Andy
    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

Similar Threads & Tags
Similar threads

  1. Domlog Rotation
    By sparek-3 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-06-2009, 02:49 PM
  2. domlog rotation problem.
    By Dmitry M. in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-03-2006, 01:40 AM
  3. domlog rotation: The Definitive Answer?
    By payne in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 11-23-2003, 07:33 AM
  4. Domlog Help
    By MySitesOnline in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-22-2003, 06:40 AM
  5. Domlog rotation and Webalizer Stats
    By maverick in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-03-2003, 03:42 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube