VMware Cloud Community
ravargs
Contributor
Contributor

Clear nic statistics

Hi,

I am looking for a way to clear the network statics on the esxi host. Does esxcli network or any other command provide such functionality?

For esxcli network I found only the stats get option. " esxcli network nic stats get -n vmnicX"

Thanks

RV

Tags (3)
Reply
0 Kudos
4 Replies
Ram8
Enthusiast
Enthusiast

Hi,

I've tried this too. Couldn't find an option on esxcli or any cmdlet that lets us clear the nic stats.

Thanks,

Ram.

Reply
0 Kudos
prasannag6
Enthusiast
Enthusiast

There are many parameters that can be obtained using get-stat -network switch via powercli.

Get-Stat -Entity $esxName -network -realtime | where {$_.MetricID -eq "net.usage.average" -and $_.Instance -eq "vmnic1"}

Here net.usage.average could be replaced with other metrics, and vmnic1 with other NICs. -realtime also could be replaced with specific duration using -IntervalMins, -Start 5/5/2008 -Finish 7/10/2008 etc

(Not sure if this is what you are looking for, let me know if you are looking for specific stats)

----------If you found this or any other answer helpful, please consider to award points (use Correct or Helpful buttons). Regards, Prasanna----------
Reply
0 Kudos
cianfa72
Enthusiast
Enthusiast

Thanks for reply...

I'm looking for dropped packets in the Hypervisor switch environment just to understand in which part of the emulated lab I'm losing packets...

Reply
0 Kudos
nicepat
Enthusiast
Enthusiast

~ # esxcli network nic stats get -n=vmnic0

NIC statistics for vmnic0

   Packets received: 230

   Packets sent: 212

   Bytes received: 18365

   Bytes sent: 15509

   Receive packets dropped: 0

   Transmit packets dropped: 0

   Total receive errors: 0

   Receive length errors: 0

   Receive over errors: 0

   Receive CRC errors: 0

   Receive frame errors: 0

   Receive FIFO errors: 0

   Receive missed errors: 0

   Total transmit errors: 0

   Transmit aborted errors: 0

   Transmit carrier errors: 0

   Transmit FIFO errors: 0

   Transmit heartbeat errors: 0

   Transmit window errors: 0

~ #

The 'stats' may not be listed, but please try.

Reply
0 Kudos