473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Getting Performance counters as a different user

db
Hello,

I am writing a utility to get the performance counters from a remote
machine. Currently, I am usign the System.Diagnostics.PerformanceCounter
class to retrieve these counters, but they only retrieve the counters with
the permissions of the owneer of my utility's process.

I dont see any way within this class to provide a different authentication
to let the user get the counters with different permissions (windows
username/password). Does anyone know of a workaround or solution to this?

Thanks,
Don
Nov 16 '05 #1
1 3572
Several possibilities exist to solve this:

1. establish a use record with the remote server's administrative resource,
this can be done using following command (from code - using Process.Start or
the command line):

net use \\remserver\IPC$ pwd /user:domain\administrator

where remserver is to remote machine name, pwd is the password of an
administrator account (or an account with privileges to profile system
perf.) , domain is the remote machine name (don't use a domain account).

Delete the use record when done:
net use \\remserver\IPC$ /delete

2. Use System.Management and WMI to read remote perf. counters.

3. Impersonate a remote administrators account.

Willy.

"db" <db@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...
Hello,

I am writing a utility to get the performance counters from a remote
machine. Currently, I am usign the System.Diagnostics.PerformanceCounter
class to retrieve these counters, but they only retrieve the counters with
the permissions of the owneer of my utility's process.

I dont see any way within this class to provide a different authentication
to let the user get the counters with different permissions (windows
username/password). Does anyone know of a workaround or solution to this?

Thanks,
Don

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marc Melancon | last post by:
Will the next release of SQL Server 2000 64bit sp provide performance counter? MarcM
2
by: Don | last post by:
Hello! I am trying to write some code to access performance counters on a remote machine. Ideally, I would like to add a machine to a tree control (like the "Servers" view in the .NET IDE) and...
0
by: Christopher Attard | last post by:
Hi, I need to create a dialog like the 'Add Counters' dialog box in perfmon. I'm using the System.Diagnostics namespace class in .NET and I've managed to do it. The problem arises when I'm...
0
by: Christopher Attard | last post by:
Hi, I want to make use of the Performance Counter "Connections active" which falls under the "TCP" Performance object. I'm using the following code (in C#) to get the performance counter: ...
2
by: Peter Kirk | last post by:
Hi I would like some general pointers about monitoring some performance parameters of an application we have written. For example: how many threads it has currently running, how long the threads...
7
by: James | last post by:
Hi Has anybody had any experience of ASP.Net performance counters not updating. In the performance monitor application when I try to add the groups ASP.NET and ASP.NET Applications the...
1
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter to increment custom performance counters (using...
1
by: Robert Strickland | last post by:
I have a .Net web service (written for 1.1 Framework using C#) running on Windows 2003 with all latest patches. To help monitor the service, the code creates several performance counters. One...
10
by: Zytan | last post by:
I made a program using the Timer class, and I start the timer with Timer.Start(), but don't stop it with Timer.Stop(), and I assumed this was ok, but, Process Explorer informs me, after running it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.