apache raw log files??remove automatically

section31

Active Member
Sep 3, 2003
33
0
156
San Antonio
HI, in whm is there an option to have apache raw log files delete after 1 day or so. What is the default? If you can't do it through whm, please let me know how. I found the logfiles here -->> /usr/local/apache/domlogs
Some of them got really huge...and I want to have these deleted after a day or so.

Thanks
Dave

cPanel.net Support Ticket Number:
 

section31

Active Member
Sep 3, 2003
33
0
156
San Antonio
ahhh...Thx, didn't see that...

But is there a way to set it for a specific amount of time manually...A certain file to edit perhaps...

cPanel.net Support Ticket Number:
 

jcn

Well-Known Member
Sep 17, 2003
56
0
156
Not really.

You can choose after how many days the stats will run (1.5) which is tied intimately to the log rotation, but this will affect all of your domains.

CPanel is really boneheaded about the way it handles doamin logs. They probably had some great reason for doing it this way when they started, but honestly, with the rest of the world rotating logs on something resembling a "schedule," learning the web log files are rotated "randomly" "at least once every 24 hours" and that I am not able to customize log file rotate is completely bizarre.

Same goes for the bandwidth logs, which is probably why I've seen so many problems with banwdith not being reset properly.

I really wish that CPanel would just hand off log rotation to something like logrotate. At least we'd get some consistent and customizable results that way.

And the great thing is that nobody from CPanel ever sees it fit to respond to peoples' concerns in there boards, so the same questions keep coming up again and again.

cPanel.net Support Ticket Number:
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Originally posted by jcn
Same goes for the bandwidth logs, which is probably why I've seen so many problems with banwdith not being reset properly.
They really need to fix this ASAP. We have our logs set to delete at the end of the month. For some reason they were reset around 3:00 AM EST on August 30th, instead of September 1st so our client's bandwidth usage is showing an extra 2 days [48 hours extra].

This is really causing problems because it is making some clients go over their bandwidth limit which makes us think we have to charge them. Then it's hard to figure out who to charge and who not to charge.

Please fix this cPanel so the logs will reset shortly after midnight on the 1ST of the month and not days before the end of the month!!!!!!!

cPanel.net Support Ticket Number:
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Ahhhhh! My freakin log files were just reset a few hours ago (2 days early again).

Is there a command that I can manually run at midnight on the 1st so the bandwidth stats are accurate for the month of October?

cPanel.net Support Ticket Number:
 

jcn

Well-Known Member
Sep 17, 2003
56
0
156
Same thing happened here. You could just delete your logs on the first and restart apache, but that seems really really cheesy.

This is by far the stupidest thing I've seen Cpanel do.

cPanel.net Support Ticket Number:
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
I have hundreds of log files so it would take FOREVER to go through and delete them. I would think there has to be a way to manually run the script that resets the log files at the end of the month.

If you're having this problem open a support ticket. If they get enough tickets hopefully they'll fix it sometime soon especially since it's just a matter of changing the time that it resets every month which should be pretty easy.

cPanel.net Support Ticket Number:
 

jcn

Well-Known Member
Sep 17, 2003
56
0
156
I have posted a bug report about it, but I'm not expecting any response from them. At least not anything useful.

cPanel.net Support Ticket Number:
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
I reported the bug yesterday and haven't heard anything back.

Does anybody know what script can be ran to reset the Apache logs? I need to run it in around 4-5 hours so if someone knows how to do this I would appreciate a reply.

cPanel.net Support Ticket Number:
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Here's the response I received on the ticket I opened:

I just talked to Nick (lead developer) and he said this was intentional as the logs can not immediately rotated (they must be processed) and on the majority of servers starting 2 days before the last day of the month strikes the best balance for all accounts. I suggested a config option (+/- how many days around the last day of the month) logs were rotated and he agreed, so this should be added in future releases. Once it's released, only testing will tell for sure what a safe value for the config would be unless the logs are small enough and there are few enough accounts that they can be rotated instantly.

cPanel.net Support Ticket Number:
 

jcn

Well-Known Member
Sep 17, 2003
56
0
156
Besides being the stupidest thing I've ever heard, I really don't understand. So they're telling us that the log files are getting processed before they get rolled, and because some sites have really big log files, they have to start 2 days early?

Honestly, what the hell?

cPanel.net Support Ticket Number: