Wednesday, 4 February 2015

ESXi Putty command




Obtaining Host Bus adapter driver and firmware information


Obtain the driver type that the Host Bus Adapter is currently using:

# esxcfg-scsidevs -a

You see output similar to:

vmhba0  ata_piix   link-n/a  ide.vmhba0    (0:7.1) Intel Corporation Virtual Machine Chipset
vmhba1  fnic     link-n/a  pscsi.vmhba1  (0:16.0) LSI Logic / Symbios Logic LSI Logic Parallel SCSI Controller
vmhba32 ata_piix   link-n/a  ide.vmhba32   (0:7.1) Intel Corporation Virtual Machine Chipset

Note: The second column shows the driver that is configured for the HBA.

To view the driver version in use, run the command:

# vmkload_mod -s HBADriver |grep Version

For example, to check the mptspi driver:

# vmkload_mod -s fnic |grep Version

Version: Version 4.00.37.00.30vmw, Build: 721907, Interface: 9.0, Built on: May 18 2012

In this example, the driver version is 4.00.37.00.30vmw.

To obtain the driver version for all HBAs in the system with a single command, use:

# for a in $(esxcfg-scsidevs -a |awk '{print $2}') ;do vmkload_mod -s $a |grep -i version ;done


Obtaining Network card driver and firmware information


 Obtain a list of network interface cards and names.

In ESXi/ESX 4.x, run this command:

# esxcfg-nics -l

For example:

# esxcfg-nics -l

Name    PCI         Driver Link Speed    Duplex MAC Address
vmnic0  00:02:04.00 ACME   Up   1000Mbps Full   01:23:45:67:89:AB
vmnic1  00:02:05.00 ACME   Up   1000Mbps Full   01:23:45:67:78:AC

In ESXi 5.x, run this command:

# esxcli network nic list

Use the ethtool -i command to display available information for one of the network interfaces, specifying its name from step 2:

# ethtool -i VMNic_name

For example:

# ethtool -i vmnic0

driver: ACME
version: 1.2.3a-1vmw
firmware-version: 7.8.9
bus-info: 0000:02:04.00

To obtain information from ethtool -i for all network adapters at once, you can run the following command:

for a in $(esxcfg-nics -l|awk '{print $1}'|grep [0-9]) ;do ethtool -i $a;done

In ESXi 5.x, the following the following command can also be used:

esxcli network nic get -n vmnic#