user715274
user715274

Reputation: 1

command to get the number cpu exists on vmware

Is there any cli command to know the configuration details of VM like, number of existing cpus, number of network cards etc., in VM.

Upvotes: 0

Views: 15071

Answers (4)

Arnauld VM
Arnauld VM

Reputation: 308

lscpu is also useful on Linux. More readable than cat /proc/cpuinfo

Upvotes: 0

xdaudaudau
xdaudaudau

Reputation: 1

No need to use 'foreach-object' powershell can manage it.

Get-VM | Select-Object -property Name,NumCpu,MemoryMB,Host,IPAddress | Export-Csv "C:\VM.csv"

Upvotes: 0

Evan Powell
Evan Powell

Reputation: 960

The vSphere PowerCLI can do this for you from powershell. From here:

Get-VM | `
  ForEach-Object {
    $Report = "" | Select-Object -property Name,NumCpu,MemoryMB,Host,IPAddress
    $Report.Name = $_.Name
    $Report.NumCpu = $_.NumCpu
    $Report.MemoryMB = $_.MemoryMB
    $Report.Host = $_.Host
    $Report.IPAddress = $_.Guest.IPAddress
  Write-Output $Report
  } | Export-Csv "C:\VM.csv"

Upvotes: 2

syserr0r
syserr0r

Reputation: 654

Linux

cat /proc/cpuinfo for processor info.
cat /proc/meminfo for memory info
df -H for partition info in human readable size format
lspci for pci device info (such as network card)
ifconfig or ip addr sh for enabled network interfaces (virtual and physical)

Windows

msinfo32 /report c:\sysinfo.txt and type c:\sysinfo.txt should get you all you could want

Upvotes: 2

Related Questions