2018-11-06 11:14:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
param($Config = $null);
|
|
|
|
|
|
|
|
|
|
function ClassMemory
|
|
|
|
|
{
|
|
|
|
|
param($Config = $null);
|
|
|
|
|
# This will return a hashtable with every single counter
|
|
|
|
|
# We specify within the array
|
|
|
|
|
$counter = Get-Icinga-Counter -CounterArray @(
|
|
|
|
|
'\Memory\Available Bytes',
|
|
|
|
|
'\Memory\% Committed Bytes In Use',
|
|
|
|
|
'\Memory\Committed Bytes',
|
|
|
|
|
'\Memory\Cache Bytes',
|
|
|
|
|
'\Memory\Pool Nonpaged Bytes',
|
|
|
|
|
'\Memory\Pages/sec',
|
|
|
|
|
'\Memory\Page Reads/sec',
|
|
|
|
|
'\Memory\Page Writes/sec',
|
|
|
|
|
'\Memory\Pages Input/sec',
|
|
|
|
|
'\Memory\Pages Output/sec',
|
|
|
|
|
'\Paging File(*)\% Usage',
|
|
|
|
|
'\Paging File(*)\% Usage Peak'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
# Lets load some additional memory informations, besides current performance counters
|
2019-05-02 10:26:33 -04:00
|
|
|
$ComputerInformations = Get-CimInstance Win32_ComputerSystem;
|
|
|
|
|
$counter.Add('\Memory\Physical Memory Total Bytes', @{ 'value' = $ComputerInformations.TotalPhysicalMemory; 'sample' = @{ }; });
|
2018-11-06 11:14:49 -05:00
|
|
|
|
|
|
|
|
return $counter;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ClassMemory -Config $Config;
|