You can monitor network traffic statistics for the virtual ports of an elastic virtual switch to obtain the following information:
The amount of network traffic that is sent and received by a VM, which provides information about the workload on the VM.
The number of packets that are dropped inbound (idrops) and outbound (odrops). These values provide information about faulty networks.
The amount of network traffic that is sent and received by all the VMs on a compute node, which helps you to perform capacity planning.
You use the evsstat command to monitor elastic virtual switches. The evsstat command reports runtime statistics for each VPort of the elastic virtual switch. It also reports the statistics of VNICs associated with the VPorts. For more information about EVS and virtual ports, see the evsadm(8) man page.
The evsstat command is a Remote Administration Daemon (RAD) client, and it communicates with a remote EVS controller to run all the evsstat subcommands. Before using the evsstat command, you must specify a resolvable hostname or the IP address of the EVS controller by using the evsadm set-prop command. The command syntax is:
$ evsadm set-prop -p controller=ssh://[username@]hostname-or-IP-address
In addition, you must set up SSH authentication by using the preshared public key between the host where you run the evsstat command and the EVS controller. You need SSH authentication with the preshared public key for the evsstat command to communicate with the EVS controller non-interactively and securely. For more information, see About SSH Authentication and the evsuser.
The command syntax for evsstat is:
$ evsstat [-f {fname=value[,...]}[,...] [[-c] -o field[,...]] [-u R|K|M|G|T|P] \ [EVS-switch-name[/VPort-name]] [interval] [count]
Specifies the name of the elastic virtual switch whose statistics you want to monitor. If the name of the elastic virtual switch is not specified, statistics for all elastic virtual switches are displayed.
Specifies the name of the VPort whose statistics you want to monitor. The statistics are displayed only for the VNIC connected to the specified VPort. You must specify the name of the elastic virtual switch and then specify the name of the VPort.
A comma-separated name-value pair used to filter the output (row selection). If multiple filters are specified, then the displayed output is a result of an AND operation among the filters. If the filter value is multivalued, then the displayed output is a result of an OR operation among the filter values. The supported filters are tenant, evs, and host.
Specifies a case-insensitive, comma-separated list of output fields to display. You can specify the following fields, which appear as columns in the output:
vport
evs
tenant
vnic
host
ipkts
rbytes
opkts
idrops
odrops
Specifies the unit in which the statistics are displayed. If not specified, then different units, as appropriate, are used to display the statistics, using the format xy.zU, where x, y, and z are numbers and U is the appropriate unit. The supported units are:
R – Raw count
K – Kilobits
M – Megabits
G – Gigabits
T – Terabits
P – Petabits
Specifies the time in seconds at which you want to refresh the network statistics.
Specifies the number of times to refresh the statistics. You must specify the interval and then specify the count.
The following example displays statistics for all elastic virtual switches.
$ evsstat VPORT EVS TENANT IPKTS RBYTES OPKTS OBYTES sys-vport0 ORA sys-global 101.88K 32.86M 40.16K 4.37M sys-vport2 ORA sys-global 4.50M 6.78G 1.38M 90.90M sys-vport0 HR sys-global 132.89K 12.25M 236 15.82K sys-vport1 HR sys-global 144.47K 13.32M 247 16.29K
The following example displays statistics for the specified elastic virtual switch, evs0.
$ evsstat ORA VPORT EVS TENANT IPKTS RBYTES OPKTS OBYTES sys-vport0 ORA sys-global 101.88K 32.86M 40.16K 4.37M sys-vport2 ORA sys-global 4.50M 6.78G 1.38M 90.90M
The following example displays statistics for the specified VPort, evs0/sys-vport2.
$ evsstat ORA/sys-vport2 VPORT EVS TENANT IPKTS RBYTES OPKTS OBYTES sys-vport2 ORA sys-global 4.50M 6.78G 1.38M 90.90M
The following example shows the statistics of a VPort with an interval value of 1 second and count value of 3. The statistics are refreshed three times with an interval of one second.
$ evsstat ORA/sys-vport2 1 3 VPORT EVS TENANT IPKTS RBYTES OPKTS OBYTES sys-vport2 ORA sys-global 4.50M 6.78G 1.38M 90.90M sys-vport2 ORA sys-global 4.50M 6.78G 1.38M 90.90M sys-vport2 ORA sys-global 4.50M 6.78G 1.38M 90.90M
The following example shows the statistics for the specified output fields.
$ evsstat -o vport,evs,vnic,host,ipkts,opkts VPORT EVS VNIC HOST IPKTS OPKTS sys-vport0 ORA vnic0 host1 101.88K 40.16K sys-vport2 ORA vnic0 host2 4.50M 1.38M sys-vport0 HR vnic1 host1 132.89K 236 sys-vport1 HR vnic1 host2 144.47K 247