====== VCSA ====== ===== CLI ===== ==== Show Services ==== root@vcenter [ ~ ]# service-control --list vmware-statsmonitor (VMware Appliance Monitoring Service) vmware-vpxd-svcs (VMware vCenter-Services) vmdnsd (VMware Domain Name Service) vmware-vsan-health (VMware VSAN Health Service) vmware-sca (VMware Service Control Agent) vmware-cis-license (VMware License Service) vmware-sps (VMware vSphere Profile-Driven Storage Service) vmware-vmon (VMware Service Lifecycle Manager) applmgmt (VMware Appliance Management Service) vsan-dps (VMware VSAN Data Protection Service) vsphere-client (VMware vSphere Web Client) vmware-vsm (VMware vService Manager) pschealth (VMware Platform Services Controller Health Monitor) vmware-vpostgres (VMware Postgres) vmware-vpxd (VMware vCenter Server) vmware-rhttpproxy (VMware HTTP Reverse Proxy) vmware-netdumper (VMware vSphere ESXi Dump Collector) vmware-perfcharts (VMware Performance Charts) vmware-cm (VMware Component Manager) vmonapi (VMware Service Lifecycle Manager API) vmware-analytics (VMware Analytics Service) vmware-postgres-archiver (VMware Postgres Archiver) vmware-stsd (VMware Security Token Service) vmware-vapi-endpoint (VMware vAPI Endpoint) vmware-sts-idmd (VMware Identity Management Service) vmdird (VMware Directory Service) lwsmd (Likewise Service Manager) vmware-mbcs (VMware Message Bus Configuration Service) vmware-updatemgr (VMware Update Manager) vmware-vcha (VMware vCenter High Availability) vmware-content-library (VMware Content Library Service) vsphere-ui (VMware vSphere Client) vmware-pod (VMware Patching and Host Management Service) vmware-eam (VMware ESX Agent Manager) vmcam (VMware vSphere Authentication Proxy) vmcad (VMware Certificate Service) vmware-imagebuilder (VMware Image Builder Manager) vmware-rbd-watchdog (VMware vSphere Auto Deploy Waiter) vmafdd (VMware Authentication Framework) ==== Start/Stop Services ==== Stop service-control --stop vsphere-ui Start service-control --start vsphere-ui ==== Show Service Starttype ==== :!: vmon-cli doesn't use the same service names like service-control. Get the names with vmon-cli -l root@vcenter [ ~ ]# vmon-cli -s analytics Name: analytics Starttype: DISABLED RunState: STOPPED RunAsUser: root CurrentRunStateDuration(ms): 6055122 HealthState: UNHEALTHY FailStop: FALSE MainProcessId: N/A ==== Change Service Start Type ==== Automatic start root@vcenter [ ~ ]# vmon-cli -U content-library -S AUTOMATIC Completed Service State Update request. Disable start root@vcenter [ ~ ]# vmon-cli -U content-library -S DISABLED Completed Service State Update request. ==== Optimize VCSA for Labs ==== :!: Use this only in labs and only if you know what you are doing :!: Stop & disable some services. * analytics/vmware-analytics (VMware Analytics Service) * updatemgr/vmware-updatemgr (VMware Update Manager) * vsan-health/vmware-vsan-health (VMware VSAN Health Service) * content-library/vmware-content-library (VMware Content Library Service) * rbd/vmware-rbd-watchdog (VMware vSphere Auto Deploy Waiter) * perfcharts/vmware-perfcharts (VMware Performance Charts) Disable services. for svc in analytics updatemgr vsan-health content-library rbd; do echo -n "${svc}: "; vmon-cli -U ${svc} -S DISABLED; done Check if services are disabled: root@vcenter [ ~ ]# for svc in analytics updatemgr vsan-health content-library rbd perfcharts; do echo -n "${svc}: "; vmon-cli -s ${svc} | awk '/Starttype/{print $2}'; done analytics: DISABLED vsan-dps: MANUAL netdumper: MANUAL updatemgr: DISABLED vsan-health: DISABLED content-library: DISABLED rbd: DISABLED perfcharts: AUTOMATIC Stop services. for svc in vmware-analytics vsan-dps vmware-netdumper vmware-updatemgr vmware-vsan-health vmware-content-library vmware-rbd-watchdog vmware-perfcharts; do echo -n "${svc}: "; service-control --stop ${svc} | head -n 1; done Check if services are stopped: root@vcenter [ ~ ]# for svc in vmware-analytics vsan-dps vmware-netdumper vmware-updatemgr vmware-vsan-health vmware-content-library vmware-rbd-watchdog vmware-perfcharts; do echo -n "${svc}: "; service-control --status ${svc} | head -n 1; done vmware-analytics: Stopped: vsan-dps: Stopped: vmware-netdumper: Stopped: vmware-updatemgr: Stopped: vmware-vsan-health: Stopped: vmware-content-library: Stopped: vmware-rbd-watchdog: Stopped: vmware-perfcharts: Running: Find more information about optimisation on this website: [[https://www.virten.net/2017/02/homelab-downsizing-vcenter-server-appliance-6-5/|virten.net: Homelab: Downsizing vCenter Server Appliance 6.5]] ==== Show Memory Usage ==== Show all processes that use more than 100MB memory. Columns: Memory, PID, User, Command root@vcenter [ ~ ]# ps -eo size,pid,user,cmd --sort -size | awk 'BEGIN {i=0} NR>1&&$1>102400{pid[i]=$2; size[i]=$1; user[i]=$3; cmd[i]=substr($0, index($0,$4)); i++} END {for(i in pid){printf "%8.2f MB %8i %-10s %s\n",size[i]/1024,pid[i],user[i],substr(cmd[i],1,100) }}' 2573.27 MB 2357 vsphere+ /usr/java/jre-vmware/bin/vsphere-ui.launcher -Xmx597m -XX:CompressedClassSpaceSize=256m -Xss320k -XX 2481.23 MB 3615 root /usr/java/jre-vmware/bin/vmware-vpxd-svcs.launcher -Xmx789m -XX:CompressedClassSpaceSize=256m -Xss25 2332.00 MB 2356 vsphere+ /usr/java/jre-vmware/bin/vsphere-client.launcher -Xmx597m -XX:CompressedClassSpaceSize=256m -Xss320k 1832.45 MB 5326 root /usr/java/jre-vmware/bin/vmware-sps.launcher -Xmx350m -XX:CompressedClassSpaceSize=128m -Xss256k -XX 1701.73 MB 5637 root /usr/java/jre-vmware/bin/vmware-perfcharts.launcher -Xmx261m -XX:CompressedClassSpaceSize=96m -Xss25 1682.92 MB 1848 root vmware-stsd -procname vmware-stsd -home /usr/java/jre-vmware -server -pidfile /var/log/vmware/sso/tc 1550.89 MB 2200 vapiEnd+ /usr/java/jre-vmware/bin/vmware-vapi-endpoint.launcher -Xmx160m -XX:CompressedClassSpaceSize=96m -Xs 1502.11 MB 2322 root /usr/java/jre-vmware/bin/vmware-cm.launcher -Xmx100m -XX:CompressedClassSpaceSize=128m -Xss256k -XX: 1500.53 MB 2186 root /usr/java/jre-vmware/bin/vmware-cis-license.launcher -Xmx128m -XX:CompressedClassSpaceSize=64m -Xss2 1451.59 MB 2294 eam /usr/java/jre-vmware/bin/vmware-eam.launcher -Xmx104m -XX:CompressedClassSpaceSize=64m -Xss256k -XX: 1434.36 MB 5334 root /usr/java/jre-vmware/bin/vmware-vsm.launcher -Xmx96m -XX:CompressedClassSpaceSize=64m -Xss256k -XX:P 1397.17 MB 2321 root /usr/java/jre-vmware/bin/vmware-sca.launcher -Xmx64m -XX:CompressedClassSpaceSize=64m -Xss256k -XX:P 1294.50 MB 1649 root /usr/lib/vmware-vmdir/sbin/vmdird -s -l 0 -f /usr/lib/vmware-vmdir/share/config/vmdirschema.ldif 1208.64 MB 1605 root /usr/lib/vmware-vmafd/sbin/vmafdd -s 1182.26 MB 1796 root vmware-sts-idmd -procname vmware-sts-idmd -wait 120 -server -Xmx168m -XX:CompressedClassSpaceSize=16 1066.33 MB 4472 vpxd /usr/lib/vmware-vpx/vpxd 975.32 MB 2226 root /usr/lib/vmware-rhttpproxy/rhttpproxy -r /etc/vmware-rhttpproxy/config.xml -d /etc/vmware-rhttpproxy 864.43 MB 656 root /usr/sbin/lvmetad -f 838.71 MB 2132 root /usr/lib/vmware-statsmonitor/statsMonitor /etc/vmware/statsmonitor/statsMonitor.xml 649.25 MB 1738 root /usr/lib/vmware-vmca/sbin/vmcad -s 521.32 MB 1549 root /opt/likewise/sbin/lsassd --syslog 513.09 MB 1509 root /opt/likewise/sbin/lwregd --syslog 464.80 MB 1593 root /opt/likewise/sbin/dcerpcd -f 449.10 MB 1734 root /usr/lib/vmware-vmdns/sbin/vmdnsd -s 431.16 MB 1355 pod /usr/lib/vmware-pod/bin/vmware-pod /usr/lib/vmware-pod/bin/pod-twistd --pidfile /usr/lib/vmware-pod/ 385.82 MB 9438 root /usr/sbin/rsyslogd -n 368.44 MB 1504 root /opt/likewise/sbin/lwsmd --start-as-daemon --syslog 306.16 MB 2648 root /usr/bin/python /usr/lib/applmgmt/base/bin/vherdrunner /usr/lib/applmgmt/transport/bin/serve 296.49 MB 5203 root /usr/lib/vmware-pschealth/sbin/pschealthd -s 289.32 MB 2241 root /usr/lib/vmware-vmon/vapi/vmon-vapi-provider -p 8900 -l info 224.61 MB 1541 root /opt/likewise/sbin/lwiod --syslog