top of page
  • dotsincloud

Esxtop ninja

Updated: Dec 16, 2021

Esxtop can be swiss army knife of troubleshooting with numerous options. I will go through in this blog post on how to use esxtop. Ranging from how to look for metrics, resizing, customizing screen view and much more. So sit back and snack on this article and make sure to bookmark so that you can retrieve it when needed.

Running esxtop:

Open ssh console session to esxi host.

esxtop

By default screen refershes every 5 seconds. This can be changed by running following for 2 seconds,

s 2

Press 'h'.

Esxtop: top for ESX

These single-character commands are available:

^L - redraw screen

space - update display

h or ? - help; show this text

q - quit

Interactive commands are:

fF Add or remove fields

oO Change the order of displayed fields

s Set the delay in seconds between updates

# Set the number of instances to display

W Write configuration file ~/.esxtop60rc

k Kill a world

e Expand/Rollup Cpu Statistics

V View only VM instances

L Change the length of the NAME field

l Limit display to a single group

Sort by:

U:%USED R:%RDY N:GID

Switch display:

c:cpu i:interrupt m:memory n:network

d:disk adapter u:disk device v:disk VM p:power mgmt

x:vsan

Switching display will help you in switching and seeing what metrics you are looking at.

Switch display:

c:cpu i:interrupt m:memory n:network

d:disk adapter u:disk device v:disk VM p:power mgmt

x:vsan

And,

V = only show virtual machine worlds e = Expand/Rollup CPU statistics, show details of all worlds associated with group (GID) k = kill world, for tech support purposes only! l = limit display to a single group (GID), enables you to focus on one VM # = limiting the number of entitites, for instance the top 5

2 = highlight a row, moving down 8 = highlight a row, moving up 4 = remove selected row from view e = statistics broken down per world 6 = statistics broken down per world

Add/Remove fields:

f <type appropriate character>

Changing the order:

o <move field by typing appropriate character uppercase = left, lowercase = right>

Saving all the settings you’ve changed:

W

Keep in mind that when you don’t change the file-name it will be saved and used as default settings.

Help:

?

Special cases:

1. Viewing specific fields.

Now we will get into some nitty and gritty details of how to workaround and look for things which can some time elude you.

I was troubleshooting an issue for customer during which I wanted to check if there are packet drops occuring on host(s) in cluster. I tped esxtop, pressed 'n' to shift into Network. By default you will not see the drop packets counter due to screen size.


Press for F,

Current Field order: AbcDEFGHIJKLMNopq

* A: PORT-ID = Port Id

B: UPLINK = Uplink(Y/N)

C: PNIC = Physical Nic Properties

* D: USED-BY = Used By Name

* E: TEAM-PNIC = Team Uplink Physcial NIC Name

* F: DNAME = Device Name

* G: PKTTX/s = Packets Tx/s

* H: MbTX/s = MegaBits Tx/s

* I: PSZTX = Average Packet Size Tx (bytes)

* J: PKTRX/s = Packets Rx/s

* K: MbRX/s = MegaBits Rx/s

* L: PSZRX = Average Packet Size Rx (bytes)

* M: DRPTX/s = %Packets Dropped (Tx)

* N: DRPRX/s = %Packets Dropped (Rx)

O: ACTN/s = Actions/s

P: MULTICAST/s = Multicast Packets/s

Q: BROADCAST/s = Broadcast Packets/s

Toggle fields with a-q, any other key to return:


Not the Current Field order: AbcDEFGHIJKLMNopq. This is a great place to adjust what you want to see in limite real estate of screen space you have.

Now presee enter and go back to the esxtop screen (press n if oyuare not in Network view).

Press oO, and use a-q to change order. Uppercase moves a field left, lowercase moves a field right.

Since DRPTX/s and DRPRX/s are our interests here, use uppercase or lowercase M and N respectively to move the current Field order: AbcDEFGHIJKLMNopq. This was a eureka moment for me when I was frantically looking how to do that.



Now press enter and go back. Voila!


2. Viewing contents where you need to scroll down.

An example scenario is when the cluster has huge number of VM's. ESXTOP does not provide the ability to scroll down. Here is a workaround to overcome this scenario.


-Export-Entity:

esxtop -export-entity /tmp/test


Open the file using vi command and commentout the with # for stats that are not required.

example:

vi /tmp/test

In this case I want to comment out VM's which I do not need to see so that I can focus on a DB VM whose metrics I am interested in.


In the above step, we have commented out the unnecessary data with symbol “#” in front of the object. You need to execute the below command.

esxtop -import-entity /tmp/test

Now, you will will be able see way less number of VM's



more use cases to follow ...........


17 views0 comments

Recent Posts

See All

Hosts not accessible - troubleshooting

This is one of the most common issues a VMware admin will run into time in time. Host showing 'Not Responding' in vCenter and being unmanageable through the DCUI. Here is a summary of what happened wi

Reset root password of ESXi host

Problem: The root password we have as default is not working from SSH but able to log in through IPMI (DCUI). Were there multiple failed login attempts? Have you tried disabling lockdown mode and enab

Comments


Post: Blog2_Post
bottom of page