First, the fundamental difference between resxtop and esxtop is that you can use resxtop remotely (or locally). esxtop can be used only on a local ESX (not ESXi) host. Both resxtop and esxtop are related to the Linux top utility.

The resxtop and esxtop commands allow command-line monitoring and collection of data for all system resources that is CPU, memory, disk, and network.

There are three modes of execution for resxtop and esxtop:

Interactive mode, which is the default mode. In this Mode all statistics are displayed as they are collected, showing how ESX/ESXi is running in real time.

Batch mode, in this mode the statistics are collected so that the output can be saved in a file and processed later.

Replay mode, in this Mode the data that was collected by the vm-support command is interpreted and played-back as esxtop statistics. It does not process the output of batch mode.

How do you launch the esxtop Interactively?

To launch esxtop interactively, log in to the ESX service console and type esxtop at the command prompt.

How do you launch the resxtop Interactively?

To launch resxtop interactively, you must first log in to a system where VMware vSphere Command-Line Interface installed.  To install VMware vSphere Command-line Interface, you need to either download and install a vSphere CLI package on a Linux host or deploy VMware vSphere Management Assistant (vMA) to your ESX/ESXi host. vMA is a preconfigured Linux appliance. Versions of the vSphere CLI package are available for Linux and Windows systems. However, since resxtop is based on a Linux tool, it is only available in the Linux version of vSphere CLI.

The command-line options are the same as for esxtop (except for the R option), with additional connection options.

–server [server] –username [username] –password [password] –vihost [vihost]

[server] – A required field that refers to the name of the remote host to connect to. If connecting directly to the ESX/ESXi host, use the name of that host. If your connection to the ESX/ESXi host is indirect (that is, through vCenter Server), use the name of the vCenter Server system for this option.

[vihost] – If connecting indirectly (through vCenter Server), this option refers to the name of the ESX/ESXi host that you want to monitor. You must use the name of the ESX/ESXi host as shown in the vCenter Server inventory.
If connecting directly to the ESX/ESXi host, this option is not used.

[portnumber] – Port number to connect to on the remote server. The default port is 443, and unless this is changed on the server, this option is not needed.

[username] – User name to be authenticated when connecting to the remote host. The remote server prompts you for a password.

How do you navigate through resxtop and esxtop?
resxtop and esxtop supports several single-key commands when run in interactive mode:

·         c – Switch to the CPU resource utilization panel (this is the default panel).
·         m – Switch to the memory resource utilization panel.
·         d – Switch to the storage (disk) adapter resource utilization panel.
·         u – Switch to the storage (disk) device resource utilization panel.
·         v – Switch to virtual disk resource utilization screen.
·         n – Switch to the network resource utilization panel.
·         f – add/remove fields
·         o – Changing the order
·         ? – Help
·         W – save the changes made at the various screens.
·         h – Display the help screen.
·         q – Quit interactive mode.
·         Vonly 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

Here is an example of the output generated from resxtop. There are four different screens that you can view: CPU statistics (default), memory statistics, network statistics, and disk statistics.

resxtop/esxtop displays statistics based on worlds. A world is equivalent to a process in other operating systems. A world can represent a virtual machine, a VMkernel component, or the service console (if present). The following column headings help to understand worlds:

ID – World ID.resource pool ID or virtual machine ID
GID – Resource pool ID of the running world’s resource pool or virtual machine
NAME – Name of running world ; could be a resource pool name or virtual machine name

 CPU Screen:

When you press ‘ m ‘ the memory statistics appears. Here is how the Memory Screen looks like: 

How do you run the esxtop in batch mode?
resxtop/esxtop can also be run in batch mode. In batch mode, the output is stored in a file, and the data can be read using the Windows Perfmon utility.

To run in batch mode, you must first prepare for batch mode:

1. Run resxtop/esxtop in interactive mode.
Once you hit enter after typing the esxtop command, the following screen appears

2. In each of the screens, select the columns you want.

press f to go to for the field selection, at the CPU home screen press ‘f’. the following screen appears

3. Save this configuration to a file (by default ~/.esxtop4rc) using the ( W or shift +w) interactive command.

After you have prepared for batch mode, you can use resxtop/resxtop in this mode.

1. Start resxtop/esxtop to redirect the output to a file as shown above.

resxtop -a -b > analysis.csv

The filename must have a .csv extension. The utility does not enforce this, but the postprocessing tools require it.

2. Process statistics collected in batch mode using tools such as Microsoft Excel and Perfmon.

In batch mode, resxtop/esxtop does not accept interactive commands. In batch mode, the utility runs until it produces the number of iterations requested or until you end the process by pressing Ctrl+C.

Running resxtop/esxtop in batch mode with all the counters enabled results in an incredibly large CSV file that cannot easily be parsed. resxtop/esxtop is constructed so that the batch output file can be readily consumed by Perfmon.

Perfmon can be used for:

• Quickly analyzing results.
• Generating smaller CSV files of a subset of the data that can be more easily consumed by other analysis tools, such as Microsoft Excel.

To open and view the batch output CSV file
1. Transfer the .csv file to a Windows system and launch Perfmon.
2. Right-click the graph and select Properties.
3. Click the Source tab.
4. Under Data source, select the Log files radio button.
5. Click the Add button.
6. Browse to and select the .csv file created by esxtop, then click OK.
7. Click the Apply button.
8. (Optional) Use the sliders under the Time Range button to reduce the range of time over which
the data will be displayed.
9. Click OK.

Leave a Reply