1、net-stats

该命令可以收集端口统计信息。可以通过net-stats -h命令显示所有标志。最常见的是使用net-stats -l来确定所有VMkernel接口、vmnic上行链路和vNIC端口的交换机端口号和MAC地址。

1.1 查看所有支持的标志

[root@localhost:~] net-stats -h

Usage:

-l                 : List ports in system

-a                 : Print absolute counts instead of per second counts

-c <start>:<end>   : specify vsi-cache files instead of live kernel

-d <level>         : verbose/debug level

-f                 : ignore version check

-h                 : this message

-i <interval>      : Interval for stats collection (default=30 seconds)

-n <iterations>    : number of iterations to run (default = 1)

-o <outfile>       : output file

Specify ports of interest as one of (Prioritized List of options)

-A                 : Get stats for all ports on host

-S <switchName>    : switch name

Lists stats for all non mgmt/test ports

-N <pnicName>      : pnic name

List stats for all ports on switch that contains 'N'

-V <vmname>        : VM name

Find switches that contains the VM's ports. Print stats for VM's ports and uplinks

-s                 : Get storage world stats

-I                 : Get SCSI and VSCSI storage I/O stats

-D <name>          : Name of SCSI device/adapter/path or VM

To be used along with storage stat specs

Can be used multiple times

eg: net-stats -I -ta -D vmhba0 -D vmhba1

OR specify port spec on command line

-p <portid>        : portNum

-t <type>          : specify a string with types of stats needed

OR specify port spec in a config file

-C <cfgFile>       : config file to read stats from

File Format: <portNum/switchName> <StatsSpec>

Stats Spec can contain one or more of these characters

c : Coalesce Stats: Only for vnics

i : Interrupt stats: Only for vmnics

h : Cluster and Packet size histograms

v : virtual nic stats

e : Detailed error stats

q : Queue Stats for port/nic

Q : Detailed Queue stats for the port/nic

f : Detailed Queue filter information for port/nic

W : world stats for the tx, vmnic/vmknic worlds

V : vcpu histograms

S : System time breakdown by pcpus

n : NIOC stats

p : Passthru/sriov stats

P : Detailed sriov/passthru stats

E : Enable stats collection for ENS module

For ENS lcore stats:

lcore in  : vnic tx/pnic rx

lcore out : vnic rx/pnic tx

I : IOChain InputFilters stats

O : IOChain OutputFilters stats

Stats Spec for Storage stats (-I)

d : SCSI Device Stats

a : SCSI Adapter Stats

t : SCSI Path Stats

s : VSCSI Stats

Note:

net-stats reads multiple vsi nodes, one at a time, using system calls

As data in the vsi nodes are continuously updated, there is going to

be some inconsistency in numbers, hopefully, not a lot

For ENS lcore stats:

lcore in  : vnic tx/pnic rx

lcore out : vnic rx/pnic tx

1.2 查看vmkernel、vNic及MAC地址等的对应关系

net-status –l

1.3 查看NetQueue或Receive Side Scaling (RSS)是否被vmnic激活

net-stats -A -t vW

1.4 查看ENS module的端口状态

net-stats -A -t E

2、Pktcap-uw

vSphere ESXi 5.5及之后版本用pktcap-uw代替了tcpdump-uw工具,tcpdump-uw工具只能捕获VMkernel接口级别的数据包。pktcap-uw工具还能捕获uplink、vSwith或vnic级别的数据帧。

从下图可以理解从虚拟机vNic到物理网卡的数据流量和抓包点:

具体抓包命令请参考:ESXI主机之pktcap-uw抓包_579YOU的博客-CSDN博客_esxi 抓包

3、NC

NC是NetCat的缩写,是一个老式的linux命令,用来验证特定端口连接。

例如如果要验证磁阵的iSCSI路径及端口是否可达,可以用以下命令:

nc -z <destination IP> 3260

4、Iperf

Iperf是一个带宽工具,它用来测试源和目的地之间的最大带宽。它通常在VM内部使用,也可以在ESXI主机内部使用,它可以使用ESXi主机上的任何VMkernel接口,包括管理网路、磁阵网络、vmotion网络等。

4.1 拷贝iperf3文件

默认情况下,ESXi不允许你在服务器模式下从shell运行iperf3,解决方式是创建一个iperf的副本:

cp /usr/lib/vmware/vsan/bin/iperf3 /usr/lib/vmware/vsan/bin/iperf3.copy

4.2 关闭防火墙

因为在默认情况下,iperf3运行在ESXi防火墙不允许的端口上。可以通过下面命令暂时关闭防火墙:一定要在之后启用ESXi防火墙!

esxcli network firewall set --enabled false

注意:测试完后要启用ESXI防火墙

esxcli network firewall set –enabled true

4.3  目的主机(server)使用iperf3绑定IP

在目标ESXi主机上使用-s标记复制。这样做的好处是,所有的VMkernel IP都可以被使用。因此,如果需要测试管理网络,请将iperf3与管理IP绑定。vMotion网络或任何其他VMkernel接口也一样。

Server (ESXi host 1):

/usr/lib/vmware/vsan/bin/iperf3.copy -s -B [IP]

