Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

Audit memory ballooning and swapping from the clusters

$
0
0

Hi

 

I need to get VMs that are ballooning and swapping in all clusters in vcenter and exported to csv. I have this pCLI from the ICT-Freak

 

Thanks for the feedback.

 

 

$myCol = @()

foreach($clus in (Get-Cluster)){

foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object `

  {$_.Summary.QuickStats.BalloonedMemory -ne "0"})){

   $Details = "" | Select-Object VM, `

   SwappedMemory ,BalloonedMemory

 

    $Details.Cluster = $clus.Name

    $Details.VM = $vm.Name

    $Details.SwappedMemory = $vm.Summary.QuickStats.SwappedMemory

    $Details.BalloonedMemory = $vm.Summary.QuickStats.BalloonedMemory

 

    $myCol += $Details

  }

}

 

$myCol

$myCol | Export-Csv -NoTypeInformation C:\Output\vcenter-ballooning.csv


Viewing all articles
Browse latest Browse all 175326

Trending Articles



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