mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
List PerformanceCounter for Memory
This commit is contained in:
parent
df20e7a0f3
commit
44200eda94
1 changed files with 13 additions and 0 deletions
13
lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1
Normal file
13
lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
function Get-IcingaMemoryPerformanceCounter()
|
||||||
|
{
|
||||||
|
$MemoryStart = (Show-IcingaPerformanceCounters -CounterCategory 'Memory').Keys;
|
||||||
|
$MemoryCounter = New-IcingaPerformanceCounterArray -Counter $MemoryStart;
|
||||||
|
[hashtable]$Result = @{};
|
||||||
|
|
||||||
|
foreach ($item in $MemoryCounter.Keys) {
|
||||||
|
$counter = $item.trimstart('\Memory\');
|
||||||
|
$Result.Add($counter, $MemoryCounter[$item]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $Result;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue