mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
List various MemoryUsage
This commit is contained in:
parent
44200eda94
commit
26d0887ae9
1 changed files with 14 additions and 0 deletions
14
lib/provider/memory/Get-IcingaMemoryUsage.psm1
Normal file
14
lib/provider/memory/Get-IcingaMemoryUsage.psm1
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue