VMware

ESXTOP commands: The Ultimate Guide

Master VMware's ESXTOP utility with our comprehensive guide. Explore its features, commands, and how to use it to troubleshoot performance.

Quick Summary

  • Table of contentsESXTOP commands for troubleshooting performance issuesESXTOP CPU MetricsESXTOP Memory MetricsUnderstanding Guest Physical MemoryESXTOP Disk MetricsAnalyzing Disk Performance with ESXTOPESXTOP Network MetricsNetwork Statistics and ESXTOPSaving ESXTOP Results for AnalysisTop VMware ESXi commands you need to knowFrequently Asked QuestionsWhat is the benefit of running ESXTOP in batch mode.
  • For example, the following command will run esxtop in batch mode for 60 seconds, refreshing once every 5 seconds (for a total of 12 samples), and output the data to a CSV file.
  • It enables you to determine the exact amount of CPU and memory a particular VM is using, evaluate the network data it’s transmitting and receiving, and scrutinize its storage performance.

When your virtual machines or ESXi hosts hit performance snags, it’s key to know how to identify and fix these issues. A really useful tool you can use is ESXTOP. It’s a command line tool that gives live info about the ESXi host and virtual machines.

What is ESXTOP?

ESXTOP is a core command-line tool that comes with VMware ESXi, delivering instantaneous, comprehensive performance details for your ESXi system and the virtual machines it controls.

Valued by system managers and IT professionals, ESXTOP presents a detailed perspective on the tasks within an ESXi host. It empowers you to analyze system elements such as CPU demand, memory allocation, network data flow, and storage performance.

ESXTOP stands out due to its ability to delve into performance specifics of individual virtual machines. It enables you to determine the exact amount of CPU and memory a particular VM is using, evaluate the network data it’s transmitting and receiving, and scrutinize its storage performance.

ESXTOP’s strength lies in its capacity to provide this data live, right from the command line. This ongoing oversight allows you to maintain vigilant surveillance on your ESXi system’s wellbeing and respond swiftly to any performance bumps.

Additionally, ESXTOP is not merely a monitoring tool – it’s an effective instrument for performance troubleshooting. It assists in pinpointing bottlenecks, grasping resource competition, and efficiently enhancing the performance of your virtual setting.

ESXTOP commands for troubleshooting performance issues

The ultimate goal of using ESXTOP is to troubleshoot performance issues effectively. This involves understanding what the performance metrics mean, reading the ESXTOP results, and identifying when something is not right. You can also use the vSphere Management Assistant (vMA) to manage ESXTOP remotely and handle batch mode operations more efficiently.

To access esxtop, you’ll first need to initiate an SSH session to the ESXi host or open the ESXi shell directly if you have console access. This can be done with an SSH tool like PuTTY. The syntax would look like:

ssh root@<YourESXiHostnameOrIPAddress>

Once logged in, you can start ESXTOP by simply typing esxtop at the command line:

esxtop

From here, you can use the following keys to navigate between different views:

c : CPU screen
m : Memory screen
d : Disk Adapter screen
u : Disk Device screen
v : Disk VM screen
n : Network screen

To view power management information, press the “p” key:

p

The “f” key allows you to change the fields that are displayed for each view. For example, to add the NWLD (Number of Worlds) field to the CPU screen:

f c

To monitor a particular VM, use the “V” command:

V

To highlight a specific row (for example, a VM or a disk device), use the “h” command:

h

To run esxtop in batch mode, which is useful for gathering long-term statistics, you can use the “-b” flag. For example, the following command will run esxtop in batch mode for 60 seconds, refreshing once every 5 seconds (for a total of 12 samples), and output the data to a CSV file:

esxtop -b -d 5 -n 12 > esxtop_output.csv

Remember, ESXTOP commands are case-sensitive, so be sure to use the correct case.

These are just a few of the commands and options available in ESXTOP. The utility has a comprehensive help screen that you can access at any time by pressing “h”. It’s always a good idea to refer to the official VMware documentation for the most detailed and up-to-date information about using ESXTOP.

ESXTOP CPU Metrics

