![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing values into logrotate?? | imbiea | Shell Programming and Scripting | 1 | 06-09-2008 01:03 PM |
| Configuring snmpd.conf and snmptrapd.conf | jagdish.machhi@ | UNIX for Advanced & Expert Users | 2 | 04-17-2008 12:01 PM |
| Disabling logrotate | primal | UNIX for Dummies Questions & Answers | 2 | 04-14-2008 10:19 AM |
| how to set size in logrotate.conf | icehero | UNIX for Dummies Questions & Answers | 0 | 02-24-2008 12:41 AM |
| Logrotate problems - Can anyone spot the problem please?! | anderow | UNIX for Dummies Questions & Answers | 10 | 01-10-2008 04:56 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
logrotate.conf
I changed the logrotate.conf file to make a new log file to be automatically rotated daily. But after a night, I have not seen the rotated file.
When does this rotation happen? I mean what is the exact time? In addition, do I have to restart what deamon to make the change take effect? |
| Forum Sponsor | ||
|
|
|
|||
|
when the logs rotate is defined in the logrotate.conf, you can see more details with "man logrotate"
logrotate is not a deamon, therefore it does not need restarting. from the man page: Normally, logrotate is run as a daily cron job. It will not modify a log more than once in one day unless the criterion for that log is based on the log's size and logrotate is being run more than once each day, or unless the -f or --force option is used. |
|
|||
|
Quote:
this is the content of my logrotate file for a specific task: compress dateext daily rotate 7 size 1M notifempty missingok copytruncate the "daily" statement should indicate that it will rotate each day, namely that a new file will be created each day. however, after several days, I still have only one log file. why? |
|
|||
|
Quote:
ls cron* cron.deny crontab cron.d: cron.daily: beagle-crawl-system suse-clean_catman suse.de-backup-rpmdb suse.de-clean-tmp suse.de-update-preload logrotate suse.de-backup-rc.config suse.de-check-battery suse.de-cron-local suse-do_mandb cron.hourly: mcelog cron.monthly: as logrotate is under cron.daily, I assumed it has been set up. |
|
|||
|
so as long as inside the cron.daily/logrotate file there is this line: /usr/sbin/logrotate /etc/logrotate.conf
and the cron daemon is running, then it should be working fine. try running /usr/sbin/logrotate /etc/logrotate.conf it will rotate the logs, then you can see if it's working at all based on the config file, if not try /usr/sbin/logrotate -f /etc/logrotate.conf |
|
|||
|
Quote:
/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF but the fact is that I still have only one log file there, but there should be a couple of rotated log files right? as I made the configuration a couple of days ago. |
|||
| Google The UNIX and Linux Forums |