473,406 Members | 2,633 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,406 software developers and data experts.

Accessing performance counters on remote machines ...

Don
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 either
has come across this before or could point me in the right direction.

Thanks in advance!
Don
Nov 16 '05 #1
2 6017
Don,

You can specify which performance counter you want to attach to on which
machine you want through the constructor. There is an overload which takes
a machine name.

If you want to impersonate another user, then you might want to look at
the Impersonate method on the WindowsIdentity class. The documentation for
that method shows how to use it in conjunction with a call to the LogonUser
API to impersonate another user. You will need to do this if you want to
access performance counters on another machine as another user.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Don" <do*******@yahoo.com> wrote in message
news:e7**************************@posting.google.c om...
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 either
has come across this before or could point me in the right direction.

Thanks in advance!
Don

Nov 16 '05 #2
If you wanna authenticate the user requesting the counters and they have
rights to the counters on the remote network machine, take a look at WMI.
Very easy to implement ... Another alternative is to use the
System.Diagnostics namespace but unless there is a mapped drive (or cached
connection) access will be denied. An additional alternative is publish the
counters to a remoting object and read from there but it is not a very
robust way to handle this problem.

Alex

"Don" <do*******@yahoo.com> wrote in message
news:e7**************************@posting.google.c om...
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 either
has come across this before or could point me in the right direction.

Thanks in advance!
Don


Nov 16 '05 #3

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

Similar topics

2
by: David Mitchell | last post by:
Hello group, I'm trying to write code to test an application we're developing. This application needs to store its own performance data in the registry, and we'd like to be storing quite a...
2
by: Shankar | last post by:
Platform: Windows 2000 machine with SP4 I use MSINFO to find system information on the remote machines on our local network. I am able to run MSINFO successfully on other Windows 2000 machines...
0
by: rob_c | last post by:
Hi, I've been working with the EIF for a few days now. One of the default event sinks provided is the WMI. I've played around a bit and can send events to the WMI. My question here centers on...
2
by: Mark | last post by:
Hi... We're looking at moving an ASP app from IIS 5 to IIS 6. In general things seem to be working okay, but there are some oddities around the edges. One of those unanticipated changes has to...
0
by: Randall Woodman | last post by:
Does anyone know how to start / stop performance counters programmatically? I am doing some performance testing that involves multiple machines. Being able to start and stop performance counters...
1
by: db | last post by:
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...
0
by: mahldcat | last post by:
I am involved in creating an installer application with the requirements of installing performance counters on a remote machine, and is one that I would not be able to term serve into? I was...
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: 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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.