Logrotate not occurring automatically

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











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 Nov 20 at 15:11









      KuboMD

      427




      427




















          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
            Nov 20 at 17:42






          • 1




            @KuboMD That is correct.
            – Kusalananda
            Nov 20 at 19:02










          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
            Nov 20 at 17:42






          • 1




            @KuboMD That is correct.
            – Kusalananda
            Nov 20 at 19:02














          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
            Nov 20 at 17:42






          • 1




            @KuboMD That is correct.
            – Kusalananda
            Nov 20 at 19:02












          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 Nov 21 at 21:06

























          answered Nov 20 at 15:23









          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
            Nov 20 at 17:42






          • 1




            @KuboMD That is correct.
            – Kusalananda
            Nov 20 at 19:02
















          • So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
            – KuboMD
            Nov 20 at 17:42






          • 1




            @KuboMD That is correct.
            – Kusalananda
            Nov 20 at 19:02















          So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
          – KuboMD
          Nov 20 at 17:42




          So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
          – KuboMD
          Nov 20 at 17:42




          1




          1




          @KuboMD That is correct.
          – Kusalananda
          Nov 20 at 19:02




          @KuboMD That is correct.
          – Kusalananda
          Nov 20 at 19:02

















           

          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

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?