VMware vSphere

 View Only

 VMware VM network total traffic monitoring

Jump to  Best Answer
mohammad hossein sharif's profile image
mohammad hossein sharif posted Jan 05, 2025 01:59 PM

I use ESXi 8.2 connected to vcenter 

is there any way to get total Byte usage of each network interface of each vm?

There is only KB/s everywhere, esxtop, vcenter, rest API, VMware vm sensors, etc....

I'm in place that network bandwidth is so expensive in datacenters so we buy traffic like 100TB of global internet traffic for one month for example

so tracking vm total traffic usage is so important for me

what I need:
a metric like vm_total_byte_tx / _rx for example

so I can get something like this:
month September:
                  vm1: 10TB TX, 10TB RX

                  vm2: 5TB TX, 100GB RX

is there any way that I can extract this metric out of ESXi or vcenter?

What I tried:
using 1 to 1 Netflow in distributed switch connected to monitoring vm --> too expensive to compute
using port mirroring in distributed switch connected to monitoring vm --> too expensive to compute

converting KB/s to Byte --> it's not possible, it's extremely inaccurate


last way is adding 3rd party virtual switch vm in between. Is it a way to do that?

I mean I can name 20 different DC like AWS, Linde, Digital ocean .... that use VMware and have accurate monitoring of vm total traffic transferred
most of them use VMware, surely there is a way inside VMware solutions, right?

vmotiontheinfo's profile image
vmotiontheinfo  Best Answer

Hi Mohammad

This is a tricky question and I am afraid there isn't any straightforward solution to this. 

You can make use of a script which would periodically run and fetch VM stats from vsish by running a command like below

/net/portsets/DvsPortset-<id>/ports/<port-id>/vmxnet3/txSummary

In case you are open to use another solution for this, you can give vRNI (Aria Operations for Networks) a shot. 

https://docs.vmware.com/en/VMware-vRealize-Network-Insight/6.9/com.vmware.vrni.using.doc/GUID-E1650B0D-C113-4608-A875-1AB73E7B4B72.html

Let me know if this helps.

Davoud Teimouri's profile image
Davoud Teimouri

You need to use third-party monitoring software or install some agents in the virtual machines such as Zabbix to monitor bandwidth usage.

Actually, vSphere doesn't collect it because this is not performance counter.