Aug
31
Posted on 31-08-2014
Filed Under (Virtualization, VMware/ESXi) by Arun Bagul

Introduction

Sometime we need to login to Esxi server to check hardware/networking and performance/stats. Sharing few important ESXi commands..

a)  ESXi NIC List

~ # esxcfg-nics  --list
Name    PCI           Driver      Link Speed    Duplex MAC Address       MTU    Description
vmnic0  0000:01:00.00 tg3   Up   1000Mbps  Full  XX:10:55:DD:CC:XX 1500   Broadcom BCM5720 Gigabit Ethernet
vmnic1  0000:01:00.01 tg3   Up   1000Mbps  Full  XX:10:55:67:CC:XX 1500   Broadcom BCM5720 Gigabit Ethernet
vmnic2  0000:02:00.00 tg3   Up   1000Mbps  Full  XX:10:55:65:CC:YY 1500   Broadcom BCM5720 Gigabit Ethernet
vmnic3  0000:02:00.01 tg3   Up   1000Mbps  Full  XX:10:55:23:CC:00 1500   Broadcom BCM5720 Gigabit Ethernet
~ #
~ # esxcli network ip interface  list
vmk0
Name: vmk0
MAC Address: 24:b6:fd:XX:XX:YY
Enabled: true
Portset: vSwitch0
Portgroup: Management Network
VDS Name: N/A
VDS UUID: N/A
VDS Port: N/A
VDS Connection: -1
MTU: 1500
TSO MSS: 65535
Port ID: 33554438

b)  ESXi Storage/iSCSI stats

~# esxcli storage san iscsi stats get
Adapter: vmhba34
Total Number of Sessions: 20
Total Number of Connections: 20
IO Data Sent: 2647449088
IO Data Received: 107921345640
Command PDUs: 15509582
Read Command PDUs: 12353055
Write Command PDUs: 3156497
Bidirectional Command PDUs: 0
No-data Command PDUs: 30
Response PDUs: 15509582
R2T PDUs: 0
Data-in PDUs: 0
Data-out PDUs: 0
Task Mgmt Request PDUs: 0
Task Mgmt Response PDUs: 0
Login Request PDUs: 20
Login Response PDUs: 20
Text Request PDUs: 0
Text Response PDUs: 0
Logout Request PDUs: 0
Logout Response PDUs: 0
NOP-Out PDUs: 1767885
NOP-In PDUs: 1767885
Async Event PDUs: 0
SNACK PDUs: 0
Reject PDUs: 0
Digest Errors: 0
Timeouts: 0
No Tx Buf Count: 0
No Rx Data Count: 232170
~ #

 

c)  ESXi  ping-

Check connectivity to storage, jumbo frame etc

~ # vmkping  -c 5 -s 8972 192.168.7.243
PING 192.168.7.243 (192.168.7.243): 8972 data bytes
8980 bytes from 192.168.7.243: icmp_seq=0 ttl=64 time=2.104 ms
8980 bytes from 192.168.7.243: icmp_seq=1 ttl=64 time=0.693 ms
8980 bytes from 192.168.7.243: icmp_seq=2 ttl=64 time=0.541 ms

d) VMKernel  VMNIC and Check connectivity with VMKernel Port

~ # esxcfg-vmknic  --list
Interface  Port Group/DVPort   IP Family IP Address     Netmask       Broadcast       MAC Address     MTU   TSO MSS Enabled Type
vmk0       Management Network  IPv4      192.168.7.5    255.255.252.0  192.168.7.255  XX:10:55:23:CC:00 1500  65535  true  STATIC
vmk1       iSCSI Kernel 1      IPv4      192.168.7.55   255.255.252.0  192.168.7.255  XX:10:XX:23:CC:YY 1500  65535  true  STATIC
vmk2       iSCSI Kernel 2      IPv4      192.168.7.155  255.255.252.0  192.168.7.255  00:50:56:XX:65:ZZ 1500  65535  true  STATIC     

~ # vmkping  -c 5 -s 8972 -I vmk1 192.168.7.243
PING 192.168.7.243 (192.168.7.243): 8972 data bytes
8980 bytes from 192.168.7.243: icmp_seq=0 ttl=64 time=0.747 ms
8980 bytes from 192.168.7.243: icmp_seq=1 ttl=64 time=0.481 ms
8980 bytes from 192.168.7.243: icmp_seq=2 ttl=64 time=0.523 ms
8980 bytes from 192.168.7.243: icmp_seq=3 ttl=64 time=0.615 ms
8980 bytes from 192.168.7.243: icmp_seq=4 ttl=64 time=0.504 ms

--- 192.168.7.243 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.481/0.574/0.747 ms
~ #

e) vSwitch list

~ # esxcfg-vswitch --list
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch0         128         47          128               1500    vmnic0,vmnic1
PortGroup Name        VLAN ID  Used Ports  Uplinks
NFS                   188      0           vmnic0,vmnic1
DMZ 192.168.X.0/24    1103     13          vmnic0,vmnic1
DMZ 192.168.Y.0/22    1102     22          vmnic0,vmnic1
DMZ 192.168.X.0/24    1101     8           vmnic0,vmnic1
Management Network    1102     1           vmnic0,vmnic1

Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch1         128         3           128               1500    vmnic2
PortGroup Name        VLAN ID  Used Ports  Uplinks
iSCSI Kernel 1        0        1           vmnic2

Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch2         128         3           128               1500    vmnic3
PortGroup Name        VLAN ID  Used Ports  Uplinks
iSCSI Kernel 2        0        1           vmnic3
~ #

Thank You,
Arun

Similar Posts:

Be Sociable, Share!
(0) Comments    Read More   
Post a Comment
Name:
Email:
Website:
Comments:


www.flickr.com
arunbagul's photos More of arunbagul's photos
Get Adobe Flash player
-->