9394952

导航

对vcenter日志目录的处理

vmware的vcenter 6.0日志目录随着时间增加越来越大,参照vmkb的说明,设置日志自动旋转(logrotate),对于节省VSA空间有很大作用

参照文档:

  https://kb.vmware.com/s/article/2147261

  https://communities.vmware.com/t5/VMware-vCenter-Discussions/Delete-the-cloudvm-ram-size-log/m-p/456386?tstart=0

新增两个文件

vi /etc/logrotate.d/cloudvm_ram_size.log

/storage/log/vmware/cloudvm/cloudvm-ram-size.log{
missingok
notifempty
compress
size 20k
monthly
rotate 5      
create 0660 root cis
}

 

vi /etc/logrotate.d/vmware-sso

/storage/log/vmware/sso/localhost_access_log.*.txt{
missingok
notifempty
compress
size 20k
monthly
rotate 5      
create 0660 root cis
}

然后执行进行更新:

logrotate -f /etc/logrotate.conf

 

posted on 2021-01-19 15:06  9394952  阅读(858)  评论(0编辑  收藏  举报