Thursday, May 17, 2012

Esxtop 4/4 – scheduling esxtop.


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”

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



I hope it helps you when dealing with esxtop tasks.



No comments:

Post a Comment

Who am I

My photo
I’m an IT specialist with over 15 years of experience, working from IT infrastructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Consulting Architect, helping customers to embrace the Cloud Era and make them successfully on their journey. Despite the fact I'm a VMware employee these postings reflect my own opinion and do not represents VMware's position, strategies or opinions.

Most Viewed Posts

Blog Archive