The way a virtual machine uses CPU resources is key to its performance. ESXTOP gives you a detailed view of CPU activities. This includes the percentage of time each virtual machine runs on the CPU, how often the CPU scheduler is used, and when there is competition for CPU resources. If you notice a high value in CPU competition, it might mean there’s a performance issue that needs to be fixed.

Let’s look at the “c” key, for instance. This command spends its time bringing up the CPU view. This display offers invaluable insight into CPU utilization across your ESXi host, CPU resources, and how the CPU scheduler is working. Keep an eye on CPU contention; a high value can indicate potential performance issues.

ESXTOP Memory Metrics

Getting ESXi host memory usage goes beyond merely knowing the quantity of memory in use. It’s crucial to comprehend the functionality of the memory and the processes utilizing it. ESXTOP equips you with the knowledge of the VM group, VM worlds, and other worlds (processes) operating on the ESXi system. This helps in gaining a nuanced understanding of the system’s undertakings.

The “m” key reveals the memory view. Here, you get detailed information about physical memory usage, including guest physical memory and memory size of each VM. You’ll see if memory is being swapped or compressed, which can impact performance.

Understanding Guest Physical Memory

ESXTOP offers a rich perspective into how guest physical memory is used. For instance, you might find a guest operating system actively compressing memory, which can slow down VM performance. The memory view will show if the VM is accessing compressed memory or swapped pages, which can also be signs of performance issues.

Understanding memory usage isn’t just about knowing how much memory is being used. You also need to understand how the memory is used and what processes are using it. ESXTOP provides insight into the VM group, VM worlds, and other worlds (processes) running on the ESXi system, giving you a deeper understanding of the system’s activities.

ESXTOP Disk Metrics

Disk performance is an area often associated with storage performance issues. ESXTOP provides insights into disk device and disk adapter activities. By analyzing these, you can identify if a particular VM is causing high disk IO, the average response time of a storage device, or if there are too many SCSI reservations.

Analyzing Disk Performance with ESXTOP

ESXTOP’s disk view (accessible by pressing “d” for disk adapter view or “u” for disk device view) offers crucial insights into storage performance issues. You can see the average response time of a storage device, the amount of time a command spends in the VMkernel, and any SCSI commands or other SCSI commands that are taking an unusually long time.

This view can also show if a particular VM or disk device is causing performance issues. For instance, you might see an unusually high value of vendor string requests, or perhaps unit attention commands that should not be present. Both can indicate performance issues that require attention.

ESXTOP Network Metrics

Finally, network performance is an important area to monitor. ESXTOP allows you to display network statistics, helping you understand if the VM is generating high network traffic or performance issues at the network layer.

Network Statistics and ESXTOP

Press “n” to access ESXTOP’s network view, which shows the network statistics for your VMs and ESXi hosts. This view helps to identify if the guest OS is generating excessive network traffic or if there are any network-related performance issues.

Saving ESXTOP Results for Analysis

A single ESXTOP session offers a real-time snapshot of performance, but sometimes, you need a broader perspective. This is where ESXTOP’s batch mode comes in handy. By running ESXTOP in batch mode, you can capture esxtop results over a specific duration, saving the data to a CSV file.

To run ESXTOP in batch mode, use the “-b” flag, like this:

esxtop -b -d 5 -n 12 > esxtop_output.csv

In the above command, ESXTOP will run in batch mode, capturing data every 5 seconds for a total of 12 iterations and then writing the data to a file called “esxtop_output.csv”.

This file can be analyzed using other tools to identify performance trends, find bottlenecks, and troubleshoot performance issues.

Frequently Asked Questions

What is the benefit of running ESXTOP in batch mode?

When you run ESXTOP in batch mode, you can collect performance info over a long time, which makes spotting trends and possible slow-downs simpler. You can store this data in a CSV file, giving you a useful resource for future performance fixes.

How does poor NUMA locality impact VM performance?

Poor NUMA locality occurs when a virtual machine’s memory usage is spread across multiple physical NUMA nodes. This can increase memory latency and impact performance. With ESXTOP, you can identify poor NUMA locality and consider possible solutions, like resizing your VMs or adjusting your ESXi host’s NUMA configuration.

