I thought it was 3 before. But right now it only keeps Xorg.0.log and Xorg.0.log.old. Can I increase it to 10 or some other value?

It seems the logrotate does not affect the Xorg.0.log at all.


I had:

    rotate 12
        reload rsyslog >/dev/null 2>&1 || true

I suspect because the x server will refresh the log file at each session, so it never got chance to rotate daily. Is there any option I can do rotation for each session?

I got inspired from this article. He suggested to create our own cron job for more frequent logrotate than daily. I might be able to create a cron job for each boot. But I have no idea if the Xorg got start before the job executed or after.

  • You can configure the retention of logs with logrotate. What's the content of /etc/logrotate.d? – blissini Nov 10 '15 at 11:20
  • @blissini please see the updates – Wang Nov 10 '15 at 11:40
  • What's the size of Xorg.0.log.old? – blissini Nov 10 '15 at 11:45
  • usually small 20k-100k or something. – Wang Nov 10 '15 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.