You retrieve raw performance counter values by retrieving the current value of the RawValue property on the PerformanceCounter class.
To retrieve a counter’s raw value
The following example illustrates how to use the RawValue property to retrieve the current value of the BookOrders counter:
[Visual Basic] Dim MyCtr as New PerformanceCounter MyCtr.Category= "Orders" MyCtr.Counter= "Total" Dim raw as int64 raw = MyCtr.RawValue [C#] PerformanceCounter MyCtr = new PerformanceCounter(); MyCtr.Category = "Orders"; MyCtr.Counter = "Total"; Int64 Raw = MyCtr.RawValue;
Performance Counter Value Retrieval | Retrieving Calculated Performance Counter Values | Retrieving Performance Counter Samples | Retrieving All Counters in a Category