Performance Counter Instances
-
OK, I have been play with this on and off all day and can not make it work. How do I define an instance of of a performance counter at runtime? I have the counter defined in the server explorer and can use the counter it's self, but I wish to add intances of the counter, in the same way as, for example, 'Processor/% Idle Time' has. Anyone any ideas? Thanks Stephen
-
OK, I have been play with this on and off all day and can not make it work. How do I define an instance of of a performance counter at runtime? I have the counter defined in the server explorer and can use the counter it's self, but I wish to add intances of the counter, in the same way as, for example, 'Processor/% Idle Time' has. Anyone any ideas? Thanks Stephen
Drag it from the Server Explorer onto your form. That will give you a control to work with. David Stone But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*. Shog9
-
Drag it from the Server Explorer onto your form. That will give you a control to work with. David Stone But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*. Shog9
I can get a normal performance counter to work no problem, what I cant get to work is the InstanceName property. If I try to access one of the existing performance counters that has multible instances that works, but I can not create my own. Bassically I have this system that can load plug-in modules at run time. I have a custom counter called 'Messages Dispatched' now under that I want to create an instance for each plugin i.e. 'E-Mail', 'SMS' etc, just like under PRocessors you can see an instance of each processor. The documentation said to pass the instance name in the constructor to ProcessCount but that does not work for me. The app starts and perfmon shows no instances, just the root performance count. Thanks Stephen.