D
David Wagner
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
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