Please enable Javascript for better experience...
Performance report for ESXi host against Memory,CPU,Network utilization
By Jitendra | Apr 10, 2020 | In Articles | Total Views [ 2551 ]
(0 Like)
Rate

intial description

Performance report for ESXi host against Memory,CPU,Network utilization

Mandatory requirement is as below :

Powercli module along with powershell and the excel to open generated csv file

It becomes very usefull when you make a capacity report also

Sample report is as below

Please use the script and share it with other using my site link.

-------------------------------------------------------------------------------------------------------------

Copy the code below and save it as file.ps1

-----------------------------------------------------------------------------------------------------------------------------------------------

Import-Module VMware.VimAutomation.Core
$Vcenter= get-content Vcenter.txt
foreach ($vmhost in $Vcenter)
{
Connect-VIServer $Vmhost -User administrator@vsphere.local -Password Vcenter@1234
Get-vmhost | Select Name,
@{N='CPU GHz Capacity';E={[math]::Round($_.CpuTotalMhz/1000,2)}},
@{N='Memory Capacity GB';E={[math]::Round($_.MemoryTotalGB,2)}},
@{N="CPU Usage (Average), Mhz" ; E={[Math]::Round((($_ | Get-Stat -Stat cpu.usagemhz.average -Start (Get-Date).AddDays(-30) -IntervalMins 5 | Measure-Object Value -Average).Average),2)}}, `
@{N="Memory Usage (Average), %" ; E={[Math]::Round((($_ | Get-Stat -Stat mem.usage.average -Start (Get-Date).AddDays(-30) -IntervalMins 5 | Measure-Object Value -Average).Average),2)}} , `
@{N="Network Usage (Average), KBps" ; E={[Math]::Round((($_ | Get-Stat -Stat net.usage.average -Start (Get-Date).AddDays(-30) -IntervalMins 5 | Measure-Object Value -Average).Average),2)}} , `
@{N="Disk Usage (Average), KBps" ; E={[Math]::Round((($_ | Get-Stat -Stat disk.usage.average -Start (Get-Date).AddDays(-30) -IntervalMins 5 | Measure-Object Value -Average).Average),2)}} |
Export-Csv .\report.csv -NoTypeInformation -UseCulture
}


Thanks

Share this

About the Author

Jitendra
Jitendra
Contributer VMwareDiary.com

User's Comments


 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment