Archive for the ‘VMware’ Category
Interactive, Replay & Batch ESXTOP Modes!
I’ve been rediscovering the great esxtop tool lately, and I have to say that I’m really impressed with the tremendous amount of information you can get out of this little thing!
But today I will be talking about the (esxtop modes) which I believe not many of us know much about. With a quick search also over the Planet V12N blogosphere I couldn’t find any posts talking about this topic, so there you have it.
We all know about the traditional way of running the esxtop tool through the esx host service console (or resxtop through RCLI). This is in fact called “interactive mode” where you get to see the statistics or information live in front of you and interact with it using deferent sets of keys (m = memory, d = disk and so forth). But this is actually only one of three modes that esxtop can run into. Here are the other two:
- Replay Mode
In this mode, you can record and play the esxtop statistics for a specific period of time, and use also the interval of your choice. But before going into details, you may be wondering why would you want to do that? Well, it could be for support purposes, for example if VMware wants to have a snapshot of your performance statistics they may ask you to run this and send them the output. For me, this came in handy when one of my VMs was having a very strange behavior during an early morning hour. This was happening on daily basis and since I was not in favor of staying awake to see what’s the deal with that, I set a small cron job to run/record the esxtop stats for this specific period of time. The next day I played the stats and I was very grateful for the amount of information I got for troubleshooting the problem.
Now, let’s see how we can do this:
First, you will need to be “root” in order to issue the record command as follows:
vm-support -S -i 5 -d 120
We can see here that the interval is 5 seconds, and the duration for recording the statistics is 120 seconds.

The esxtop will start recording the stats and then compress the output into a .tgz file.

We can issue a command to see the .tgz file as shown below. Make sure you are in the right partition when issuing this command and that you have a reasonable disk space if you will run this command for long time.

Next, we need to uncompress the file as follows:
tar -xzf esx*.tgz
Finally, you need to issue the replay command: (thanks to @vRobM for bringing my attention to this missing command)
esxtop -R vm-support*
And there you have it, the statistics will run as if you are sitting at the point of time the stats were recorded in:

One thing to note here though, the time that will show on the top line, will always reflect the current time you are running in, not the time of the recording, so don’t be confused by that.
- Batch mode
In the batch mode, you can dump your esxtop stats into a .csv file for later use. You can utilize either Microsoft Excel, or Microsoft perfmon tool to view these data at any time.
Here is the command to achieve this:
esxtop -b -a > output_file.csv
This command will dump “all” the fields from the esxtop to the file. But what if you want specific columns only? Well, that’s the real beauty of the batch mode. You can always choose what information you are interested in, here is how:
- Run the esxtop command in interactive mode.
- In each of the panels, select the columns you want.
- Save this configuration to a file (by default ~/.esxtop4rc) using the W interactive command.
Now you can use the batch command and it will dump only the comlums that you have selected.
What’s next?
Use Excel or perfmon to analyze your data, I personally prefer to use my Vista’s perfmon for this unless you have a specific requirement for using Excel.
- Go to Start -> Run -> type perfmon.
- Go to Performance Monitor section.
-
Click of the “View Log Data” in the tool bar at the right as shown in the screen shot below.

After that, you need to use the file you’ve dumped the esxtop data to:

You can choose here which columns/counters you want to graph and analyze

And here you see your selected columns graphed in perfmon

And you are done!
Video: vSphere4 Unleashed: 06 – Storage vMotion
A new, thin and compact video! Here we’ll demo the new GUI based storage vMotion feature built-in vSphere. Yes, GUI based and built in, no more command lines and hassle. It’s fast, it’s easy and it’s very reliable, especially when doing the thin/thick conversions while you’re migrating the VMs.
Happy viewing!
Video: vSphere4 Unleashed: 05 – Hot-Add and Thin-Provisioning
In this video I’ll be demonstrating the following in order:
- Enable the Hot-Add/Plug in the virtual machines.
- Hot-Add memory for a VM and increase it from 512MB to 1GB.
- See from the VM’s Task Manager the new amount of memory available for the GOS.
- Hot-Add a new NIC, and configure it on the fly.
- Thin-Provision a new 10GB hard drive for a VM.
- Hot-Expand the new hard drive from 10GB to 20GB.
- Extend the volume live within the GOS using the “diskpart” tool.
I have the Storage vMotion & vCenter linked-mode recorded and will be publishing them this week. Stay tuned!
Video: vSphere4 Unleashed: 04 – Fault Tolerance
And finally some real action of the new amazing vSphere’s Fault Tolerance. In this video we’ll do the following in order:
- Verify that the FT logging is enabled on our network card.
- Enable the FT on one VM.
- Observe that the VM has two instances, the primary running on one ESX server, and the secondary running on a deferent ESX server.
- Demonstrate the “Record & Play”, or to be acurate the “vLockStep” mechanism used on the FT enabled VM.
- Start a large file copy to the VM as a continuous operation in place throughout our fail-over process
- Start the fail-over process by resetting the ESX blade via the Dell admin console.
- Observe that the VM has been shifted to the secondary ESX server, and that the file copy is not interrupted.
- Observe that the FT has automatically chosen another ESX server to protect the VM with no intervention from our side.
- We’ll check also the up-time of the VM after the fail over.
- And finally we’ll perform the migration of the FT enabled VM in case of planned maintenance.
I hope you will find this video useful, and see the great benefit of the new Fault Tolerance feature in vSphere 4.
Video: vSphere4 Unleashed: 03 – Licensing & Configuring vCenter
This is the third video in our vSphere journey. We’ll do the following tasks in order:
- Add our Licenses in vCenter Server.
- Register our first ESX server in vCenter.
- Configure the VMkernel on the ESX server along with enabling the vMotion & FT.
- Configure the iSCSI software initiator and discover the shared LUNs on the SAN.
- Create an HA/DRS enabled Cluster.
- Add our three ESX servers to it.
- Import a Virtual Appliance to the cluster for testing.
- Test vMotion to ensure that the VMkernel is functioning properly.
And by that we set the stage for Fault Tolerance in the next video. I have it already recorded and I will do my best to produce it by tomorrow since it’s a weekend over here.
One last thing to note: please bare with the interesting music that plays along with the video, I can’t find my flash loops collection, so until I do, you may either mute the music or dance with it. It’s really boring watching silent videos, besides, it’s almost impossible not to fall asleep from them.