467,913 Members | 1,751 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,913 developers. It's quick & easy.

Configuration of Performance Monitor Logs with .NET

Back in October last year, David Wagner had the desire to programmatically
create Windows Performance Counter Log sessions using C#. The concept is to
do something like the Logman utility provided with XP and Windows 2000/2003.

I also tried to find examples earlier this year and was unsuccessful, so I
wrote something of my own.
If anyone is interested, check out the project page at:

The utility is called CounterLogMan and is one half of a more comprehensive
solution for performance monitoring based around feeding RRDTool with output
from perfmon. Source code is provided on the Download page.
"David Wagner" <Da**********@Stratus.com> wrote in message

I am looking at wanting to configure and manage some
Performance Monitor logs through a C# application.
Specifically, I want to be able to define and configure
named performance log configurations and be able to start
and stop the logging through my application. I have done
some digging, but have not been able to figure how I would
do this from C#.

I need the application to be able to work in both Windows
2000 and 2003. I realize that the Windows 2003 system
includes a command line utility (logman) that does
everything I need it to do, however, it is not available
on Windows 2000 and I can not count on being able to use
the remote configuration abilities of that utility.

The PerformanceCounter object in the Diagnostics
namespace, as well as the pdh.dll functions, would seem to
allow me to create my own performance logging mechanism,
but why re-invent the wheel when it seems obvious that
there must be a way to do it from code if the perfmon MMC
snapin and the Windows 2003 logman utility are able to
accomplish the task.

Has anyone already crossed this bridge and be willing to
share the solution?

David Wagner

Nov 16 '05 #1
  • viewed: 3325

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Andy Tran | last post: by
1 post views Thread by Sonny Grunter | last post: by
2 posts views Thread by Arni Snorri Eggertsson | last post: by
46 posts views Thread by dunleav1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.