RSS .92| RSS 2.0| ATOM 0.3
  • Home
  •  

    PowerCLI – Report on Organization Resource usage in vCloud Director

    It is important to monitor Organization resource usage in vCloud Director.  There is a view in the Monitor area but what if you want a quick look?  Voila, here it is!

    You will need PowerCLI installed with the vCloud cmdlets.  You will also need to be connected to the cell.  This will walk through all of your configured Organizations and display the percentage usage.  Very useful when you are using the Allocation model.

    (get-orgvdc) | %{
     $orgvdc = $_
     $cpuAlloc = $orgvdc.CpuAllocationGhz
     $ramAlloc = $orgvdc.MemoryAllocationGB
     $storAlloc = $orgvdc.StorageAllocationGB
    
     if ($orgvdc.CpuUsedGhz -ne 0 -and $orgvdc.CpuAllocationGhz -ne 0) {
     $orgcpuspc = (($orgvdc.CpuUsedGhz * 100) / $orgvdc.CpuAllocationGB) }
    
     if ($orgvdc.MemoryUsedGB -ne 0 -and $orgvdc.MemoryAllocationGB -ne 0) {
     $orgramuspc = (($orgvdc.MemoryUsedGB * 100) / $orgvdc.MemoryAllocationGB) }
    
     if ($orgvdc.StorageUsedGB -ne 0 -and $orgvdc.StorageAllocationGB -ne 0) {
     $orgstoruspc = (($orgvdc.StorageUsedGB * 100) / $orgvdc.StorageAllocationGB) }
     $orgram = [System.math]::round($orgramuspc,1)
     $orgcpu = [System.math]::round($orgcpuspc,1)
     $orgstor = [System.math]::round($orgstoruspc,1)
    
     write-host `n"Org vDC: $orgvdc"
     write-host "CPU: $orgcpu% of $cpuAlloc Ghz, MEM: $orgram% of $ramAlloc GB, Storage: $orgstor% of $storAlloc GB"`n
     }
    
    

    The output will be:

    OvDC: My Org vDC, CPU: 25.3%, MEM: 18.6%, Storage: 60.1%

    Leave a Reply

    Your email address will not be published. Required fields are marked *