mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
List various MemoryUsage
This commit is contained in:
parent
cb44cb81b3
commit
3f646a29f2
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