XenServer Log Cleanup Method detailed introduction _xenserver

Source: Internet
Author: User
Tags system log disk usage xapi

XenServer Log Cleanup

I believe many people are filled with disk space by XenServer log, causing the problem that the machine finally hangs up, I met 2 times (once the pool master hung up, No. 200 people can not work 1 hours). It's a headache.

The server used a long time, XenServer generated a lot of logs, and even some people because the log filled up with space,

Causing system problems: XAPI crashes, or the system dies, and the reboot is invalid.

So we have to see whether the log occupies the space, clean up the log
First view the system disk usage (xenserver default is 4G system space)
[Root@xenserver-shptahqk log]#

Df-hal

FileSystem Size Used Avail use% mounted on
/DEV/SDA1 4.0G 4.0G 0G 100%/
None 0 0 0-//proc
None 0 0 0-/sys
............

You can see that the/dev/sda1 space is full, in the system with a lot of directories, maybe a directory occupies a lot of space, then we can find out, clean up
List what directories are in the system first

CD/

Ls

Bin Dev Home media opt root srv usr
Boot etc lib mnt proc Sbin sys var
Cli-rt EULA lost+found myiso read_me_first.html selinux tmp

You can see a lot of directories, where we can look at the size of each directory individually

Du-hcs var

2G var
2G Total

Can see var this directory takes up the system look Oh you're 2G, then we're switching to this directory to see if it's the root directory that takes up space

Cd/var

Ls

Cache DB Games local log NIS patch run swap XAPI YP
Crash empty Lib lock mail opt preserve spool tmp Xen

Log directory Right here: Log, check it out.

Du-hcs Log

1.9G Log
1.9G Total

See the OG directory occupies the largest space, this is the log directory we can delete the following files

CD Log

Ls

Then we can delete all the following files, you are afraid of the operation of the error, you delete

RM-RF file name

Restart the System log service after deletion

Service Syslog Restart

If the above reboot or invalid, you need to restart the next XAPI

Service XAPI Restart

Thank you for reading, I hope to help you, thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.