TestimoX

API Reference

Class

PerfCounters

Namespace ComputerX.Diagnostics
Assembly ComputerX
Modifiers static

Convenience APIs to read a few common performance counters.

Inheritance

  • Object
  • PerfCounters

Methods

AvailableMemoryMbAsync 2 overloads
public static Task<PerfCounterResult> AvailableMemoryMbAsync(String computer, CancellationToken ct = null) #
Returns: Task<PerfCounterResult>

Gets available physical memory in megabytes.

Parameters

computer System.String requiredposition: 0
Target computer name or IP.
ct System.Threading.CancellationToken = null optionalposition: 1
Cancellation token.
public static async Task<PerfCounterResult> AvailableMemoryMbAsync(String computer, PerfCounterOptions options, CancellationToken ct = null) #
Returns: Task<PerfCounterResult>

Gets available physical memory in megabytes using WMI/CIM with options.

Parameters

computer System.String requiredposition: 0
Target computer name or IP.
options ComputerX.Diagnostics.PerfCounterOptions requiredposition: 1
Transport and timeout options.
ct System.Threading.CancellationToken = null optionalposition: 2
Cancellation token.
CpuPercentAsync 2 overloads
public static Task<PerfCounterResult> CpuPercentAsync(String computer, CancellationToken ct = null) #
Returns: Task<PerfCounterResult>

Gets the total CPU usage percentage using WMI/CIM.

Parameters

computer System.String requiredposition: 0
Target computer name or IP.
ct System.Threading.CancellationToken = null optionalposition: 1
Cancellation token.

Returns

Counter result with numeric and formatted values.

public static async Task<PerfCounterResult> CpuPercentAsync(String computer, PerfCounterOptions options, CancellationToken ct = null) #
Returns: Task<PerfCounterResult>

Gets the total CPU usage percentage using WMI/CIM with options.

Parameters

computer System.String requiredposition: 0
Target computer name or IP.
options ComputerX.Diagnostics.PerfCounterOptions requiredposition: 1
Transport and timeout options.
ct System.Threading.CancellationToken = null optionalposition: 2
Cancellation token.
DiskQueueLengthAsync 2 overloads
public static Task<PerfCounterResult> DiskQueueLengthAsync(String computer, CancellationToken ct = null) #
Returns: Task<PerfCounterResult>

Gets the total physical disk queue length.

Parameters

computer System.String requiredposition: 0
Target computer name or IP.
ct System.Threading.CancellationToken = null optionalposition: 1
Cancellation token.
public static async Task<PerfCounterResult> DiskQueueLengthAsync(String computer, PerfCounterOptions options, CancellationToken ct = null) #
Returns: Task<PerfCounterResult>

Gets the total physical disk queue length using WMI/CIM with options.

Parameters

computer System.String requiredposition: 0
Target computer name or IP.
options ComputerX.Diagnostics.PerfCounterOptions requiredposition: 1
Transport and timeout options.
ct System.Threading.CancellationToken = null optionalposition: 2
Cancellation token.