The fetch-statistics facility returns semi-structured data in a variety of formats for use within a the guest OS. Four encodings are supported:
- text – simple key-value pairs
- XML – eXtensible Markup Language fragment
- JSON – JavaScript Object Notation
- YAML – Yet Another Markup Language, a human-readable JSON superset intended for data transmission
Statistics are accurate within the current session only. A session represents a powered-on virtual machine running on a single ESXi host. Sessions may be discontinuous across session changes, so monotonically increasing metrics can suddenly decrease. New sessions result from suspending a virtual machine, reverting to a snapshot, vMotion, or certain types of hot-plug operations. It is up to the consumer of statistics to notice that the session has changed and deal with numerical discontinuities.
Guest OS statistics are supported for troubleshooting and support only. Specifically:
- Individual metrics are not guaranteed to be forward or backward compatible. Programs using these metrics are expected to tolerate incompatibility, and are cautioned against programming practices that could break when a metric behaves differently.
- Metrics might be added, removed, or modified to have a different meaning. For example: co-stop time changed meaning between ESXi 4.1 and ESXi 5.0.
- VMware reserves the right to make changes, but will try to avoid gratuitous changes. Most changes will still provide equivalent information, but possibly in a different form that better reflects the ESXi host implementation providing the metrics.
This support declaration is similar to the compatibility guarantee for the esxtop command, whose statistics the Guest SDK reflects. See https://communities.vmware.com/docs/DOC-9279 for details about esxtop.