Is it possible to create a performance counter on a remote Windows machine?

Is there a way to programmatically create a performance counter on a remote computer running Windows Server 2008?

+4
source share
4 answers

You can do this with PSExec . I don't know if there is a simpler / cleaner way.

+3
source

You want to "create an instance of an existing counter" or "register a new counter".

I'm not sure about registering a new counter remotely, but in managed code, you can use System.Diagnostics.PerformanceCounter to remotely instantiate an existing counter.

+1
source

Using the System.Diagnostics namespace, it is not possible to create a category on a remote machine. You can use WMI through .NET , which opens through the System.Management and System.Management.Instrumentation namespaces.

The performance monitor is connected to one of the WMI providers for performance . You can connect via WMI to a remote machine to provide and change values. Be aware of the differences between versions of Win OS.

To access it, you will need administrator rights.

+1
source

Unfortunately, you cannot write to remote performance counters. There is no overload that allows you to specify a read / write instance of the PerformanceCounter class that connects to the remote computer. Refer to the Note section here.

0
source

All Articles