mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
15 lines
566 B
PowerShell
15 lines
566 B
PowerShell
|
|
function Get-IcingaMemoryUsage()
|
||
|
|
{
|
||
|
|
$MEMUsageInformations = Get-CimInstance Win32_OperatingSystem;
|
||
|
|
|
||
|
|
[hashtable]$MEMUsageData = @{
|
||
|
|
'FreePhysicalMemory' = $MEMUsageInformations.FreePhysicalMemory;
|
||
|
|
'FreeVirtualMemory' = $MEMUsageInformations.FreeVirtualMemory;
|
||
|
|
'TotalVirtualMemorySize' = $MEMUsageInformations.TotalVirtualMemorySize;
|
||
|
|
'TotalVisibleMemorySize' = $MEMUsageInformations.TotalVisibleMemorySize;
|
||
|
|
'MaxProcessMemorySize' = $MEMUsageInformations.MaxProcessMemorySize;
|
||
|
|
}
|
||
|
|
|
||
|
|
return $MEMUsageData;
|
||
|
|
}
|