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?










share|improve this question


























    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?










    share|improve this question
























      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?










      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      KuboMD

      346




      346






















          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





          share|improve this answer























          • 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











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          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',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f482991%2flogrotate-not-occurring-automatically%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          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





          share|improve this answer























          • 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















          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





          share|improve this answer























          • 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













          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





          share|improve this answer














          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






          share|improve this answer














          share|improve this answer



          share|improve this answer








          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


















          • 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


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          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





















































          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

          サソリ

          広島県道265号伴広島線

          Accessing regular linux commands in Huawei's Dopra Linux