What does high CPU utilization indicate?

High CPU utilization indicates that the virtual CPUs of your virtual machines are heavily used, potentially leading to performance issues. ESXTOP can help identify which VM or process is causing high CPU usage, aiding you in optimizing your CPU resources.

How can I use ESXTOP to optimize my VM’s memory?

ESXTOP provides a detailed look into memory usage, including guest physical memory, swap memory, and compressed memory. By understanding these metrics, you can adjust VM memory allocations or identify whether you need to provision more memory to improve performance.

How does ESXTOP assist with storage performance issues?

ESXTOP’s disk views provide insight into how your VMs is accessing storage. You can identify issues like high latency or excessive SCSI reservations that might be impacting storage performance. In addition, the “d” and “u” commands display statistics for disk adapters and disk devices, respectively.

How does ESXTOP relate to other performance monitoring tools?

ESXTOP, incorporated as a command line feature within ESXi, delivers performance data in an immediate, on-the-spot manner. Despite the presence of other tools such as vSphere Management Assistant and Performance Monitoring, ESXTOP’s distinguishing factor lies in its ability to present an intricate, moment-to-moment snapshot of performance for both the host and its resident VMs.

What is the balloon driver, and why is it significant in ESXTOP views?

The balloon driver is part of VMware’s memory management system that reclaims unused memory from virtual machines when the ESXi host is under memory pressure. If you see frequent ballooning activity in the ESXTOP views, it could be an indication that your host might benefit from additional physical memory.

How does the command line interface of ESXTOP compare to graphical user interfaces?

While graphical interfaces provide a more user-friendly and intuitive way to monitor performance, ESXTOP’s command line interface offers a much more detailed and real-time view. For VMware admins who are comfortable with the command line, ESXTOP can provide a level of insight that’s hard to match.

What is the role of power management in ESXTOP?

The management of power can directly influence the performance of your ESXi host. ESXTOP offers a view dedicated to power management, assisting in discerning how power configurations are impacting the host’s performance. This understanding opens the door for potential adjustments to settings, enhancing operational efficiency as needed.

Can ESXTOP help me understand performance metrics related to my guest operating system?

Yes, ESXTOP provides detailed metrics related to your guest operating system. These metrics can help you understand how your guest OS is utilizing CPU and memory resources, identify potential issues, and make necessary adjustments to improve performance.

Mastering ESXTOP

Learning ESXTOP commands, views, and metrics can give you a strong advantage when working with your VMware vSphere environment. This tool can be used for both refining performance and identifying problems. ESXTOP can assist in solving a variety of performance issues, such as competition for CPU resources or bad NUMA locality, helping you to ensure your virtual machines operate without hitches.

Other posts you may like

ESXTOP commands for troubleshooting performance issues

The ultimate goal of using ESXTOP is to troubleshoot performance issues effectively. This involves understanding what the performance metrics mean, reading the ESXTOP results, and identifying when something is not right. You can also use the vSphere Management Assistant (vMA) to manage ESXTOP remotely and handle batch mode operations more efficiently.

To access esxtop, you’ll first need to initiate an SSH session to the ESXi host or open the ESXi shell directly if you have console access. This can be done with an SSH tool like PuTTY. The syntax would look like:

ssh root@<YourESXiHostnameOrIPAddress>

Once logged in, you can start ESXTOP by simply typing esxtop at the command line:

esxtop

From here, you can use the following keys to navigate between different views:

c : CPU screen
m : Memory screen
d : Disk Adapter screen
u : Disk Device screen
v : Disk VM screen
n : Network screen

To view power management information, press the “p” key:

p

The “f” key allows you to change the fields that are displayed for each view. For example, to add the NWLD (Number of Worlds) field to the CPU screen:

f c

To monitor a particular VM, use the “V” command:

V

Also, to highlight a specific row (for example, a VM or a disk device), use the “h” command:

h

