What is the effect of the size specifier of logrotate?
When using the size specifier with logrotate, are the files rotated as soon as the size gets bigger than what is specified, or does it rotate when it is run from the cron and the size is bigger than what is specified?
logrotate
add a comment |
When using the size specifier with logrotate, are the files rotated as soon as the size gets bigger than what is specified, or does it rotate when it is run from the cron and the size is bigger than what is specified?
logrotate
add a comment |
When using the size specifier with logrotate, are the files rotated as soon as the size gets bigger than what is specified, or does it rotate when it is run from the cron and the size is bigger than what is specified?
logrotate
When using the size specifier with logrotate, are the files rotated as soon as the size gets bigger than what is specified, or does it rotate when it is run from the cron and the size is bigger than what is specified?
logrotate
logrotate
edited Apr 7 '12 at 21:42
Der Hochstapler
68.3k50230286
68.3k50230286
asked Dec 9 '11 at 13:33
oggmonsteroggmonster
1184
1184
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It happens when it logrotate is run from cron (normally daily).
add a comment |
The "size" parameter is taken into consideration whenever you run logrotate. Whether or not you're running it through an automated system like cron/anacron, that is up to you; you can execute it manually without such automated systems just as easily. Anytime that logrotate is executed, automated or otherwise, the logs in question will not be rotated until they are equal or greater than the size you specified, even if they have already crossed the time threshold you've specified. From man's definition of the size parameter:
Log files are rotated only if they grow bigger then size bytes. If size is followed by k, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G are all valid.
https://linux.die.net/man/8/logrotate
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2fsuperuser.com%2fquestions%2f366338%2fwhat-is-the-effect-of-the-size-specifier-of-logrotate%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It happens when it logrotate is run from cron (normally daily).
add a comment |
It happens when it logrotate is run from cron (normally daily).
add a comment |
It happens when it logrotate is run from cron (normally daily).
It happens when it logrotate is run from cron (normally daily).
answered Apr 7 '12 at 21:50
Scott C WilsonScott C Wilson
1,71531529
1,71531529
add a comment |
add a comment |
The "size" parameter is taken into consideration whenever you run logrotate. Whether or not you're running it through an automated system like cron/anacron, that is up to you; you can execute it manually without such automated systems just as easily. Anytime that logrotate is executed, automated or otherwise, the logs in question will not be rotated until they are equal or greater than the size you specified, even if they have already crossed the time threshold you've specified. From man's definition of the size parameter:
Log files are rotated only if they grow bigger then size bytes. If size is followed by k, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G are all valid.
https://linux.die.net/man/8/logrotate
add a comment |
The "size" parameter is taken into consideration whenever you run logrotate. Whether or not you're running it through an automated system like cron/anacron, that is up to you; you can execute it manually without such automated systems just as easily. Anytime that logrotate is executed, automated or otherwise, the logs in question will not be rotated until they are equal or greater than the size you specified, even if they have already crossed the time threshold you've specified. From man's definition of the size parameter:
Log files are rotated only if they grow bigger then size bytes. If size is followed by k, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G are all valid.
https://linux.die.net/man/8/logrotate
add a comment |
The "size" parameter is taken into consideration whenever you run logrotate. Whether or not you're running it through an automated system like cron/anacron, that is up to you; you can execute it manually without such automated systems just as easily. Anytime that logrotate is executed, automated or otherwise, the logs in question will not be rotated until they are equal or greater than the size you specified, even if they have already crossed the time threshold you've specified. From man's definition of the size parameter:
Log files are rotated only if they grow bigger then size bytes. If size is followed by k, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G are all valid.
https://linux.die.net/man/8/logrotate
The "size" parameter is taken into consideration whenever you run logrotate. Whether or not you're running it through an automated system like cron/anacron, that is up to you; you can execute it manually without such automated systems just as easily. Anytime that logrotate is executed, automated or otherwise, the logs in question will not be rotated until they are equal or greater than the size you specified, even if they have already crossed the time threshold you've specified. From man's definition of the size parameter:
Log files are rotated only if they grow bigger then size bytes. If size is followed by k, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G are all valid.
https://linux.die.net/man/8/logrotate
answered Feb 27 at 18:38
parttimeturtleparttimeturtle
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2fsuperuser.com%2fquestions%2f366338%2fwhat-is-the-effect-of-the-size-specifier-of-logrotate%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