VMware Cloud Community
windvally
Contributor
Contributor

How can get real time Network-adapter's usage for an VM?

I want get real time Network-adapter's usage for an VM.

I'm a beginner for PowerCli.

0 Kudos
2 Replies
LucD
Leadership
Leadership

You can use the Get-Stat cmdlet with the Realtime switch.

Something like this

$counter = "net.usage.average"

$vm = Get-VM MyVM
Get-Stat -Entity $vm -Stat $counter -Realtime -MaxSamples 1 

It will show you the usage for the vNIC and the vmnics on the ESXi host.

Depending on what you want to see, you can filter on the Instance property.

You can also retrieve the instances from multiple intervals.

Let me know what exactly you want to report on.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

windvally
Contributor
Contributor

Thanks,LucD.

The command your give is useful.

0 Kudos