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:
http://members.optusnet.com.au/picus.../projects.html
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
news:27*****************************@phx.gbl...Hi,
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?
Thanks,
David Wagner