Scheduling ESXTOP (or other processes) on ESXi Host

I had a need to run ESXTOP at a specific time on a couple hosts but didn’t want to be awake to start it.  I’ve done this in the past on ESX and as a frequent Linux user I thought this would be quite simple.  Just type “crontab -e” and add the command and proper start time.  Not so fast as there is no “crontab” command in ESXi (busybox).

After using the global documentation repository (Google), without much luck, I searched the ESXi file system and found the /var/spool/cron/crontabs/root file.  I viewed the file and it looked like a normal crontab file. I tried to modify it but was unable to save changes with the standard “:wq” command.  I then searched on the file and found KB article 1033346.  Turns out you have to do a “:wq!” to save the file.

Next you need to stop the current crond process by locating its PID number:
cat /var/run/crond.pid

Kill the process:
kill -HUP pid##

Once that’s done start crond again:
ESXi 5.0:  /bin/busybox/crond
ESXi 5.1:  /usr/lib/vmware/busybox/bin/busybox crond

I prefer this method to getting up in the middle of the night and manually starting ESXTOP to monitor a host for 1 hour!!!

2 thoughts on “Scheduling ESXTOP (or other processes) on ESXi Host

Add yours

    1. Via esxcli you can schedule same tasks that you can from VIC/web client. PowerCLI would work as well but in this use case I was supporting a client that didn’t have a system I could run PowerCLI from in the middle of the night. Couldn’t do it via VMA either as the cron job didn’t like using passthrough authentication. When I ran the command manually it worked. When cron job ran it waited for credentials.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: