473,583 Members | 3,155 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Diagnost ics.Performance Counter
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 3596
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\adm inistrator

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.Manageme nt and WMI to read remote perf. counters.

3. Impersonate a remote administrators account.

Willy.

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

I am writing a utility to get the performance counters from a remote
machine. Currently, I am usign the System.Diagnost ics.Performance Counter
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
2078
by: Marc Melancon | last post by:
Will the next release of SQL Server 2000 64bit sp provide performance counter? MarcM
2
6025
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 prompt the user to put in a username/password for that machine. I'm not too familiar with the security model involved here, and was hoping someone...
0
2049
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 using such dialog box on a non-English Windows OS (I'm currently testing on Spanish WinXP Professional). I'm noticing that on non-English Windows...
0
1745
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: PerformanceCounter perfCounter = new PerformanceCounter("TCP","Connections Active");
2
3132
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 take, how much memory the application is using, what percentage of cpu capacity the application is using. I assume a good idea would be to use a...
7
4785
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 counters all show 0. In addition, ASP.NET Applications does not show any of the ASP.NET instances that are running on the computer. The other counters...
1
2442
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 .Net 2.0) The performance counter categories have been successfully created. When the set of classes are used by a WinForm test harness application,...
1
6652
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 server (this is a farm) I receive the following exception when trying to create the performance counters. We had an earlier issue where the ASPNET user...
10
3059
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 about 10 or 20 times: --------------------------- Process Explorer --------------------------- The .NET performance counters on this system are...
0
7896
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8184
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7936
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8195
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5701
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5375
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3820
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1158
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.