Logrotate not occurring automatically
up vote
0
down vote
favorite
I'm able to call logrotate /etc/logrotate.conf
whenever I see my log file exceed the specified threshold and it rotates just fine. I was under the impression though that whenever a file specified in the logrotate config breached its threshold it would rotate them automatically without me having to run the command.
/var/log/upstart/*server.log {
size 2500M
missingok
rotate 5
compress
compress
notifempty
nocreate
}
Any ideas?
logs logrotate
add a comment |
up vote
0
down vote
favorite
I'm able to call logrotate /etc/logrotate.conf
whenever I see my log file exceed the specified threshold and it rotates just fine. I was under the impression though that whenever a file specified in the logrotate config breached its threshold it would rotate them automatically without me having to run the command.
/var/log/upstart/*server.log {
size 2500M
missingok
rotate 5
compress
compress
notifempty
nocreate
}
Any ideas?
logs logrotate
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm able to call logrotate /etc/logrotate.conf
whenever I see my log file exceed the specified threshold and it rotates just fine. I was under the impression though that whenever a file specified in the logrotate config breached its threshold it would rotate them automatically without me having to run the command.
/var/log/upstart/*server.log {
size 2500M
missingok
rotate 5
compress
compress
notifempty
nocreate
}
Any ideas?
logs logrotate
I'm able to call logrotate /etc/logrotate.conf
whenever I see my log file exceed the specified threshold and it rotates just fine. I was under the impression though that whenever a file specified in the logrotate config breached its threshold it would rotate them automatically without me having to run the command.
/var/log/upstart/*server.log {
size 2500M
missingok
rotate 5
compress
compress
notifempty
nocreate
}
Any ideas?
logs logrotate
logs logrotate
asked 2 days ago
KuboMD
346
346
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Which files will be rotated is indeed specified in /etc/logrotate.conf
. But the command logrotate
still needs to be run. It can be run manually, but it is normally configured to be run daily by cron.
While it depends on the distro your using, this command will likely output if it is specified to be run periodically by cron:
find /etc/cron* -type f | xargs fgrep logrotate
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
1
@KuboMD That is correct.
– Kusalananda
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Which files will be rotated is indeed specified in /etc/logrotate.conf
. But the command logrotate
still needs to be run. It can be run manually, but it is normally configured to be run daily by cron.
While it depends on the distro your using, this command will likely output if it is specified to be run periodically by cron:
find /etc/cron* -type f | xargs fgrep logrotate
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
1
@KuboMD That is correct.
– Kusalananda
2 days ago
add a comment |
up vote
3
down vote
accepted
Which files will be rotated is indeed specified in /etc/logrotate.conf
. But the command logrotate
still needs to be run. It can be run manually, but it is normally configured to be run daily by cron.
While it depends on the distro your using, this command will likely output if it is specified to be run periodically by cron:
find /etc/cron* -type f | xargs fgrep logrotate
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
1
@KuboMD That is correct.
– Kusalananda
2 days ago
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Which files will be rotated is indeed specified in /etc/logrotate.conf
. But the command logrotate
still needs to be run. It can be run manually, but it is normally configured to be run daily by cron.
While it depends on the distro your using, this command will likely output if it is specified to be run periodically by cron:
find /etc/cron* -type f | xargs fgrep logrotate
Which files will be rotated is indeed specified in /etc/logrotate.conf
. But the command logrotate
still needs to be run. It can be run manually, but it is normally configured to be run daily by cron.
While it depends on the distro your using, this command will likely output if it is specified to be run periodically by cron:
find /etc/cron* -type f | xargs fgrep logrotate
edited yesterday
answered 2 days ago
Hkoof
1,06768
1,06768
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
1
@KuboMD That is correct.
– Kusalananda
2 days ago
add a comment |
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
1
@KuboMD That is correct.
– Kusalananda
2 days ago
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
– KuboMD
2 days ago
1
1
@KuboMD That is correct.
– Kusalananda
2 days ago
@KuboMD That is correct.
– Kusalananda
2 days ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482991%2flogrotate-not-occurring-automatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown