PerformanceMonitor Class

Definition

The PerformanceMonitor class fetches data for processes that are running on the system.

public ref class PerformanceMonitor : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class PerformanceMonitor : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type PerformanceMonitor = class
    inherit XppObjectBase
Public Class PerformanceMonitor
Inherits XppObjectBase
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
PerformanceMonitor
Attributes

Remarks

You can take a snapshot of the system at any time and traverse the counters for any process that is running on the system.

The following example prints the processId and workingset values for all the currently running processes.

static void pvPerformanceMonitorTest(args a) 
{ 
    int i, j;  
    PerformanceMonitorInstance instance;  
    PerformanceMonitorCounter counter1, counter2;  
    PerformanceMonitor pm = new PerformanceMonitor();  
    // Take a current snapshot of the system. 
    pm.takeSnapshot ();  
    // Traverse all the running processes. 
    for (i= 1; i <= pm.instanceCount(); i++)  
    {  
        instance = pm.instance(i);  
        counter1 = instance.getCounter("ID Process");  
        counter2 = instance.getCounter("Working Set");  
        print instance.name(), " ",  
        counter1.intData(), " ",  
        counter2.intData();  
    } 
    pause;  
}

Constructors

PerformanceMonitor()
PerformanceMonitor(IntPtr)

Fields

__k_PerformanceMonitorId
kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
instance(Int32)
instanceCount()

Returns the instance count, which is the number of processes in the current snapshot.

IsManagedValid() (Inherited from XppObjectBase)
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod()

Initializes a new instance of the PerformanceMonitor class.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
processId()

Returns the processId value of the process that is running this method.

setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
systemName()
takeSnapshot()
takeSnapshot(String)
ToString()

Returns a string that contains the class handle and name, and possibly additional information.

usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Applies to