Monday, November 26, 2018

How to get network statistics on a VM nic from SSH.


If you need to get the network statistics via SSH on a VM nic, run the commands below.

  1. 'esxcli network vm list' to get VM ID.
  2. 'esxcli network vm port list -w <VM ID>' to get port ID number.
  3. 'esxcli network port stats get -p <port ID number>' to get network statistics.
Output:
Packet statistics for port 50332931
   Packets received: 293182742829
   Packets sent: 90336672427
   Bytes received: 305397539251
   Bytes sent: 11805570153
   Broadcast packets received: 135893129
   Broadcast packets sent: 813717
   Multicast packets received: 386654045
   Multicast packets sent: 334554
   Unicast packets received: 292660195655
   Unicast packets sent: 90335524156
   Receive packets dropped: 0
   Transmit packets dropped: 0


No comments:

Post a Comment

Thank you for your comment.