Metadata Fields
When appearing in machine-parsable formats,
numeric statistics have these self-describing metadata fields:
units
–
What the numbers mean. Example values:
packets
,
bytes
,
KB
for kilobytes,
us
for microseconds, and others
as appropriate.
type
–
Indicates how to interpret the number.
static
–
The value is for configuration and is not expected to change frequently.
For
instance: a reservation, or the maximum CPU speed.
instant
–
Instantaneous measurement of the current value. Expected to go up or down over
time. For instance: current memory usage.
accumulate
– Continuous sum of all data over
time. Non-decreasing. The statistics consumer must compute the difference
between two values at different times and convert it into a rate. For instance:
CPU time used, bytes sent, memory swapped in.
Four examples below show the same statistic,
encoded in different formats:
Text
$vmware-toolbox-cmd stat raw text vnet 00:0c:29:1e:23:f3size.tx = 38137 num.rx = 10920 size.rx = 1312789 reservation = 0 limit = -1
YAML
$vmware-toolbox-cmd stat raw yaml vnet 00:0c:29:1e:23:f3num.tx: type: accumulate units: packets value: 209 size.tx: type: accumulate units: bytes value: 38137 num.rx: type: accumulate units: packets value: 10920 size.rx: type: accumulate units: bytes value: 1312789 reservation: type: static units: MBps value: 0 limit: type: static units: MBps value: -1
XML (formatted here for
presentation)
$ vmware-toolbox-cmd stat raw xml vnet 00:0c:29:1e:23:f3 <metrics session="4004861987670969122"> <metric name="num.tx" type="accumulate" units="packets">209</metric> <metric name="size.tx" type="accumulate" units="bytes">38137</metric> <metric name="num.rx" type="accumulate" units="packets">10992</metric> <metric name="size.rx" type="accumulate" units="bytes">1322161</metric> <metric name="reservation" type="static" units="MBps">0</metric> <metric name="limit" type="static" units="MBps">-1</metric> </metrics>
JSON (formatted here for
presentation)
$vmware-toolbox-cmd stat raw json vnet 00:0c:29:1e:23:f3{"num.tx":{"type":"accumulate","units":"packets","value":209}, "size.tx":{"type":"accumulate","units":"bytes","value":38137}, "num.rx":{"type":"accumulate","units":"packets","value":11068}, "size.rx":{"type":"accumulate","units":"bytes","value":1331791}, "reservation":{"type":"static","units":"MBps","value":0}, "limit":{"type":"static","units":"MBps","value":-1}}