To run esxtop in batch mode, which is useful for gathering long-term statistics, you can use the “-b” flag. For example, the following command will run esxtop in batch mode for 60 seconds, refreshing once every 5 seconds (for a total of 12 samples), and output the data to a CSV file:

esxtop -b -d 5 -n 12 > esxtop_output.csv

Remember, ESXTOP commands are case-sensitive, so be sure to use the correct case.

These are just a few of the commands and options available in ESXTOP. The utility has a comprehensive help screen that you can access at any time by pressing “h”. It’s always a good idea to refer to the official VMware documentation for the most detailed and up-to-date information about using ESXTOP.

ESXTOP CPU Metrics

The way a virtual machine uses CPU resources is key to its performance. ESXTOP gives you a detailed view of CPU activities. This includes the percentage of time each virtual machine runs on the CPU, how often the CPU scheduler is used, and when there is competition for CPU resources. If you notice a high value in CPU competition, it might mean there’s a performance issue that needs to be fixed.

Let’s look at the “c” key, for instance. This command spends its time bringing up the CPU view. This display offers invaluable insight into CPU utilization across your ESXi host, CPU resources, and how the CPU scheduler is working. Keep an eye on CPU contention; a high value can indicate potential performance issues.

ESXTOP CPU view
ESXTOP CPU view

ESXTOP Memory Metrics

Getting ESXi host memory usage goes beyond merely knowing the quantity of memory in use. It’s crucial to comprehend the functionality of the memory and the processes utilizing it. ESXTOP equips you with the knowledge of the VM group, VM worlds, and other worlds (processes) operating on the ESXi system. This helps in gaining a nuanced understanding of the system’s undertakings.

The “m” key reveals the memory view. Here, you get detailed information about physical memory usage, including guest physical memory and memory size of each VM. You’ll see if memory is being swapped or compressed, which can impact performance.

Memory view in ESXTOP
Memory view in ESXTOP

Understanding Guest Physical Memory

ESXTOP offers a rich perspective into how guest physical memory is used. For instance, you might find a guest operating system actively compressing memory, which can slow down VM performance. The memory view will show if the VM is accessing compressed memory or swapped pages, which can also be signs of performance issues.

Understanding memory usage isn’t just about knowing how much memory is being used. You also need to understand how the memory is used and what processes are using it. ESXTOP provides insight into the VM group, VM worlds, and other worlds (processes) running on the ESXi system, giving you a deeper understanding of the system’s activities.

ESXTOP Disk Metrics

Disk performance is an area often associated with storage performance issues. ESXTOP provides insights into disk device and disk adapter activities. By analyzing these, you can identify if a particular VM is causing high disk IO, the average response time of a storage device, or if there are too many SCSI reservations.

Analyzing Disk Performance with ESXTOP

ESXTOP’s disk view (accessible by pressing “d” for disk adapter view or “u” for disk device view) offers crucial insights into storage performance issues. You can see the average response time of a storage device, the amount of time a command spends in the VMkernel, and any SCSI commands or other SCSI commands that are taking an unusually long time.

This view can also show if a particular VM or disk device is causing performance issues. For instance, you might see an unusually high value of vendor string requests, or perhaps unit attention commands that should not be present. Both can indicate performance issues that require attention.

Viewing disk performance using ESXTOP
Viewing disk performance using ESXTOP

ESXTOP Network Metrics

Finally, network performance is an important area to monitor. ESXTOP allows you to display network statistics, helping you understand if the VM is generating high network traffic or performance issues at the network layer.

One of the areas I have used ESXTOP for troubleshooting network issues is seeing which vmnic a particular virtual machine is running on. If you have weird network behavior from a subset of virtual machines on your ESXi host and have multiple uplinks to your host, you could be experiencing issues with one uplink or another, improperly tagged VLANs on one uplink vs another, etc.

I wrote this post quite a while ago but still applies: ESXTOP troubleshoot VM network connectivity.

Network Statistics and ESXTOP

Press “n” to access ESXTOP’s network view, which shows the network statistics for your VMs and ESXi hosts. This view helps to identify if the guest OS is generating excessive network traffic or if there are any network-related performance issues.

