修復VCenter Log Disk Exhaustion on vc 錯誤

參考: https://kb.vmware.com/s/article/2143565

輔助指令

df -h |awk '0+$5 >= 78 {print}'
du --max-depth=1 | sort -n -r  | head -n 20

修復指令

cp /usr/lib/vmware-sso/vmware-sts/webapps/ROOT/WEB-INF/classes/log4j2.xml /usr/lib/vmware-sso/vmware-sts/webapps/ROOT/WEB-INF/classes/log4j2.bak
sed -i 's/size=\"50 MB\"/size=\"10 MB\"/g' /usr/lib/vmware-sso/vmware-sts/webapps/ROOT/WEB-INF/classes/log4j2.xml
sed -i 's/max=\"10\"/max=\"3\"/g' /usr/lib/vmware-sso/vmware-sts/webapps/ROOT/WEB-INF/classes/log4j2.xml

cd /storage/log/vmware/sso/

rm localhost_access_log.*
rm vmware-identity-sts.*
rm vmware-identity-sts-perf.*
rm *2020*
rm *2021*

service vmware-stsd restart