How To rotate syslog daily?
29,464
Solution 1
You can change settings in /etc/logrotate.d/rsyslog
but for me it's daily by default.
Solution 2
On my system, I found /etc/logrotate.d/rsyslog.disabled
instead of /etc/logrotate.d/rsyslog
. After renaming it to /etc/logrotate.d/rsyslog
, things are working fine.
Related videos on Youtube
Author by
Frank Moore
Updated on September 18, 2022Comments
-
Frank Moore over 1 year
I want to rotate my syslog daily... How do I do this? How to check whether log rotate is working? How to make it run daily? By default, does Ubuntu Server run logrotate daily? Or do I have to set it after installation?
-
mikewhatever about 12 yearsYou can check with
ls /etc/cron.daily/ | grep logrotate
. -
Frank Moore about 12 years@mikewhatever In the result it says logrotate ... So that means its working right? But how to rotate syslog daily? Is it on by default? If its on... Its not working for me!
-
mikewhatever about 12 yearsYes, that means the logrotate job is run daily. Why do you think it's not working?
-
Frank Moore about 12 years@mikewhatever The syslog is not rotated!
-
mikewhatever about 12 yearsAre you saying the syslog in never rotated? That sounds unlikely, can you post some evidence.
-
Frank Moore about 12 yearsPlease tell me what evidence you want... In the log directory, I have one big syslog file which have records since I started the server last month!
-
mikewhatever about 12 yearsIf that's the case, it might be a bug. File a bug report with detailed explanations, as well as the size of the syslog file.
-