removeCounter Method
Removes a manually added counter from the set currently being monitored automatically by the Listener. Counters may be added using the addCounter method.
For more information about working with counters, see Supporting Windows Performance Counters.
Syntax
void removeCounter(String
counterPath);
Parameters
- counterPath
- [in] Required String, which specifies a valid counter path. For more information about valid counter paths, refer to the documentation for Microsoft Windows Performance Monitor.
Example
Listener listener = new Listener("sampleApp", "4.0");
listener.addCounter("\\TCP\\Segments Sent/sec");
...
listener.removeCounter("\\TCP\\Segments Sent/sec");