logrotate is done every hour no matter the size of the file

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











up vote
0
down vote

favorite












My logfiles are being rotated every hour no matter the file size



This is my configuration file



/var/log/nodejs/nodejs.log 
size 10M
missingok
notifempty
rotate 5
sharedscripts
compress
copytruncate
dateext
dateformat -%s
olddir /var/log/nodejs/rotated
postrotate
/etc/init.d/rsyslog restart > /dev/null
endscript



And my logs are very small, but anyway they are rotated every hour without exception.



The output when running logrotate in debug mode is as follows



reading config file /etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.nodejs.conf
reading config info for /var/log/nodejs/nodejs.log
olddir is now /var/log/nodejs/rotated

Handling 1 logs

rotating pattern: /var/log/nodejs/nodejs.log forced from command line (5 rotations)
olddir is /var/log/nodejs/rotated, empty log files are not rotated, old logs are removed
considering log /var/log/nodejs/nodejs.log
log needs rotating
rotating log /var/log/nodejs/nodejs.log, log->rotateCount is 5
Converted ' -%s' -> '-%s'
dateext suffix '-1540853132'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
copying /var/log/nodejs/nodejs.log to /var/log/nodejs/rotated/nodejs.log-1540853132
truncating /var/log/nodejs/nodejs.log
running postrotate script
running script with arg /var/log/nodejs/nodejs.log : "
/etc/init.d/rsyslog restart > /dev/null
"
compressing log with: /bin/gzip
removing old log /var/log/nodejs/rotated/nodejs.log-1540851226.gz








share

























    up vote
    0
    down vote

    favorite












    My logfiles are being rotated every hour no matter the file size



    This is my configuration file



    /var/log/nodejs/nodejs.log 
    size 10M
    missingok
    notifempty
    rotate 5
    sharedscripts
    compress
    copytruncate
    dateext
    dateformat -%s
    olddir /var/log/nodejs/rotated
    postrotate
    /etc/init.d/rsyslog restart > /dev/null
    endscript



    And my logs are very small, but anyway they are rotated every hour without exception.



    The output when running logrotate in debug mode is as follows



    reading config file /etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.nodejs.conf
    reading config info for /var/log/nodejs/nodejs.log
    olddir is now /var/log/nodejs/rotated

    Handling 1 logs

    rotating pattern: /var/log/nodejs/nodejs.log forced from command line (5 rotations)
    olddir is /var/log/nodejs/rotated, empty log files are not rotated, old logs are removed
    considering log /var/log/nodejs/nodejs.log
    log needs rotating
    rotating log /var/log/nodejs/nodejs.log, log->rotateCount is 5
    Converted ' -%s' -> '-%s'
    dateext suffix '-1540853132'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    copying /var/log/nodejs/nodejs.log to /var/log/nodejs/rotated/nodejs.log-1540853132
    truncating /var/log/nodejs/nodejs.log
    running postrotate script
    running script with arg /var/log/nodejs/nodejs.log : "
    /etc/init.d/rsyslog restart > /dev/null
    "
    compressing log with: /bin/gzip
    removing old log /var/log/nodejs/rotated/nodejs.log-1540851226.gz








    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      My logfiles are being rotated every hour no matter the file size



      This is my configuration file



      /var/log/nodejs/nodejs.log 
      size 10M
      missingok
      notifempty
      rotate 5
      sharedscripts
      compress
      copytruncate
      dateext
      dateformat -%s
      olddir /var/log/nodejs/rotated
      postrotate
      /etc/init.d/rsyslog restart > /dev/null
      endscript



      And my logs are very small, but anyway they are rotated every hour without exception.



      The output when running logrotate in debug mode is as follows



      reading config file /etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.nodejs.conf
      reading config info for /var/log/nodejs/nodejs.log
      olddir is now /var/log/nodejs/rotated

      Handling 1 logs

      rotating pattern: /var/log/nodejs/nodejs.log forced from command line (5 rotations)
      olddir is /var/log/nodejs/rotated, empty log files are not rotated, old logs are removed
      considering log /var/log/nodejs/nodejs.log
      log needs rotating
      rotating log /var/log/nodejs/nodejs.log, log->rotateCount is 5
      Converted ' -%s' -> '-%s'
      dateext suffix '-1540853132'
      glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
      copying /var/log/nodejs/nodejs.log to /var/log/nodejs/rotated/nodejs.log-1540853132
      truncating /var/log/nodejs/nodejs.log
      running postrotate script
      running script with arg /var/log/nodejs/nodejs.log : "
      /etc/init.d/rsyslog restart > /dev/null
      "
      compressing log with: /bin/gzip
      removing old log /var/log/nodejs/rotated/nodejs.log-1540851226.gz








      share













      My logfiles are being rotated every hour no matter the file size



      This is my configuration file



      /var/log/nodejs/nodejs.log 
      size 10M
      missingok
      notifempty
      rotate 5
      sharedscripts
      compress
      copytruncate
      dateext
      dateformat -%s
      olddir /var/log/nodejs/rotated
      postrotate
      /etc/init.d/rsyslog restart > /dev/null
      endscript



      And my logs are very small, but anyway they are rotated every hour without exception.



      The output when running logrotate in debug mode is as follows



      reading config file /etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.nodejs.conf
      reading config info for /var/log/nodejs/nodejs.log
      olddir is now /var/log/nodejs/rotated

      Handling 1 logs

      rotating pattern: /var/log/nodejs/nodejs.log forced from command line (5 rotations)
      olddir is /var/log/nodejs/rotated, empty log files are not rotated, old logs are removed
      considering log /var/log/nodejs/nodejs.log
      log needs rotating
      rotating log /var/log/nodejs/nodejs.log, log->rotateCount is 5
      Converted ' -%s' -> '-%s'
      dateext suffix '-1540853132'
      glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
      copying /var/log/nodejs/nodejs.log to /var/log/nodejs/rotated/nodejs.log-1540853132
      truncating /var/log/nodejs/nodejs.log
      running postrotate script
      running script with arg /var/log/nodejs/nodejs.log : "
      /etc/init.d/rsyslog restart > /dev/null
      "
      compressing log with: /bin/gzip
      removing old log /var/log/nodejs/rotated/nodejs.log-1540851226.gz






      linux logrotate





      share












      share










      share



      share










      asked 5 mins ago









      Omar Alvarado

      1




      1

























          active

          oldest

          votes











          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f478545%2flogrotate-is-done-every-hour-no-matter-the-size-of-the-file%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478545%2flogrotate-is-done-every-hour-no-matter-the-size-of-the-file%23new-answer', 'question_page');

          );

          Post as a guest













































































          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?