Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

Need help, Unable to find some information using vim25 SDK

$
0
0

Hi, Guys,

We used to use powerCLI to collect some useful information from vSphere, and now we want to find the same information using vim25 SDK, but we are not able to find the following items.

Can anyone help to tell if they are available in SDK, if so, where can I find them?

 

Thanks

 

 

column1: the powerCLI command we use.

column2: the attribute we cannot find in SDK correspondingly.

column3: a sample value for this attribute from powerCLI output.

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected' -and $_.Version -eq '6.0.0'} | % {

$esxcli = Get-EsxCli -VMHost $strVMHostName.Name

    New-Object psobject -Property @{

"strVMHostName" = $_

"hostname" = ($esxcli.system.hostname.get()).hostname

"lockmode" = $esxcli.storage.vmfs.lockmode.list()}})

ATSCompatible

FALSE

ATSIncompatibilityReason

Device does not support ATS

ATSUpgradeModes

None

LockingMode

ATS+SCSI

 

Get-Cluster | Get-VM | Sort Name | Get-HardDisk | Select Parent,Name,CapacityGB,DiskType,

ScsiCanonicalName,FileName | FT -AutoSize

DiskType

Flat

 

        $HostVIBs = $esxcli.software.vib.list() |

            Where-Object {$_.Name -like "*vem*" } | Select-Object Name,Version,Vendor,ID

VEM version

v172-5.2.1.3.1.3.0-3.2.1

 

 

$(Get-VM | where { $_.PowerState -eq “PoweredOn”} | %{$strVMName = $_.Name Get-Stat -Entity $_ -Stat Cpu.Ready.Summation -RealTime | Group-Object -Property MetricID | %{New-Object -TypeName PSObject -Property @{VMName = $strVMName; MetricId = $_.Name; AvgValue = ($_.Group | Measure-Object -Property Value -Average).Average Units = ($_.Group | %{$_.Unit} | Select -Unique) -join "," } | Select VMName,MetricId,AvgValue,Units ## end new-object}} | Sort-Object -Property MetricID,AvgValue,VMName -Descending)

MetricID

  1. cpu.ready.summation

AvgValue

  1. 179.5944134

Units

millisecond

 

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected'} | % {

$strVMHostName = $_

$esxcli = Get-EsxCli -VMHost $strVMHostName.Name

$hostname = $esxcli.system.hostname.get() | select -ExpandProperty Hostname

$esxcli.storage.core.device.list() | select @{N="hostname";E={$hostname}}, Vendor, Model, Device, Size, NoofoutstandingIOswithcompetingworlds, VAAIStatus | FT -AutoSize})

NoofoutstandingIOswithcompetingworlds

32

 

 

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected'} | % {

$strVMHostName = $_

$esxcli = Get-EsxCli -VMHost $strVMHostName.Name

$esxcli.system.hostname.get() | select -ExpandProperty Hostname

$esxcli.system.module.parameters.list("fnic")

})

fnic_fc_trace_max_pages

fnic_max_qdepth

0

fnic_trace_max_pages

fnic_max_qdepth

 

fnic_trace_max_pages

 

heap_initial

 

heap_max

 

skb_mpool_initial

 

  1. driver. skb_mpool_max

 

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected'} | % {$strVMHostName = $_; $esxcli = Get-EsxCli -VMHost $strVMHostName.Name

$esxcli.system.hostname.get() | select -ExpandProperty Hostname;$esxcli.system.settings.advanced.list() | select Path, IntValue | where {$_.Path -eq '/DataMover/MaxHWTransferSize'}})

MetricID,AvgValue,VMHostName -Descending)

Path

/DataMover/MaxHWTransferSize

 

IntValue

4096

 

 


Viewing all articles
Browse latest Browse all 1860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>