You may schedule the VMware ESXi to restart the CIM Server (sfcbd-watchdog) every half an hour by following the steps below:
1. Access the ESXi through SSH
2. Go to /etc/rc.local.d by typing the following commands:
cd /etc/rc.local.d
3. Edit the local.sh with the following commands:
vi local.sh
4. Insert the commands below right before exit 0:
echo "chkconfig sfcbd-watchdog off" > /usr/sbin/sfcbd-restart.sh
echo "chkconfig sfcbd off" >> /usr/sbin/sfcbd-restart.sh
echo "/etc/init.d/sfcbd-watchdog stop" >> /usr/sbin/sfcbd-restart.sh
echo "chkconfig sfcbd-watchdog on" >> /usr/sbin/sfcbd-restart.sh
echo "chkconfig sfcbd on" >> /usr/sbin/sfcbd-restart.sh
echo "/etc/init.d/sfcbd-watchdog start" >> /usr/sbin/sfcbd-restart.sh
chmod 755 /usr/sbin/sfcbd-restart.sh
kill $(cat /var/run/crond.pid)
cat /var/spool/cron/crontabs/root > /var/spool/cron/crontabs/rootx
echo "*/30 * * * * /usr/sbin/sfcbd-restart.sh" >> /var/spool/cron/crontabs/rootx
rm /var/spool/cron/crontabs/root
cp /var/spool/cron/crontabs/rootx /var/spool/cron/crontabs/root
chmod 1444 /var/spool/cron/crontabs/root
crond
5. Press Esc and type the following commands to save and close the local.sh:
:wq!
6. Locate the PID number of the crond process by typing the commands below:
cat /var/run/crond.pid
7. Kill the crond process by typing the following commands:
kill -HUP <pid##>
8. Finally, start the crond process again with the following commands:
ESXi 5.0: /bin/busybox/crond
ESXi 5.1 and ESXi 5.5: /usr/lib/vmware/busybox/bin/busybox crond
Is there a way to determine if it is able to effectively restart the service? Does it log somewhere?
ReplyDeleteScheduling an ESXi restart for the CIM Server (sfcbd-watchdog) can improve server performance. For more troubleshooting tips, check out wooting double movement for expert advice!
ReplyDelete