VMware Cloud Community
hum_mike
Contributor
Contributor
Jump to solution

Need to get the driver version of my 10GB Network adapters

Here is the scenario. I use neterion 10GB adapters in my esx host and they use the S2IO driver. However, there are different version of this driver that have been released as a result of ESX updating. For example, there is a different driver version for ESX 3.5 U1, U2, U3, U4....... I can easy get this version # by logging into the console and executing the ethtool -i <vmnic#>. I will get a result like this:

driver: s2io

version: 2.2.14.17590

firmware-version:

bus-info: 11:04.0

The number I am concerned about is the 2.2.14.17590. On a one by one basis using the ethtool command is not such a bad way to go. However,

to do this on a couple hundred ESX host is a very time consuming activity. I would like to be able to somehow get a report that has the ESX host Name with the driver and driver version next to it. Does know how to get this information using powershell commands?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

The only way I know how to automate this is through the use of the plink.exe command.

Something like this

$User = <account>
$Pswd = <password>
$regexMask = [regex]"version:\s+([\w|http://.]+)"
$Computer = <esx-hostname>
$plink = "<PuTTY-directory>\plink.exe"
$plinkoptions = " -v -batch -pw $Pswd"

$cmd1 = 'ethtool -i vmnic0'
$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand

$msg = Invoke-Expression -command $command 
$driverVersion = $regexMask.Match($msg).Groups[1].Value
$driverVersion

I attached the script since the forum SW has some problems with square brackets.

____________

Blog: LucD notes

Twitter: lucd22


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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

The only way I know how to automate this is through the use of the plink.exe command.

Something like this

$User = <account>
$Pswd = <password>
$regexMask = [regex]"version:\s+([\w|http://.]+)"
$Computer = <esx-hostname>
$plink = "<PuTTY-directory>\plink.exe"
$plinkoptions = " -v -batch -pw $Pswd"

$cmd1 = 'ethtool -i vmnic0'
$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand

$msg = Invoke-Expression -command $command 
$driverVersion = $regexMask.Match($msg).Groups[1].Value
$driverVersion

I attached the script since the forum SW has some problems with square brackets.

____________

Blog: LucD notes

Twitter: lucd22


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

0 Kudos