To fetch a list of statistics, make a query with no statistics name supplied (in other words, no argument, NULL, or ""). The returned buffer contains a list of available metric categories. The list can be emitted in any of four supported formats. The text format is recommended for user interaction; machine-parsable formats xml, json, and yaml are recommended for program interaction.

The following examples use the CLI to demonstrate. The C language API works similarly. In the first example, the virtual machine has three disks and two network interfaces.

Return list of statistics

$ vmware-toolbox-cmd stat raw
session
host
resources
vscsi ide0:0
vscsi scsi0:0
vscsi scsi0:2
vnet 00:0c:29:1e:23:f3
vnet 00:0c:29:1e:23:f4

The second example fetches a specific statistic (vscsi scsi0:0) taken from the first example.

Get I/O statistics for a device

$ vmware-toolbox-cmd stat raw text vscsi scsi0:0
num.reads = 12605
num.writes = 1039
size.reads = 533612032
size.writes = 14279680
latency.reads = 1944173239
latency.writes = 102025122