Configuring Citrix XenServer LogRotate

Pablo Legorreta

Configuring Citrix XenServer LogRotate

Posted by Pablo Legorreta on Dec 13, 2011 1:31:00 PM

Find me on:

configuring_xenserver_logrotateIn Citrix XenServer environments I have seen issues with logs filling up the entire Dom0 storage allocation. The reason behind this is that XenServer logrotate feature can break as it cannot parse the size parameter properly and this results in the dom0 Storage allocation becoming full, caused by overgrown Log Files. Since Citrix frowns upon the modification of the default size of this drive, there are a few things that can be done in order to avoid this issue.

Personally, I recommend lowering the log rotations to one hour, enabling compression and setting the historical to 10 (and never put historical at 20 or above).

The commands to accomplish this are:

  • Hourly rotation mv /etc/cron.daily/logrotate.conf /etc/cron.hourly/logrotate.conf
  • Uncomment the compress line on the logrotate.conf

 

For troubleshooting whenever an environment appears to have issues with log file I do the following:

  1. Check Log Disk Space to validate issue: du –h /var/log
  2. Check what’s causing the problem: find {/path/to/directory/} -type f -size +{size-in-kb}k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’
  1. Delete old/overgrown log files
  2. Apply the recommendations as listed above in order to prevent this in the future.

Citrix Support Services

Topics: Citrix

x

Citrix Slowing you down
Start speeding things up!

Get Our Ebook