Reprint: http://vps.gl/vps/259.html
XenServer server after six months or a year of use, XenServer produced a lot of log files. XenServer default is 4G system space, and these log files will occupy a lot of system space, the log file fills up, will cause the system problems: XAPI crashes, or the system is stuck, restart is not valid. Therefore, checking the log files of the cleaning system regularly is an important way to ensure the normal operation of the system.
1. Check the partition space
Df-hal
2. View the size of each directory under the root directory
Du-sh/* | Sort-nr
3. Check the Var directory, the size of each directory
du-sh/var/* | SORT-NR//Here you can see the log file logs occupy the most space
4. View Log log file
CD Log
Ls
5. Delete log file
You can delete all of the following files
RM-RF./* (make sure the current directory is in the/var/log/directory)
RM-RF file name (in the case of uncertainty, a file can be deleted)
6. Restart XAPI
After deletion, you need to restart the next XAPI
Service XAPI Restart
Note: Log space is not released after deletion
Restart the System log process
Service Syslog Restart
XenServer How to clean up logs