cancel
Showing results for 
Search instead for 
Did you mean: 

Why by default, configured to rotate the log file after 3AM or 4AM?

hakeem
Nimbostratus
Nimbostratus

Hello I'm Hakeem. I have a question, so I write a post.
Thanks for reading.

Looking at the K6430267 document,
By default, log files are saved between 3 and 4 am.
Why? I wonder what the reason is.

https://support.f5.com/csp/article/K64302672

------------------------------------------

By the way, the time actually saved doesn't seem to be between 3 am and 4 am.
According to the K33730915 document,
vi in ​​/etc/anacrontab
START_HOURS_RANGE=3-22 is the default setting.

Isn't this meant to be stored between 3 am and 10 pm?
Am I getting it wrong?

https://support.f5.com/csp/article/K33730915

------------------------------------------
to sum it up,

1. The reason why log files are saved between 3 and 4 am
2. How does START_HOURS_RANGE relate to log file storage time?


Thank you so much for your help.

 

@LiefZimmerman 

2 ACCEPTED SOLUTIONS

JRahm
Community Manager
Community Manager

The knowledge base article is fairly clear on how that's tuned, where instead of the default 3am - 10pm (3-22) you can narrow that down with the START_HOURS_RANGE. It has to manage all the tasks in cron.daily, cron.weekly, and cron.monthly, so the timing, whereas consistent, isn't exact, but allows you to specify your window of lesser system resource needs on a daily basis to run system jobs. If I can attempt to answer your questions directly:

  1. Because all cron jobs can be started at 3am, and anacron is set to manage jobs within the /etc/cron.daily directory, and the logrotation job is in that directory, it gets run as anacron gets to it amongst the other tasks in that and other directories.
  2. START_RANGE_HOURS is just a window of opportunity for anacron to kick off jobs. Think of anacron as your casual "whatever" dude who is not concerned about WHEN the job will get done, only that it will get done eventually.

View solution in original post

JRahm
Community Manager
Community Manager

it happens "at least" after 3am because the START_HOURS_RANGE for the tasks anacron runs is set to begin at 3am. It can be something different if you change that value, that default value is arbitrary and can/should be changed to match the best times in your traffic distribution to manage system tasks.

View solution in original post

3 REPLIES 3

JRahm
Community Manager
Community Manager

The knowledge base article is fairly clear on how that's tuned, where instead of the default 3am - 10pm (3-22) you can narrow that down with the START_HOURS_RANGE. It has to manage all the tasks in cron.daily, cron.weekly, and cron.monthly, so the timing, whereas consistent, isn't exact, but allows you to specify your window of lesser system resource needs on a daily basis to run system jobs. If I can attempt to answer your questions directly:

  1. Because all cron jobs can be started at 3am, and anacron is set to manage jobs within the /etc/cron.daily directory, and the logrotation job is in that directory, it gets run as anacron gets to it amongst the other tasks in that and other directories.
  2. START_RANGE_HOURS is just a window of opportunity for anacron to kick off jobs. Think of anacron as your casual "whatever" dude who is not concerned about WHEN the job will get done, only that it will get done eventually.

Thank you so much for your reply.

But I would like to know the answer to question 1.

Is it "just" for no reason that the K64302672 document says it's stored at 3 or 4 am?

 

https://support.f5.com/csp/article/K64302672

hakeem_0-1663544491837.png

JRahm
Community Manager
Community Manager

it happens "at least" after 3am because the START_HOURS_RANGE for the tasks anacron runs is set to begin at 3am. It can be something different if you change that value, that default value is arbitrary and can/should be changed to match the best times in your traffic distribution to manage system tasks.