Just Another IT Blog

It's time to share some of my experiences, crazy ideas, tips and tricks !!!

Post Page Advertisement [Top]

We’ve reached our final post about esxtop.

If you missed some of them here are the references:
Esxtop 1/4 – esxtop basics
Esxtop 2/4 – accessing esxtop remotely
Esxtop 3/4 – exporting the data you collected

You might face a situation where some performance degradation occurs just during the evening or during weekends, well, nobody likes to stay up all night or work during a weekend just to run one line of command to generate a performance output for later analysis.

So, it’s good to have the option to schedule a task in ESXi to run esxtop, collect the data and save for your later analysis.

With ESX classic, where we had a Service Console, it was no different than Unix/Linux systems, just run: crontab –e 
That would be it, just add your job, save it and you are all set.

Now with ESXi, cronjob is limited in shell console. Let’s see how to set it up, though

- log into the host with SSH.
- edit the file /var/spool/cron/crontabs/root
- add your job, save and close the file
- kill the cron daemon running: kill $(cat /var/run/crond.pid)
-  restart the cron daemon running: busybox crond
Easy, right ?  Your job will run at the specific time you set up.
Here’s a quick reference about the cron jobs syntax:

mm hh dd MM ww “job_goes_here”

mm = minutes
hh = hours
dd = day of month
MM = Month
WW = Day of Week

I hope it helps you when dealing with esxtop tasks.

Bottom Ad [Post Page]