Friday, April 27, 2012

Esxtop 2/4 – accessing esxtop remotely



On my last post I comment about how to use esxtop to gather performance data from your ESXi hosts.

The problem with esxtop is:
It’s a tool you can only run when you are connected into the host, either by an SSH session or locally on the console.

VMware recommendation for a more secure environment is to disable those accesses and manage it remotely with the VMware management tools.

So, how do we access ESXi performance counters remotely ?

If you are a fan of PowerCli you can use Get-EsxTop cmdlet.
It’s a bit trick to use it, you will need to pass few statements to the cmdlet.

I’ll give you a start.

-       Connect on the host: Connect-VIServer –server “your_host”
-       type: Get-EsxTop –server “your_host” –CounterName “counter”| select *

 To get a list of all counters available type:

-       Get-EsxTop –server “your_host” –Counter

Get-Esxtop does not work when connected against with vCenter, so make sure you established a connection directed with the host.

If you have vSphere Management Assistance(vMA) available on your environment, it might be a little easier:

-       Connect on vMA
-       Establish a connection with your vCenter.
-       Type: resxtop –server “your_host”

That’s all !! You will have the same interface esxtop provides.
The beauty of using this tool is that you don’t even need to have access to the root’s password, use your vCenter credentials to login on vCenter and the commands will be send through it.

See you next.

Wednesday, April 18, 2012

Esxtop 1/4 – esxtop basics

If you manage a virtual environment, you probably realized by now that, over time you need to figure out why your VM’s are not performing the way it should be, may be you need to prove the problem is not capacity/performance related or may be you just need to keep an eye on the health of your environment.

To help you guys, I will post a series of posts about esxtop and how to gather the data you need for an analysis.

The topics I will cover will be:
Esxtop 1/4 – esxtop basics
Esxtop 2/4 – accessing esxtop remotely
Esxtop 3/4 – exporting the data you collected
Esxtop 4/4 – scheduling it to run at a specific date/time

So, let’s start with the basics:

What’s esxtop ?
If you used Linux or Unix you should know the top command. Esxtop is the top version for ESXi and it’s used to analyze real time performance data.

How do why start it ?
- First, log in on the ESXi through putty/SSH (Remote Tech Support must be enable)
- Then, run esxtop command

You will realize there are a bunch of information, metrics, data, etc.

By default it will show will data about the CPU.
To switch between others views, like memory, disk and network just type corresponding letter bellow depending of what you want to see.

c = cpu
m = memory
n = network
d = disk adapter
u = disk device
v = disk VM
p = power states

You can also add extra fields to the view or remove some of the fields. To add/remove fields just type f.
Then you can select what fields you want to see, pressing ENTER will return you to the data screen.

Be aware that the changes will not persist if you close esxtop and open it later.
If you want to make that view persistent, so every time you open esxtop you will see the same selection of fields, after changing the fields of your view press W (it’s a caps W).

That’s it, every time you open esxtop you will see the same view and fields selected by default.

Now that you understand how to collect the performance data of your environment you will need to learn the must important thing, what they represent!!!

VMware has a good page about interpreting esxtop statistics, you will find valuable information about each metric and when they might be a problem.

But remember, those are just references, with hundreds of variables between environments it’s not always that the same value will indicate a problem.
The user perception is a good indicator to start with, my advice is to monitor your environment and take notes about the data, so you will understand, based on your own environment, what is a good and a bad metric.

See you next.

Who am I

My photo
I’m and IT specialist with over 15 years of experience, working from IT infraestructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Senior Consultant, helping customers to embrace the Cloud Era and make them succefully on this journay. Despite the fact I'm a VMware employee these postings reflect my own opnion and do not represents VMware's position, strategies or opinios.

Most Viewed Posts

Blog Archive