Hi, I am monitoring the working set memory of a process to detect a memory leak - this is working perfectly unless the process is not running in which case the monitor fires the alert. I would like the monitor to detect the memory usage of teh process, not to detect if the process exists or not - how can I stop the alert from firing if the process does not exist ? asked 25 Oct '17, 16:52 StevenJohns |
Steve, There isn't option built into the the Performance Monitor that will be able to collect data only when the counter is there (process is running). The other option would be for you use the Execute Script Monitor. You would need to write a script that would do the type of checking that you need. Your script would check for the process and then collect the performance data. If the process wasn't running then nothing would happen. Basically the monitor would always be in the Okay state but would collect data if the process is running. Thanks Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer. answered 26 Oct '17, 11:45 Quinn ♦♦ |
Hi Quinn, ok, I see what you are trying to say, however doing this just makes the process watcher fire events when the count = 0. what I need is for no events to fire if the process is 0 is this possible? Steve answered 25 Oct '17, 18:01 StevenJohns |
Steve, The Performance Monitor is configured to always check for a value of a counter. So yes the monitor will go into Alert state when it can't find the counter that it is monitoring. So the trick is to only run the Performance Monitor when the process is running. You could create a Performance Monitor that only monitors your counter. Then create a Process Monitor to watch the process and if the process count falls below 1 then alert. So when the process is running the monitor is Okay. Then go back to the Performance Monitor and set it's Dependencies to the Process Monitor. What will happen is the if the state of the Process Monitor is Okay then the Performance Monitor will run. If the state is not Okay then the Performance Monitor will not run. Thanks Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer. answered 25 Oct '17, 17:24 Quinn ♦♦ |