What is the effect of the size specifier of logrotate?












0















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?










share|improve this question





























    0















    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?










    share|improve this question



























      0












      0








      0








      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 7 '12 at 21:42









      Der Hochstapler

      68.3k50230286




      68.3k50230286










      asked Dec 9 '11 at 13:33









      oggmonsteroggmonster

      1184




      1184






















          2 Answers
          2






          active

          oldest

          votes


















          0














          It happens when it logrotate is run from cron (normally daily).






          share|improve this answer































            0














            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






            share|improve this answer
























              Your Answer








              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
              });


              }
              });














              draft saved

              draft discarded


















              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









              0














              It happens when it logrotate is run from cron (normally daily).






              share|improve this answer




























                0














                It happens when it logrotate is run from cron (normally daily).






                share|improve this answer


























                  0












                  0








                  0







                  It happens when it logrotate is run from cron (normally daily).






                  share|improve this answer













                  It happens when it logrotate is run from cron (normally daily).







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 7 '12 at 21:50









                  Scott C WilsonScott C Wilson

                  1,71531529




                  1,71531529

























                      0














                      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






                      share|improve this answer




























                        0














                        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






                        share|improve this answer


























                          0












                          0








                          0







                          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






                          share|improve this answer













                          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







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 27 at 18:38









                          parttimeturtleparttimeturtle

                          11




                          11






























                              draft saved

                              draft discarded




















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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







                              Popular posts from this blog

                              Probability when a professor distributes a quiz and homework assignment to a class of n students.

                              Aardman Animations

                              Are they similar matrix