4.4 源主机(client)发送连接测试请求

Client (ESXi host 2):

/usr/lib/vmware/vsan/bin/iperf3.copy -c [IP]

vSphere ESXI主机网络分析工具相关推荐

  1. linux查看服务器电源风扇,nagios监控vsphere ESXi主机硬件状态(CPU风扇、电源模块、硬盘、温度)...

    nagios监控vsphere ESXi主机硬件状态(CPU风扇.电源模块.硬盘.温度) esxi 的只读账户和密码(本文以chkhardware/chkreadonly为例) 插架下载地址,此地址附 ...

  2. 怎样使用Secure CRT查看vcenter和esxi主机的日志文件

    对ESXI主机的日志管理对于故障诊断和合规性至关重要.Esxi主机的日志通过syslog工具进行管理的,在默认的情况下,日志文件存储在主机的scratch分区中(/scratch/log/).scra ...

  3. esxi主机配置iscsi_vSphere ESXi主机配置iSCSI存储-阿里云开发者社区

    vSphere ESXi主机配置iSCSI存储 vSphere ESXi主机一般连接的存储类型有光纤存储.iSCSI存储两类.本次案例为iSCSI存储连接ESXi主机的配置. 案例环境:ESXi主机通 ...

  4. vmware esxi主机经常出现的警示“vsphere distributed switch mtu支持状态, vlan中继状态”求大神回复。

    vmware esxi主机经常出现的警示"vsphere distributed switch mtu支持状态, vlan中继状态"求大神回复. monizazaza LV1220 ...

  5. 在ESXi主机上关闭无响应的虚拟机

    适用情况 该方法适用于以下情况: ESXi主机上的虚拟机不能关闭. 虚拟机无响应且不能停止. 目的 这篇文章描述在ESXi环境中如何正确的关闭一台无响应的虚拟机. 注意: 这篇文章只适用于ESXi主机 ...

  6. VMWARE 之 ESXI 主机标准安装

    ESXI主机的作用:作为低层虚拟化系统,在此系统上,可添加多台各种各样的虚拟主机,如WINDOWS.LINUX机器等. 一.使用U盘工具把镜像文件写入到U盘上,然后插入到服务器上的USB接口上,启动服 ...

  7. vSphere ESXi命令行使用方法详解

    激活vSphere ESXi命令行的接口 如同在ESXi 3中一样,命令行接口(CLI:Command-Line Interface)也是不可用的,除非知道如何激活和访问CLI.ESXi默认配置在vm ...

  8. exi 虚拟服务器,图文教程:如何在ESXi主机上部署VMware Tools 10

    2015年9月VMware发布了VMware Tools 10.伴随着这次更新,VMware Tools 可能成为一款单独管理的产品.VMware Tools 10不再包含在ESXi的发布周期内,它拥 ...

  9. Xtract 实现 VMware Vsphere 迁主机到 Nutanix cluster

    今天介绍一款超融合平台Nutanix 跨平台迁移 工具Xtract ,直接上干货,主要介绍VMware Vsphere 迁主机到 Nutanix cluster. 同时也曝露下实际应用中遇到的一些问题 ...

最新文章

  1. WinAPI: CreateFontIndirect - 根据字体结构建立逻辑字体
  2. 如何避免让微服务测试成为研发团队最大的瓶颈?
  3. C#复制数组的两种方式,以及效率比较
  4. Maven生成可以直接运行的jar包的多种方式
  5. ubuntu18.04 docker安装kafka
  6. filter my task = true implementation logic
  7. c语言二级考试真题新疆,新疆自治区计算机二级C语言考试题库.doc
  8. 如何使用 abp 创建 module 并应用单独的数据库迁移
  9. python itertools模块_Python标准库:itertools模块
  10. 从零开始学_JavaScript_系列(22)——dojo(9)(表单、JsonRest的post方法,widget的使用思路)...
  11. 最近完成的一个可伸缩性的WEB开发框架
  12. 全民编程时代,程序员该如何保住饭碗?
  13. 微软内置真正linux_如何使用Microsoft Word的内置屏幕截图工具
  14. 数据库管理系统的基本组成
  15. OneNote使用技巧 - 7.一键修改字体样式大小(Onestatic宏插件使用,附常用宏命令代码)
  16. RC / RL串联电路计算
  17. 用Python算带有进度条的圆周率
  18. [基础服务] 常用邮箱服务地址
  19. 学习笔记:星火第一讲-使用Apollo 学习自动驾驶
  20. Unity教程之-Unity游戏技能Skill系统架构设计

热门文章

  1. windows计算机cmd,CMD是什么?Windows系统CMD命令大全
  2. 说说教育的第一性原理
  3. CSS 实现日历样式
  4. 收到礼品,拿出来Show一下.
  5. nginx html伪静态文件,nginx伪静态排除指定目录伪静态规则设置
  6. 计算机点关机无法关闭主机,为什么win7电脑关不了机怎么办_win7关机主机还在运行解决方法...
  7. 检查单 2016-06-11-01
  8. iPhone更新iOS 16.3出现应用卡死、闪退的问题怎么办?
  9. Day8(NLB服务搭建)
  10. 电子书epub修改书名