logrotate is done every hour no matter the size of the file
Clash 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
linux logrotate
add a comment |Â
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
linux logrotate
add a comment |Â
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
linux logrotate
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
linux logrotate
asked 5 mins ago
Omar Alvarado
1
1
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
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
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
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
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