rebel7

Registered
Jul 20, 2015
3
0
1
ok
cPanel Access Level
Root Administrator
As far as I can tell, the only setting that affects the timing of when cpanellogd performs raw access log rotation is BLACKHOURS. Is there something that sets the start time that I'm not finding? I have a few dozen virtual domains and I thought if I turned stats off that the logs would rotate earlier but it finishes at 7:05 AM every day and within minutes on all domains whether stats is enabled or not. I want it to run just after midnight everyday. Setting the blackhours, leaving a window between midnight and 3:00 AM causes it to not run at all?

The hosting company went through a week and 8 techs and couldn't find any other settings (nor could I). They recommend disabling cpanellogd and utilizing logrotate, which I'm inclined to do if nothing else, but I can't believe that there isn't a cron job somewhere that is controlling the starting time for this that we're just missing?

Help appreciated.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Setting the blackhours, leaving a window between midnight and 3:00 AM causes it to not run at all?
Hello :)

That is in-fact the supported method of ensuring statistics only generate at a specific time. You can browse to "WHM Home » Server Configuration » Statistics Software Configuration" and change the "Log Processing Frequency" to a value such as "3 hours" if you want to ensure statistics run on the first night. Otherwise, are you sure at least 24 hours had passed since the last statistics generation when you first made the change to the black out hours?

Thank you.
 

rebel7

Registered
Jul 20, 2015
3
0
1
ok
cPanel Access Level
Root Administrator
Michael,

My apologies for not replying. I've been quite busy on a project and "assumed" that I would get an email notification if a reply came through and have only now taken time to loop back to have a look.

As a test, I allowed 2 days to pass with all stats disabled and with that 3 hour window available for the log rotation. With/without stats enabled the log rotation occurs at the same exact time, around 7:00 AM, each day. This screams to me that there is a cron job somewhere triggering this that either I haven't found or I'm missing how the cron job is triggering the log rotation. I've put a few hours into it and have researched for it and just haven't had time to pursue it further.

I thought I would drop a post on the cpanel forum and someone more familiar with cpanel would just say, "Oh yeah, the cpanellogd is triggered by such-n-such, etc., and you can change the timing here, etc". Since I don't need stats/bandwidth reporting I am inclined to disable cpanellogd, which is what the host tech support suggests as well, and set up logrotate to handle the domolgs rotation. I am reluctant to disable something that I am not intimately familiar with but it appears that there would be no ill effect in doing so since I don't need stats/bandwidth. This is another thing I would like input on from this forum.

Thank you. (and I promise to check back frequently for a response ;-} )
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
There's no specific cron job that determines when cpanellogd processes statistics, but rather cpanelogd is a process that's always running. You could setup your own custom cron job that utilizes the "/scripts/runstatsonce" command if you want to process statistics at a specific time.

Thank you.