Batch mode allows you to collect and save resource utilization statistics in a file.

After you prepare for batch mode, you can use esxtop or resxtop in this mode.

Prepare for Batch Mode

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

Procedure

  1. Run resxtop (or esxtop) in interactive mode.
  2. In each of the panels, select the columns you want.
  3. Save this configuration to a file (by default ~/.esxtop50rc) using the W interactive command.

Results

You can now use resxtop (or esxtop) in batch mode.

Use esxtop or resxtop in Batch Mode

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

Procedure

  1. Start resxtop (or esxtop) to redirect the output to a file.
    For example:
    esxtop -b > my_file.csv 

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

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

Results

In batch mode, resxtop (or esxtop) does not accept interactive commands. In batch mode, the utility runs until it produces the number of iterations requested (see command-line option n, below, for more details), or until you end the process by pressing Ctrl+c.

Batch Mode Command-Line Options

You can use batch mode with command-line options.

Table 1. Command-Line Options in Batch Mode
Option Description
a Show all statistics. This option overrides configuration file setups and shows all statistics. The configuration file can be the default ~/.esxtop50rc configuration file or a user-defined configuration file.
b Runs resxtop (or esxtop) in batch mode.
c filename Load a user-defined configuration file. If the -c option is not used, the default configuration filename is ~/.esxtop41rc. Create your own configuration file, specifying a different filename, using the W single-key interactive command.
d Specifies the delay between statistics snapshots. The default is five seconds. The minimum is two seconds. If a delay of less than two seconds is specified, the delay is set to two seconds.
n Number of iterations. resxtop (or esxtop) collects and saves statistics this number of times, and then exits.
server The name of the remote server host to connect to (required, resxtop only).
vihost If you connect indirectly (through vCenter Server), this option should contain the name of the ESXi host you connect to. If you connect directly to the ESXi host, this option is not used.
Note: The host name needs to be the same as what appears in the vSphere Client.
portnumber The 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. (resxtop only)
username The user name to be authenticated when connecting to the remote host. You are prompted by the remote server for a password, as well (resxtop only).