![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem seen with logrotate | rsravi74 | Red Hat | 1 | 02-16-2009 08:19 AM |
| logrotate size limit | modcan | UNIX for Advanced & Expert Users | 5 | 10-30-2008 09:13 AM |
| logrotate bug? | jjinno | UNIX for Advanced & Expert Users | 0 | 06-09-2008 04:24 PM |
| Disabling logrotate | primal | UNIX for Dummies Questions & Answers | 2 | 04-14-2008 01:19 PM |
| how to set size in logrotate.conf | icehero | UNIX for Dummies Questions & Answers | 0 | 02-24-2008 04:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
logrotate - why ignore size ?
Hi, i have a logroate script that works properly when running manually but otherwise it won't work.I put in in /etc/logrotate.d/nginx. I simply cannot understand why it won't run properly when run with a cronjob. It suppose to run hourly and rotate logs if they are > 3mb. What am i missing here ?:
Code:
/home/*/log/*log {
hourly
rotate 2
dateext
missingok
notifempty
create 0644 root webmasters
sharedscripts
postrotate
size 3M
kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
endscript
}
Code:
# see "man logrotate" for details
# rotate log files daily
daily
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create 0644 webmasters
# uncomment this if you want your log files compressed
#compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
# system-specific logs may be configured here
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|