Network performance from the command line
Network performance from the command line

Saving ESXTOP Results for Analysis

A single ESXTOP session offers a real-time snapshot of performance, but sometimes, you need a broader perspective. This is where ESXTOP’s batch mode comes in handy. By running ESXTOP in batch mode, you can capture esxtop results over a specific duration, saving the data to a CSV file.

To run ESXTOP in batch mode, use the “-b” flag, like this:

esxtop -b -d 5 -n 12 > esxtop_output.csv

In the above command, ESXTOP will run in batch mode, capturing data every 5 seconds for a total of 12 iterations and then writing the data to a file called “esxtop_output.csv”.

This file can be analyzed using other tools to identify performance trends, find bottlenecks, and troubleshoot performance issues.

Top VMware ESXi commands you need to know

Frequently Asked Questions

What is the benefit of running ESXTOP in batch mode?

When you run ESXTOP in batch mode, you can collect performance info over a long time, which makes spotting trends and possible slow-downs simpler. You can store this data in a CSV file, giving you a useful resource for future performance fixes.

How does poor NUMA locality impact VM performance?

Poor NUMA locality occurs when a virtual machine’s memory usage is spread across multiple physical NUMA nodes. This can increase memory latency and impact performance. With ESXTOP, you can identify poor NUMA locality and consider possible solutions, like resizing your VMs or adjusting your ESXi host’s NUMA configuration.

What does high CPU utilization indicate?

High CPU utilization indicates that the virtual CPUs of your virtual machines are heavily used, potentially leading to performance issues. ESXTOP can help identify which VM or process is causing high CPU usage, aiding you in optimizing your CPU resources.

How can I use ESXTOP to optimize my VM’s memory?

It provides a detailed look into memory usage, including guest physical memory, swap memory, and compressed memory. By understanding these metrics, you can adjust VM memory allocations or identify whether you need to provision more memory to improve performance.

How does ESXTOP assist with storage performance issues?

The disk views provide insight into how your VMs is accessing storage. You can identify issues like high latency or excessive SCSI reservations that might be impacting storage performance. In addition, the “d” and “u” commands display statistics for disk adapters and disk devices, respectively.

How does ESXTOP relate to other performance monitoring tools?

ESXTOP, incorporated as a command line feature within ESXi, delivers performance data in an immediate, on-the-spot manner. Despite the presence of other tools such as vSphere Management Assistant and Performance Monitoring, ESXTOP’s distinguishing factor lies in its ability to present an intricate, moment-to-moment snapshot of performance for both the host and its resident VMs.

What is the balloon driver, and why is it significant in ESXTOP views?

The balloon driver is part of VMware’s memory management system that reclaims unused memory from virtual machines when the ESXi host is under memory pressure. If you see frequent ballooning activity in the ESXTOP views, it could be an indication that your host might benefit from additional physical memory.

How does the command line interface of ESXTOP compare to graphical user interfaces?

While graphical interfaces provide a more user-friendly and intuitive way to monitor performance, the command line interface offers a much more detailed and real-time view. For VMware admins who are comfortable with the command line, ESXTOP can provide a level of insight that’s hard to match.

What is the role of power management in ESXTOP?

Power management can have a direct impact on your ESXi host’s performance. ESXTOP provides a power management view that can help you understand how power settings are affecting your host’s performance, allowing you to adjust settings if needed to improve efficiency.

Yes, ESXTOP provides detailed metrics related to your guest operating system. These metrics can help you understand how your guest OS is utilizing CPU and memory resources, identify potential issues, and make necessary adjustments to improve performance.

Mastering ESXTOP

Learning ESXTOP commands, views, and metrics can give you a strong advantage when working with your VMware vSphere environment. This tool can be used for both refining performance and identifying problems. ESXTOP can assist in solving a variety of performance issues, such as competition for CPU resources or bad NUMA locality, helping you to ensure your virtual machines operate without hitches.

The more you use ESXTOP, the more comfortable you’ll become with its commands and views. It will allow you to improve performance and resolve issues more effectively.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.