How To Monitor a VCSA Using vimtop

By using vimtop, you can avoid resource shortages and bottlenecks that may cause your vCenter Server Appliance to offer less-than-optimal performance.

By Tom Fenton

04/03/2018

The vCenter Server Appliance (VCSA) is now the de facto standard for managing a vSphere environment. In order for your vSphere environment to run efficiently, you'll want to ensure that it has all the resources that it needs. Fortunately, just for that purpose, VMware has included vimtop, a preinstalled tool to monitor all the key resources that a VCSA consumes, which is similar to Linux top or esxtop. By using vimtop, you can avoid resource shortages and bottlenecks that may cause your VCSA to offer less-than-optimal performance.

Accessing vimtop
Vimtop comes preinstalled on all VCSAs but you'll need to enable SSH on the VCSA you want to monitor in order to access it. This is done via the vSphere Web Client.

From the Home screen of the vSphere Web Client, select Administration | System Configuration (Figure 1).

Overview of vimtop
The default vimtop screen provides you with an overview and task pane. The overview pane will quantify the CPU and memory resources that your VCSA is currently consuming; the task pane will show you the processes that are consuming the most CPU resources (Figure 4).

[Click on image for larger view.]Figure 4. The vimtop home screen.

By default, vimtop refreshes its data every second. To pause this automatic refresh, press "p"; alternatively, to set a lower refresh rate, press "s" and then enter the number of seconds between screen refreshes.

To see the help menu, press "h." The help menu will explain how to add, remove and reorder columns from vimtop. To quit vimtop, press "q."

The CPU activity should never total more than 70 percent for your VCSA.

Monitoring Memory Usage with vimtop
An overview of memory usage is displayed on the default screen of vimtop, in which tasks are sorted by individual metrics. In Figure 4, the metric that tasks are currently sorted by is indicated by Z1, and the individual processes are sorted by the %CPU column. The sort order can be changed, but the process to do so is not very intuitive. For example, to sort the processes that are using the most memory, hit "z" to clear the current sort order, then press the right arrow key until the MEM MB column is highlighted, and then press "d"; this will sort the column in descending order, from the process that's using the most memory at the top to the process that's using the least at the bottom (Figure 5).

[Click on image for larger view.]Figure 5. Sort by MEM.

The most useful memory metrics to monitor consumption are %MEM (physical memory usage in percent for this process), MEM (physical memory used by this process) and VIRT (total virtual memory size of this process; this is the complete working set, including resident and swapped memory).

Monitoring Disk Usage with vimtop
CPU and memory can be monitored from the default screen. To monitor disk usage, however, you'll need to go to the disk view by pressing "k." By default, the task view will be sorted by the DISK/PART (disk and partition). I find it more useful to sort by the number of reads and writes per second issued to a disk and partition. To do this, press "z," the right arrow key until the WRITES column is highlighted, then "d." Next, press the left arrow key until the READS column is highlighted, then "d" to make READS the secondary sort column. At this point, the WRITES column will be tagged with Z1 and the READS will be tagged with Z2. Pressing "p" will pause and un-pause the refreshing of the screen (Figure 6).

Disk activity will fluctuate depending on which operations are taking place on your VCSA. For this reason, I find this particular view most useful to trouble shoot intermediate issues with a specific process or to see long-term trends that may dictate moving the VCSA to a higher-speed storage device.

Monitoring Network Usage with vimtop
As with disk metrics, a separate view is needed to see network activity. The network view can be accessed by pressing "o." When examining network statistics, I find the most useful metrics to display are RXED and TXED, the total amount of data received and sent. These metrics are not displayed on the default network view.

You can add additional metrics columns to a view. To add a new column, use the right and left arrow keys to select the display column where you want the new column to appear, and then press "c" to review the additional metrics that can be displayed. You can then use the up and down arrow keys to highlight the column you want to add; then, press the space bar and the column will instantly be added to your view. Note, if you press the space bar on a column that's already displayed, it will be removed from the view (Figure 7). Press the Esc key to exit the column selection screen (Figure 8).

Wrapping Up
By using vimtop, you can ensure that your VCSA is running optimally. In this article, I showed you how to access vimtop and use it monitor your VCSA resource usage. I also showed you how to customize the order of the metrics of process, and add additional columns to the views that you're monitoring. As a quick side note, I've noticed that not all of the columns listed were fully supported in the version of vimtop that I was using. Hopefully we'll see this fixed in future releases.

About the Author

Tom Fenton works in VMware's Education department as a Senior Course Developer. He has a wealth of hands-on IT experience gained over the past 20 years in a variety of technologies, with the past 10 years focused on virtualization and storage. Before re-joining VMware, Tom was a Senior Validation Engineer with The Taneja Group, were he headed their Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on Twitter @vDoppler.