VMware VS4-STD-C Evaluator Guide - Page 58
Formatting esxcli Output, interface list, formatter, format-param - ++ pair
View all VMware VS4-STD-C manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 58 highlights
VMware vSphere 5.0 Evaluation Guide - Volume One Formatting esxcli Output It is common to use the output of the esxcli command as input to another program or for inclusion in a report. To facilitate this, the esxcli command enables you to format and filter the command output in one of three formats: comma-separated values (CSV), key-value pair, or XML. In addition, you can specify which fields to include in the output. In the following example, we need to generate a report showing all the configured interfaces on a host along with the vSwitch and port group to which they are assigned. We start by running the esxcli network ip interface list command, as follows: Figure 70. esxcli network ip interface list Command from the ESXi Shell The output gives us the information we need, but it is very verbose, requiring the user to use the scroll bar to see the data for all the interfaces. Because we need only a summary showing the interface name, vSwitch, and port group, we can refine our command using the --formatter and --format-param options, as follows: TECHNICAL WHITE PAPER / 58