Output of esxtop defaults to non-interactive CSV with unknown TermInfo
search cancel

Output of esxtop defaults to non-interactive CSV with unknown TermInfo

book

Article ID: 339485

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • The command-line performance analysis utility esxtop or resxtop unexpectedly emits comma-separated-value (CSV) output instead of providing an interactive console.

    For example:

    "(CSV) (UTC)(0)","\\localhost\Memory\Memory Overcommit (1 Minute Avg)","\\localhost\Memory\Memory Overcommit (5 Minute Avg)","\\localhost\Memory\Memory Overcommit (15 Minute Avg)","\\localhost\Physical Cpu Load\Cpu Load (1 Minute Avg)","\\localhost\Physical Cpu Load\Cpu Load (5 Minute Avg)", ...

  • The first line of the comma-separated-value (CSV) output from esxtop and resxtop reports a missing termcap entry.

    For example:

    esxtop -n 1 | head -c 80
    no termcap entry for a `ACMETerminal' terminal"(PDH-CSV 4.0) (UTC)(0)","\\loca~


Environment

VMware ESX Server 3.5.x
VMware ESXi 3.5.x Embedded
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.1
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Installable
VMware ESXi 4.0.x Embedded
VMware ESXi 4.1.x Embedded
VMware ESX Server 3.0.x
VMware ESX 4.0.x
VMware ESX 4.1.x
VMware vSphere ESXi 5.0

Resolution

The esxtop and resxtop command-line utilities can provide an interactive console if there is a supported Terminfo description for the client console. Terminfo is a description of the features that enables programs to use display terminals in a device-independent manner. When connecting to an ESX host remotely via SSH, most SSH clients specify a supported or preferred Terminfo in the TERM environment variable. ESX and ESXi hosts may not have a Terminfo definition that matches the TERM defined by the client.

When the esxtop and resxtop utilities are invoked in interactive mode, they consult the TERM environment variable and look for a matching Terminfo definition in /usr/share/terminfo/. If no match is found, the utility cannot control full-screen character-based drawing on the terminal and defaults to batch mode, emitting CSV output.

Client-Specified TERM Environment Variable

To determine the Terminfo definition requested by a client:

  1. Open a console to the location where esxtop or resxtop is being invoked. If running on the ESX/ESXi host, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 (1017910).

  2. Determine the current value of the TERM environment variable using the command:

    echo $TERM

    For example:

    ~ # echo $TERM
    xterm-color

Supported Terminfo on VMware ESX/ESXi hosts

ESX and ESXi hosts have a list of known terminal types which they support drawing to. For ESX, around 2500 Terminfo definitions are defined. For ESXi, the list is limited to 4 simple terminals. To determine the Terminfo definitions available on a given host:

  1. Open a console to the ESX or ESXi host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 (1017910).

  2. Obtain a list of terminals using the command:

    find /usr/share/terminfo/ -type f

    For example:

    /usr/share/terminfo/x/xterm
    /usr/share/terminfo/a/ansi
    /usr/share/terminfo/v/vt102
    /usr/share/terminfo/l/linux

Use a supported Terminfo definition

Change the client's preferred terminal to match one of the supported terminals in the host's Terminfo description database using one of these methods:

  • Set the TERM environment variable to use a terminal definition similar to the preferred one:

    1. Open a console to the location where esxtop or resxtop is being invoked. If running on the ESX/ESXi host, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 (1017910).

    2. Invoke the esxtop or resxtop command, specifying the TERM environment variable for the invocation which matches one of the supported Terminfo definitions on the host.

      For example:

      TERM=xterm esxtop

  • Configure the third-party client terminal or SSH client to specify a preferred terminal definition matching a supported Terminfo definition on the host. It is usually possible to put a client terminal or SSH client into xterm mode. For more information, see the documentation for your client terminal or SSH client.


Additional Information

For more information on resxtop and esxtop, see the Performance Monitoring Utilities: resxtop and esxtop section of in the Resource Management Guide for your version of VMware ESX/ESXi.

Unable to connect to an ESX host using Secure Shell (SSH)
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x