0

how to increase the size of /var/log/cron on cent os 6.4. I wanted to keep the logging history longer.

Thanks!

Pavan
  • 13
  • 2
  • answer: add more space to /var/log/cron on cent os 6.4! Please provide more information (use of lvm?). – deagh Jun 04 '14 at 11:09
  • 1
    Check `/etc/logrotate.d/syslog` and customise according to your requirements. The issue is a frequency-of-rotation one, not a size one. – MadHatter Jun 04 '14 at 11:09
  • @MadHatter Thank you a lot! Your suggestion really helped me. This is what i was searching for. again thank you. Can i do the same with /etc/logrotate.conf? – Pavan Jun 04 '14 at 11:17

1 Answers1

2

The size of your cron log is limited by

  • The amount of disk space available to /var/log
  • The configuration of logrotate.

It's not clear which of these you're having problems with.

For the former - add more disk space. For the latter look at the configuration of logrotate the default files for which are /etc/logrotate.conf and /etc/logrotate.d/*.

If you only want to act upon cron.log you will have to remove it from it's current configuration file (see /etc/logrotate.d/syslog) and create a new file that tells logrotate how to handle cron.log differently.

user9517
  • 115,471
  • 20
  • 215
  • 297