How to Refine the Log Retention Settings in XenServer
2012-10-23 16:14
423 查看
How to Refine the Log Retention Settings in XenServer
Document ID: CTX131619 / Created On: 2012-3-10 / Updated On: 2012-3-10Average Rating:
(2 ratings)
View products this document applies to
SummaryThis article describes how to refine the logging configuration on XenServer.
Requirements
You must have console access to a XenServer either through the local console, XenCenter, or SSH.
Background
If the log size of the host is increasing to a larger size, you can consider refining the logging configuration on XenServer by completing the following procedure.
Remember that this procedure must be completed on each individual XenServer host. These configuration changes do not propagate between hosts in a pool.
Procedure
To verify the used space on log directory, run the following command on the XenServer host console:
# du –h /var/log
Following is a sample output of the preceding command:
In the preceding sample, the sum of all the logs in /var/log is 84MB. If the size of this directory approaches 1GB, the log configuration requires refining.
The following three methods are recommended for restraining the increase of the size of the log files in this directory.
Run logrotate hourly instead of daily. Run the following command from the XenServer host console:
# mv /etc/cron.daily/logrotate.conf /etc/cron.hourly/logrotate.conf
Advanced cron scheduling can be used in some scenarios.
Compress old logs. To compress the old log files use the VI to edit the logrotate.conf file. In the /etc/logrotate.conf file, remove the comment from the following line:
#compress
Retain fewer historical logs.
By default XenServer retains 20 historical logs. This can be reduced by changing the numeric value in the following line:
rotate 20
Note that any logs above this threshold value are not be managed by the logroate file and will need to be removed manually.
相关文章推荐
- How to enable the uart log in user version
- How to resolve errors opening currentsettings.vssettings in the final release of VS 2008
- How to choose the development settings in Visual Studio 2005 ?
- How to see the Master Page option Under Look and Feel in site settings?
- (C#) A demo on how to auto fill out the "account" value in log in web page in "WebBrowser" control.
- How to use the date format that has been setup as default in Settings?
- How To Add/Increase The Size Of Redo Log Files In Rac Environment? (文档 ID 779306.1)
- HowTO: Create an Event Log Source in code, without the Permission errors
- how to change the implicit default settings in django 1.6
- How to get files to show up in the Process Monitor/Report Repository
- RunningMapReduceExampleTFIDF - hadoop-clusternet - This document describes how to run the TF-IDF MapReduce example against ascii books. - This project is for those who wants to experiment hadoop as a skunkworks in a small cluster (1-10 nodes) - Google Pro
- How to use isInEditMode() to see layout with custom View in the editor
- How to hide the create button dynamical tree view in openerp ?
- MySQL "show users" - how to show/list the users in a MySQL database
- How to fix the “Cannot retrieve repository metadata (repomd.xml)” error in Fedora?
- How to install Ubuntu form the ISO format in the GRUB
- How to recreate the msdb database in SQL Server 2005
- The operation couldn’t be completed. Unable to log in with account ''. An unexpected failure occurre
- How to change the text color of the selected property sheet tab in Visual C++
- How to get the number of pages in a Word Document